## com.arsdigita.cms.docmgr
Class DocLink

    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.ContentPage
                              com.arsdigita.cms.docmgr.DocLink

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

public class DocLink
extends com.arsdigita.cms.ContentPage
implements Resource, com.arsdigita.search.Searchable

DomainObject class which represents `DocLink`ContentType objects. A DocLink will either have an internal reference to another Document _or_ contain an external (http) URL.``

Author:
  Shashin Shinde, Crag Wolfe $Id: DocLink.java,v 1.1 2004/12/15 16:06:37 pkopunec Exp $

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

Fields inherited from class com.arsdigita.cms.ContentPage
`LAUNCH_DATE, PAGES_IN_CATEGORY, PAGES_IN_FOLDER, QUERY_CATEGORY_ID, QUERY_PAGE, QUERY_ROOT_ID, QUERY_TYPE, SUMMARY, TITLE, versionId`

Fields inherited from class com.arsdigita.cms.ContentItem
`ANCESTORS, AUDITING, CHILDREN, CONTENT_SECTION, CONTENT_TYPE, DRAFT, DRAFT_VERSION, extraXMLGenerators, LANGUAGE, LIVE, NAME, 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`

Fields inherited from interface com.arsdigita.search.intermedia.Searchable
`versionId`

Constructor Summary
`DocLink()`
`DocLink(BigDecimal id)`
`DocLink(com.arsdigita.persistence.DataObject obj)`
`DocLink(com.arsdigita.persistence.OID id)`
`DocLink(String type)`

Method Summary
`protected void` `beforeSave()`
`Resource` `copyTo(Resource parent)` Copies the resource into another location.
`Resource` `copyTo(String name)` Copies the resource into the same location (same parent) with passed in name as new name.
`Resource` `copyTo(String name, Resource parent)` Copies the resource into another location with a new name.
`void` `delete()` Delete this Link along with it's parent ContentBundle
`String` `getDescription()` Returns a description of the resource, or null if no description has been provided.
`String` `getExternalURL()`
`Date` `getLastModifiedLocal()`
`Resource` `getParentResource()` Returns the path name of this resource's parent, or null if this resource does not have a parent.
`Repository` `getRepository()`
`String` `getSearchLanguage()`
`String` `getSearchLinkText()`
`byte[]` `getSearchRawContent()` Over-ride to avoid any indexing of data for this ContentType.
`String` `getSearchUrlStub()`
`String` `getSearchXMLContent()` Over-ride to avoid any indexing of data for this ContentType.
`Document` `getTarget()`
`boolean` `isExternal()`
`boolean` `isFile()` Tests whether this resource is a file.
`boolean` `isFolder()` Tests whether this resource is a folder.
`boolean` `isRoot()` Is this the root?
`void` `setCategories(String[] catIDs)`
`void` `setDescription(String desc)`
`void` `setExternalURL(String externalURL)`
`void` `setLastModifiedLocal(Date last)`
`void` `setParentResource(Resource parent)` Set parent object
`void` `setRepository(Repository repository)`
`void` `setTarget(Document target)` Set Target Document of this Link.Also set's the name of the Link.
`void` `setTitle(String title)`
`URL` `toURL()` Returns the URL corresponding to this resource.

Methods inherited from class com.arsdigita.cms.ContentPage
`getBaseDataObjectType, getContentBundle, getDisplayName, getLaunchDate, getPagesInSectionQuery, getPagesInSectionQuery, getPagesInSectionQuery, getPagesInSectionQuery, getSearchSummary, getTitle, setLaunchDate, setName, setPagesQueryParameters, setPagesQueryParameters`

Methods inherited from class com.arsdigita.cms.ContentItem

