## com.arsdigita.cms.docmgr
Class DocFolder

    java.lang.Object
      com.arsdigita.domain.DomainObject
          com.arsdigita.domain.ObservableDomainObject
              com.arsdigita.kernel.ACSObject
                  com.arsdigita.versioning.VersionedACSObject
                      com.arsdigita.cms.ContentItem
                          com.arsdigita.cms.Folder
                              com.arsdigita.cms.docmgr.DocFolder

All Implemented Interfaces:
  com.arsdigita.auditing.Audited, com.arsdigita.cms.CustomCopy, Resource

public class DocFolder
extends com.arsdigita.cms.Folder
implements Resource

This class needs its own BASE_DATA_OBJECT_TYPE so we can have Description field. Otherwise, it would just be cms.Folder.

Author:
  Crag Wolfe

Nested Class Summary

Nested classes inherited from class com.arsdigita.cms.Folder
`com.arsdigita.cms.Folder.ItemCollection`

Field Summary
`static String` `BASE_DATA_OBJECT_TYPE` Data object type for this domain object
`static String` `DESCRIPTION`
`static String` `TYPE` Data object type for this domain object (for CMS compatibility)

Fields inherited from class com.arsdigita.cms.Folder
`HOME_FOLDER, HOME_SECTION, INDEX, ITEMS, versionId`

Fields inherited from class com.arsdigita.cms.ContentItem
`ANCESTORS, AUDITING, CHILDREN, CONTENT_SECTION, CONTENT_TYPE, DRAFT, DRAFT_VERSION, extraXMLGenerators, LANGUAGE, LIVE, PARENT, PENDING, VERSION, VERSIONS`

Fields inherited from class com.arsdigita.versioning.VersionedACSObject
`IS_DELETED, MASTER`

Fields inherited from class com.arsdigita.kernel.ACSObject
`CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE`

Fields inherited from interface com.arsdigita.cms.docmgr.Resource
`SEPARATOR, SEPARATOR_CHAR`

Constructor Summary
`DocFolder()`
`DocFolder(BigDecimal id)`
`DocFolder(com.arsdigita.persistence.DataObject obj)`
`DocFolder(com.arsdigita.persistence.OID id)`
`DocFolder(String type)`
`DocFolder(String title, String descrip, DocFolder parent)`

Method Summary
`Resource` `copyTo(Resource parent)` Copies the resource into another location.
`Resource` `copyTo(String name)` Copies the resource into the same location (same parent) with a new name.
`Resource` `copyTo(String name, Resource parent)` Copies the resource into another location with a new name.
`String` `getDescription()` Returns a description of the resource, or null if no description has been provided.
`Resource` `getParentResource()` Returns the path name of this resource's parent, or null if this resource does not have a parent.
`static Repository` `getRepository(Resource r)`
`static DocFolder` `getRootFolder(DocFolder f)`
`String` `getTitle()` Returns the title of the file or folder corresponding to this resource.
`boolean` `isFile()` Tests whether this resource is a file.
`boolean` `isFolder()` Tests whether this resource is a folder.
`boolean` `isRoot()` Is this the root?
`static DocFolder` `retrieveDocFolder(com.arsdigita.persistence.DataObject docfolderData)` Returns a DocFolder for the given data object.
`DocFolder` `retrieveSubFolder(String folderTitle)`
`Resource` `retrieveSubResource(String resourceTitle)`
`void` `setDescription(String description)`
`void` `setParentResource(Resource r)` Set parent object
`void` `setTitle(String title)`
`URL` `toURL()` Returns the URL corresponding to this resource.

Methods inherited from class com.arsdigita.cms.Folder

`addItem, addPendingVersion, afterSave, autoPublishIfAssociated, beforeDelete, beforeSave, canPublishToFS, containsFolders, copyItemsToFolder, copyProperty, delete, getBaseDataObjectType, getDisplayName, getIndexItem, getItem, getItems, getItems, getLabel, getLifecycle, getPrimaryInstances, getUserHomeFolder, isEmpty, makeCopy, publish, removeIndexItem, removeLifecycle, removePendingVersion, setIndexItem, setLabel, setLifecycle, setUserHomeFolder, setVersion, unpublish`

Methods inherited from class com.arsdigita.cms.ContentItem

`addCategory, assertDraft, assertLive, assertMaster, assertPending, copy, copy, copyProperty, copyServices, copyServicesFrom, createLiveVersion, createPendingVersion, get, getCategories, getCategoryCollection, getChildren, getContentSection, getContentType, getCreationDate, getCreationIP, getCreationUser, getDraftVersion, getExtraXMLGenerators, getLanguage, getLastModifiedDate, getLastModifiedIP, getLastModifiedUser, getLiveVersion, getLocale, getName, getParent, getPath, getPathInfo, getPathInfo, getPathNoJsp, getPendingVersions, getPublicVersion, getPublishListenerClassName, getVersion, getWorkingVersion, initialize, isDraftVersion, isLive, isLiveVersion, isPendingVersion, isPublished, promotePendingVersion, publishToFS, removeCategory, removeLifecycle, republish, set, setContentSection, setContentType, setDefaultCategory, setLanguage, setLive, setLiveVersion, setName, setParent, setVersionRecursively, unpublishFromFS`

