org.esupportail.portal.channels.CStockage.provider
Class ChannelResource

java.lang.Object
  extended byorg.esupportail.portal.channels.CStockage.provider.ChannelResource
Direct Known Subclasses:
SortedChannelResource

public class ChannelResource
extends java.lang.Object

Id: ChannelResource.java,v 1.0 8 juil. 2004
Copyright (c) 2004 Esup Portail (www.esup-portail.org)
Classes: ChannelResource
Original Author: Yohan Colmant
This represents a file system resource. This is used to abstract the server client library.


Field Summary
private  long contentLength
          The length of the resource
private  java.lang.String contentType
          The type of the resource
private  java.lang.String displayName
          The displayed name
private  java.io.InputStream inputStream
          The file inputStream
private  boolean isCollection
          If this resource is a collection
private  long lastModified
          The last modification date
private  java.lang.String path
          The resource path
private  java.lang.String state
          If this resource has a state
 
Constructor Summary
ChannelResource(java.lang.String displayName, java.lang.String path, long contentLength, java.lang.String contentType, long lastModified, boolean isCollection)
          Constructor
ChannelResource(java.lang.String displayName, java.lang.String path, long contentLength, java.lang.String contentType, long lastModified, boolean isCollection, java.io.InputStream inputStream)
          Constructor
 
Method Summary
 long getContentLength()
           
 java.lang.String getContentType()
           
 java.lang.String getDisplayName()
           
 java.io.InputStream getInputStream()
           
 long getLastModified()
           
 java.lang.String getPath()
           
 java.lang.String getState()
           
 boolean isCollection()
           
 void setState(java.lang.String state)
           
 java.lang.String toString()
          Return a String formed with all attributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

displayName

private java.lang.String displayName
The displayed name


path

private java.lang.String path
The resource path


contentLength

private long contentLength
The length of the resource


contentType

private java.lang.String contentType
The type of the resource


lastModified

private long lastModified
The last modification date


isCollection

private boolean isCollection
If this resource is a collection


inputStream

private java.io.InputStream inputStream
The file inputStream


state

private java.lang.String state
If this resource has a state

Constructor Detail

ChannelResource

public ChannelResource(java.lang.String displayName,
                       java.lang.String path,
                       long contentLength,
                       java.lang.String contentType,
                       long lastModified,
                       boolean isCollection)
Constructor

Parameters:
displayName - The displayed name
path - The resource path
contentLength - The length of the resource
contentType - The type of the resource
lastModified - The last modification date
isCollection - If this resource is a collection

ChannelResource

public ChannelResource(java.lang.String displayName,
                       java.lang.String path,
                       long contentLength,
                       java.lang.String contentType,
                       long lastModified,
                       boolean isCollection,
                       java.io.InputStream inputStream)
Constructor

Parameters:
displayName - The displayed name
path - The resource path
contentLength - The length of the resource
contentType - The type of the resource
lastModified - The last modification date
isCollection - If this resource is a collection
inputStream - the file inputStream
Method Detail

getState

public java.lang.String getState()
Returns:
Returns the state.

setState

public void setState(java.lang.String state)
Parameters:
state - The state to set.

getPath

public java.lang.String getPath()
Returns:
Returns the path.

getContentLength

public long getContentLength()
Returns:
Returns the contentLength.

getContentType

public java.lang.String getContentType()
Returns:
Returns the contentType.

getDisplayName

public java.lang.String getDisplayName()
Returns:
Returns the displayName.

getLastModified

public long getLastModified()
Returns:
Returns the lastModified.

isCollection

public boolean isCollection()
Returns:
Returns the isCollection.

getInputStream

public java.io.InputStream getInputStream()
Returns:
Returns the inputStream.

toString

public java.lang.String toString()
Return a String formed with all attributes

Returns:
a String formed with all attributes