com.centrasite.control.repository.items
Class RepositoryFileItem

java.lang.Object
  extended by com.centrasite.control.AbstractItem
      extended by com.centrasite.control.repository.items.RepositoryObjectItem
          extended by com.centrasite.control.repository.items.RepositoryFileItem
All Implemented Interfaces:
Item

public class RepositoryFileItem
extends RepositoryObjectItem

Repository file.


Field Summary
 
Fields inherited from class com.centrasite.control.repository.items.RepositoryObjectItem
DEDICATED_PROPERTIES
 
Fields inherited from class com.centrasite.control.AbstractItem
rcs_id
 
Constructor Summary
RepositoryFileItem(Connector connector, RepositoryFolderItem parent, javax.wvcm.Resource resource)
          Constructs an RepositoryFileItem object.
 
Method Summary
 void delete()
          Delete file.
 void getContent(java.io.OutputStream stream)
          Get content.
 java.lang.String getDescription()
           
static java.lang.String getFileSystemName(RepositoryObjectItem roi)
           
 java.util.Collection<RepositoryHistoryItem> getHistory()
          Get history.
 java.lang.String getImageURL()
           
 PrivilegeDescriptor getPrivilegeDescriptor()
           
 ReportInterface getReport()
          Get report to be used when selecting given object in tree.
 ReportInterface getReportForDetailView()
          Get report to be used for data access in detail view of THIS Item - not for child nodes!
 boolean hasChildren()
          Indicates whether childs objects exist.
static RepositoryFileItem rereadFile(Connector connector, RepositoryFileItem item)
          Read last persisted state of the file.
 
Methods inherited from class com.centrasite.control.repository.items.RepositoryObjectItem
checkAndDeleteExternaLinkReferencies, clearProperties, create, createItem, equals, getAccessControlElements, getAutoVersion, getChildren, getChildren, getComment, getContentLength, getContentType, getCreationDate, getCurrentUserPermissionItem, getDocumentName, getKey, getModificationDate, getModifiedDateObject, getName, getNameEx, getOwner, getParent, getPath, getProperties, getProvider, getRepositoryConnector, getResource, getTrimmedPath, getTrimmedPath, hashCode, hasNoChildren, isLocationChanged, isModified, isReferenced, isReferencedByMyCentraSite, rename, save, save, setAccessControlElements, setComment, setDisplayName, setLocationChanged, setNewLocation, setParent, setProperties, setResource, toString
 
Methods inherited from class com.centrasite.control.AbstractItem
addBulkCommand, addCommand, addDetailViewTab, cannotHaveChildren, clearCache, getBulkCommands, getCommand, getCommand, getCommands, getConnector, getDefaultCommand, getDetailsCommand, getDetailViewTabs, getItem, getLanguage, getLocale, getNonPermissionAccessControlElements, getPersistanceLocale, getRelatedItems, hasRequiredAttribute, isLocked, isReadOnly, isStandalone, isSubTabModified, removeCommand, replaceCommand, setCommandEnabled, setConnector, setDefaultCommand, setDetailsCommand, setLocked, setRelatedItems, setRequiredAttribute, setTabModified, showDetailView, showReport
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RepositoryFileItem

public RepositoryFileItem(Connector connector,
                          RepositoryFolderItem parent,
                          javax.wvcm.Resource resource)
Constructs an RepositoryFileItem object.

Parameters:
connector - Connector.
parent - Parent folder.
resource - WebDAV resource.
Method Detail

hasChildren

public boolean hasChildren()
Description copied from class: RepositoryObjectItem
Indicates whether childs objects exist.

Specified by:
hasChildren in class RepositoryObjectItem
Returns:
false if childs exist.

getContent

public void getContent(java.io.OutputStream stream)
                throws java.lang.Exception
Get content.

Parameters:
stream - Output stream
Throws:
java.lang.Exception

delete

public void delete()
            throws java.lang.Exception
Delete file.

Throws:
java.lang.Exception

getDescription

public java.lang.String getDescription()
                                throws java.lang.Exception
Specified by:
getDescription in interface Item
Overrides:
getDescription in class RepositoryObjectItem
Throws:
java.lang.Exception

getImageURL

public java.lang.String getImageURL()
Specified by:
getImageURL in interface Item
Overrides:
getImageURL in class RepositoryObjectItem

getReport

public ReportInterface getReport()
Description copied from class: AbstractItem
Get report to be used when selecting given object in tree.

Specified by:
getReport in interface Item
Overrides:
getReport in class AbstractItem

getReportForDetailView

public ReportInterface getReportForDetailView()
Description copied from class: AbstractItem
Get report to be used for data access in detail view of THIS Item - not for child nodes!

Specified by:
getReportForDetailView in interface Item
Overrides:
getReportForDetailView in class AbstractItem

getHistory

public java.util.Collection<RepositoryHistoryItem> getHistory()
Get history.

Returns:
History of repository file.

getPrivilegeDescriptor

public PrivilegeDescriptor getPrivilegeDescriptor()
Specified by:
getPrivilegeDescriptor in interface Item
Overrides:
getPrivilegeDescriptor in class AbstractItem
Returns:
returns the privilage descritptor interface

rereadFile

public static RepositoryFileItem rereadFile(Connector connector,
                                            RepositoryFileItem item)
                                     throws javax.wvcm.WvcmException
Read last persisted state of the file. It will be the same file only in different java instance, this won't be a problem as equals() behave correctly even if two different java instances are holding the same WebDAV file. This is useful e.g. for implementing rollback functionality

Parameters:
connector -
item - the file to be re-read
Returns:
the last persisted WebDAV file
Throws:
javax.wvcm.WvcmException

getFileSystemName

public static java.lang.String getFileSystemName(RepositoryObjectItem roi)
                                          throws java.lang.Exception
Throws:
java.lang.Exception