Methods inherited from class com.arsdigita.versioning.VersionedACSObject
`applyTag, applyUniqueTag, autoPropagateMaster, getMaster, getRolledBackTo, getTransactions, getTransactions, isMaster, isRolledBack, isSubtype, permanentlyDelete, propagateMaster, recordAttributeChange, rollBackTo, rollBackTo, rollForward, save, setMaster, trackChanges`

Methods inherited from class com.arsdigita.kernel.ACSObject
`assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, isContainerModified, setID, setID`

Methods inherited from class com.arsdigita.domain.ObservableDomainObject
`addObserver, getObservers`

Methods inherited from class com.arsdigita.domain.DomainObject
`add, add, addToAssociation, afterDelete, clear, disconnect, equals, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.arsdigita.cms.docmgr.Resource
`delete, getID, getPath, save, toString`

Field Detail

### DESCRIPTION

    public static final String DESCRIPTION

See Also:
  Constant Field Values

### BASE_DATA_OBJECT_TYPE

    public static final String BASE_DATA_OBJECT_TYPE

  Data object type for this domain object

  See Also:
    Constant Field Values

### TYPE

    public static final String TYPE

  Data object type for this domain object (for CMS compatibility)

  See Also:
    Constant Field Values

Constructor Detail

### DocFolder

    public DocFolder()

### DocFolder

    public DocFolder(BigDecimal id)
              throws com.arsdigita.domain.DataObjectNotFoundException

### DocFolder

    public DocFolder(com.arsdigita.persistence.OID id)
              throws com.arsdigita.domain.DataObjectNotFoundException

### DocFolder

    public DocFolder(com.arsdigita.persistence.DataObject obj)

### DocFolder

    public DocFolder(String type)

### DocFolder

    public DocFolder(String title,
                     String descrip,
                     DocFolder parent)

Method Detail

### retrieveDocFolder

    public static DocFolder retrieveDocFolder(com.arsdigita.persistence.DataObject docfolderData)

  Returns a DocFolder for the given data object. Use this method instead of the new Docfolder(DataObject) method. This method uses the domain object factory to produce the appropriate docfolder class.

  Parameters:
    `docfolderData` - the docfolder `DataObject`
  Returns:
    the docfolder for the given data object.

### retrieveSubFolder

    public DocFolder retrieveSubFolder(String folderTitle)
                                throws com.arsdigita.domain.DataObjectNotFoundException

  Throws:
    `com.arsdigita.domain.DataObjectNotFoundException`

### retrieveSubResource

    public Resource retrieveSubResource(String resourceTitle)
                                 throws com.arsdigita.domain.DataObjectNotFoundException

  Throws:
    `com.arsdigita.domain.DataObjectNotFoundException`

### isFolder

    public boolean isFolder()

  Description copied from interface: `Resource`
  Tests whether this resource is a folder.

  Specified by:
    `isFolder` in interface `Resource`

### isFile

    public boolean isFile()

  Description copied from interface: `Resource`
  Tests whether this resource is a file.

  Specified by:
    `isFile` in interface `Resource`

### getTitle

    public String getTitle()

  Description copied from interface: `Resource`
  Returns the title of the file or folder corresponding to this resource. Use title instead of name to be CMS friendly

  Specified by:
    `getTitle` in interface `Resource`

### setTitle

    public void setTitle(String title)

### getDescription

    public String getDescription()

  Description copied from interface: `Resource`
  Returns a description of the resource, or null if no description has been provided.

  Specified by:
    `getDescription` in interface `Resource`

### setDescription

    public void setDescription(String description)

### copyTo

    public Resource copyTo(Resource parent)
                    throws ResourceExistsException

  Copies the resource into another location. Preserves the original name of the resource but places the copy inside a new parent resource.

  Specified by:
    `copyTo` in interface `Resource`
  Parameters:
    `parent` - the parent of the copy
  Returns:
    a copy of the original resource
  Throws:
    `ResourceExistsException`

### copyTo

    public Resource copyTo(String name,
                           Resource parent)
                    throws ResourceExistsException

  Copies the resource into another location with a new name.

  Specified by:
    `copyTo` in interface `Resource`
  Parameters:
    `name` - the name of the copy
    `parent` - the parent of the copy
  Returns:
    a copy of the original resource.
  Throws:
    `ResourceExistsException`

### copyTo

    public Resource copyTo(String name)
                    throws ResourceExistsException

  Copies the resource into the same location (same parent) with a new name.

  Specified by:
    `copyTo` in interface `Resource`
  Parameters:
    `name` - the name of the copy
  Returns:
    a copy of the original resource.
  Throws:
    `ResourceExistsException`

### toURL

    public URL toURL()

  Description copied from interface: `Resource`
  Returns the URL corresponding to this resource.

  Specified by:
    `toURL` in interface `Resource`

### isRoot

    public boolean isRoot()

  Description copied from interface: `Resource`
  Is this the root?

  Specified by:
    `isRoot` in interface `Resource`

### getParentResource

    public Resource getParentResource()

  Description copied from interface: `Resource`
  Returns the path name of this resource's parent, or null if this resource does not have a parent.

  Specified by:
    `getParentResource` in interface `Resource`

### setParentResource

    public void setParentResource(Resource r)

  Description copied from interface: `Resource`
  Set parent object

  Specified by:
    `setParentResource` in interface `Resource`

### getRootFolder

    public static DocFolder getRootFolder(DocFolder f)

### getRepository

    public static Repository getRepository(Resource r)

Copyright (c) 2006 Red Hat, Inc. Corporation. All Rights Reserved. Generated at June 1 2006:1113 UTC