`addCategory, addPendingVersion, afterSave, assertDraft, assertLive, assertMaster, assertPending, beforeDelete, canPublishToFS, copy, copy, copyProperty, copyProperty, copyServices, copyServicesFrom, createLiveVersion, createPendingVersion, get, getCategories, getCategoryCollection, getChildren, getContentSection, getContentType, getCreationDate, getCreationIP, getCreationUser, getDraftVersion, getExtraXMLGenerators, getLanguage, getLastModifiedDate, getLastModifiedIP, getLastModifiedUser, getLifecycle, getLiveVersion, getLocale, getName, getParent, getPath, getPathInfo, getPathInfo, getPathNoJsp, getPendingVersions, getPublicVersion, getPublishListenerClassName, getVersion, getWorkingVersion, initialize, isDraftVersion, isLive, isLiveVersion, isPendingVersion, isPublished, makeCopy, promotePendingVersion, publish, publishToFS, removeCategory, removeLifecycle, removePendingVersion, republish, set, setContentSection, setContentType, setDefaultCategory, setLanguage, setLifecycle, setLive, setLiveVersion, setParent, setVersion, setVersionRecursively, unpublish, 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
`getID, getPath, getTitle, save, toString`

Methods inherited from interface com.arsdigita.search.intermedia.Searchable
`getSearchSummary`

Field Detail

### 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

### DESCRIPTION

    public static final String DESCRIPTION

See Also:
  Constant Field Values

### LAST_MOD_LOCAL

    public static final String LAST_MOD_LOCAL

See Also:
  Constant Field Values

Constructor Detail

### DocLink

    public DocLink()

### DocLink

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

### DocLink

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

### DocLink

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

### DocLink

    public DocLink(String type)

Method Detail

### 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`
  See Also:
    `Resource.getDescription()`

### setDescription

    public void setDescription(String desc)

### isExternal

    public boolean isExternal()

### getExternalURL

    public String getExternalURL()

### setExternalURL

    public void setExternalURL(String externalURL)

### getRepository

    public Repository getRepository()

### setRepository

    public void setRepository(Repository repository)

### getLastModifiedLocal

    public Date getLastModifiedLocal()

### setLastModifiedLocal

    public void setLastModifiedLocal(Date last)

### setTarget

    public void setTarget(Document target)

  Set Target Document of this Link.Also set's the name of the Link. i.e. target.getName()-LinkToxxxx

### getTarget

    public Document getTarget()

### 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`
  See Also:
    `Returns the parent `DocFolder``

### isFolder

    public boolean isFolder()

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

  Specified by:
    `isFolder` in interface `Resource`
  See Also:
    `returns false to indicate that it's not a folder.`

### isFile

    public boolean isFile()

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

  Specified by:
    `isFile` in interface `Resource`
  See Also:
    `returns true to indicate that it's a file.`

### 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 passed in name as 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`
  See Also:
    `Not Supported.throws `UnsupportedOperationException``

### setParentResource

    public void setParentResource(Resource parent)

  Description copied from interface: `Resource`
  Set parent object

  Specified by:
    `setParentResource` in interface `Resource`
  See Also:
    `Resource.setParentResource(com.arsdigita.cms.docmgr.Resource)`

### isRoot

    public boolean isRoot()

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

  Specified by:
    `isRoot` in interface `Resource`
  See Also:
    `returns false to indicate that it's not the root.`

### delete

    public void delete()
                throws com.arsdigita.persistence.PersistenceException

  Delete this Link along with it's parent ContentBundle

  Specified by:
    `delete` in interface `Resource`
  Throws:
    `com.arsdigita.persistence.PersistenceException`
  See Also:
    `DomainObject.delete()`

### getSearchXMLContent

    public String getSearchXMLContent()

  Over-ride to avoid any indexing of data for this ContentType. returns empty string;

  Specified by:
    `getSearchXMLContent` in interface `com.arsdigita.search.intermedia.Searchable`

### getSearchRawContent

    public byte[] getSearchRawContent()

  Over-ride to avoid any indexing of data for this ContentType. returns empty byte array;

  Specified by:
    `getSearchRawContent` in interface `com.arsdigita.search.intermedia.Searchable`

### setCategories

    public void setCategories(String[] catIDs)

### beforeSave

    protected void beforeSave()

### getSearchLanguage

    public String getSearchLanguage()

  Specified by:
    `getSearchLanguage` in interface `com.arsdigita.search.intermedia.Searchable`

### getSearchLinkText

    public String getSearchLinkText()

  Specified by:
    `getSearchLinkText` in interface `com.arsdigita.search.intermedia.Searchable`

### getSearchUrlStub

    public String getSearchUrlStub()

  Specified by:
    `getSearchUrlStub` in interface `com.arsdigita.search.intermedia.Searchable`

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