com.centrasite.control.repository.items
Class RepositoryFolderItem

java.lang.Object
  extended by com.centrasite.control.AbstractItem
      extended by com.centrasite.control.repository.items.RepositoryObjectItem
          extended by com.centrasite.control.repository.items.RepositoryFolderItem
All Implemented Interfaces:
Item
Direct Known Subclasses:
RepositoryRootFolderItem, RepositorySubFolderItem

public abstract class RepositoryFolderItem
extends RepositoryObjectItem

Abstract base class of all repository folders.


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
RepositoryFolderItem(Connector connector, RepositoryFolderItem parent, javax.wvcm.Resource resource)
          Constructs an RepositoryFolderItem object.
 
Method Summary
 RepositoryFileItem createFile(java.lang.String clientPath, java.lang.String serverPath)
          Create a new file.
 RepositoryFileItem createFile(java.lang.String displayName, java.lang.String clientPath, java.lang.String serverPath, java.lang.String extension, java.util.Collection<UserDefinedPropertyItem> properties)
          Create a new file.
 RepositorySubFolderItem createFolder(java.lang.String folderName)
          Create a new folder.
 java.util.ArrayList<RepositoryObjectItem> getAllChildren()
          Get all children.
 java.util.ArrayList getAllChildren(boolean refresh)
          Get all children with forced reload.
 java.util.ArrayList<RepositoryObjectItem> getAllFilesChildren()
          Get Files that are children of this folder.
 java.util.ArrayList getAllFilesChildren(boolean refresh)
          Get all children Files with forced reload.
 java.util.Iterator getChildren()
          Get children.
 java.util.Iterator getChildren(boolean refresh)
          Get children.
 java.lang.String getContentLength()
          Get content length.
static java.lang.String getDisplayRelativePath(java.lang.String relativePath, Connector connector)
          Makes the given relative path appropriate for display purposes.
 java.lang.String getImageURL()
           
 PrivilegeDescriptor getPrivilegeDescriptor()
           
 java.lang.String getRelativePath()
          Get resource path relative to SupportingDocuments folder.
 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.
 boolean isEmpty()
           
 boolean isEmptyFolder()
           
 boolean isEmptyFolder(RepositoryFolderItem folder)
          Checks recursively for files in the folder
 void resortItem(RepositoryObjectItem item)
           
 void setReloadRequired()
           
 void setRepositoryFileForVersioning(RepositoryFileItem rfi)
           
 
Methods inherited from class com.centrasite.control.repository.items.RepositoryObjectItem
checkAndDeleteExternaLinkReferencies, clearProperties, create, createItem, equals, getAccessControlElements, getAutoVersion, getComment, getContentType, getCreationDate, getCurrentUserPermissionItem, getDescription, 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

RepositoryFolderItem

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

Parameters:
connector - The connector.
parent - The parent folder.
resource - The webDAV resource.
Method Detail

resortItem

public void resortItem(RepositoryObjectItem item)

getContentLength

public java.lang.String getContentLength()
                                  throws java.lang.Exception
Get content length.

Overrides:
getContentLength in class RepositoryObjectItem
Returns:
Content length
Throws:
java.lang.Exception

hasChildren

public boolean hasChildren()
Indicates whether childs objects exist.

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

isEmpty

public boolean isEmpty()
                throws java.lang.Exception
Throws:
java.lang.Exception

isEmptyFolder

public boolean isEmptyFolder(RepositoryFolderItem folder)
                      throws java.lang.Exception
Checks recursively for files in the folder

Throws:
java.lang.Exception

isEmptyFolder

public boolean isEmptyFolder()
                      throws java.lang.Exception
Throws:
java.lang.Exception

createFolder

public RepositorySubFolderItem createFolder(java.lang.String folderName)
                                     throws java.lang.Exception
Create a new folder.

Throws:
java.lang.Exception

createFile

public RepositoryFileItem createFile(java.lang.String clientPath,
                                     java.lang.String serverPath)
                              throws java.lang.Exception
Create a new file.

Throws:
java.lang.Exception

createFile

public RepositoryFileItem createFile(java.lang.String displayName,
                                     java.lang.String clientPath,
                                     java.lang.String serverPath,
                                     java.lang.String extension,
                                     java.util.Collection<UserDefinedPropertyItem> properties)
                              throws java.lang.Exception
Create a new file.

Parameters:
extension - Used to determine content type.
Throws:
java.lang.Exception

setRepositoryFileForVersioning

public void setRepositoryFileForVersioning(RepositoryFileItem rfi)

getAllChildren

public java.util.ArrayList getAllChildren(boolean refresh)
                                   throws java.lang.Exception
Get all children with forced reload.

Parameters:
refresh - Refresh list of children
Returns:
Sub folder and files
Throws:
java.lang.Exception

getAllFilesChildren

public java.util.ArrayList getAllFilesChildren(boolean refresh)
                                        throws java.lang.Exception
Get all children Files with forced reload.

Parameters:
refresh - Refresh list of children
Returns:
Sub folder and files
Throws:
java.lang.Exception

getChildren

public java.util.Iterator getChildren()
                               throws java.lang.Exception
Get children.

Specified by:
getChildren in interface Item
Overrides:
getChildren in class RepositoryObjectItem
Returns:
Sub folder only
Throws:
java.lang.Exception

getChildren

public java.util.Iterator getChildren(boolean refresh)
                               throws java.lang.Exception
Get children.

Specified by:
getChildren in interface Item
Overrides:
getChildren in class RepositoryObjectItem
Parameters:
refresh - Refresh list of children
Returns:
Sub folder only
Throws:
java.lang.Exception

setReloadRequired

public void setReloadRequired()

getAllChildren

public java.util.ArrayList<RepositoryObjectItem> getAllChildren()
                                                         throws java.lang.Exception
Get all children.

Returns:
Sub folder and files
Throws:
java.lang.Exception

getAllFilesChildren

public java.util.ArrayList<RepositoryObjectItem> getAllFilesChildren()
                                                              throws java.lang.Exception
Get Files that are children of this folder. Subfolers will be skiped.

Returns:
Sub files
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

getPrivilegeDescriptor

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

getRelativePath

public java.lang.String getRelativePath()
Get resource path relative to SupportingDocuments folder.


getDisplayRelativePath

public static java.lang.String getDisplayRelativePath(java.lang.String relativePath,
                                                      Connector connector)
                                               throws java.lang.Exception
Makes the given relative path appropriate for display purposes. Transforms organization's UDDI key to organization's name.

Parameters:
relativePath - The relative path for this repository object, it must be of the form "/somedir/orgsUddiKey/possiblyOtherDirs"
connector -
Throws:
java.lang.Exception