## imcode.server.document
Class DocumentDomainObject

    java.lang.Object
      imcode.server.document.DocumentDomainObject

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

Direct Known Subclasses:
  FileDocumentDomainObject, HtmlDocumentDomainObject, TextDocumentDomainObject, UrlDocumentDomainObject

    public abstract class DocumentDomainObject

extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

See Also:
  Serialized Form

Nested Class Summary
`static class` `DocumentDomainObject.Attributes`

Field Summary
`protected DocumentDomainObject.Attributes` `attributes`
`static java.lang.String` `DOCUMENT_PROPERTIES__IMCMS_DOCUMENT_ALIAS`
`static int` `ID_NEW`

Constructor Summary
`DocumentDomainObject()`

Method Summary
`abstract void` `accept(DocumentVisitor documentVisitor)`
`void` `addCategoryId(int categoryId)`
`void` `addSectionId(int sectionId)`
`DocumentDomainObject` `clone()`
`boolean` `equals(java.lang.Object o)`
`static DocumentDomainObject` `fromDocumentTypeId(int documentTypeId)`
`java.util.Date` `getActualModifiedDatetime()`
`java.lang.String` `getAlias()`
`java.util.Date` `getArchivedDatetime()`
`DocumentDomainObject.Attributes` `getAttributes()`
`java.util.Set<java.lang.Integer>` `getCategoryIds()`
`java.util.Date` `getCreatedDatetime()`
`int` `getCreatorId()`
`DocumentPermissionSetTypeDomainObject` `getDocumentPermissionSetTypeForRoleId(RoleId roleId)`
`abstract DocumentTypeDomainObject` `getDocumentType()`
`int` `getDocumentTypeId()`
`LocalizedMessage` `getDocumentTypeName()`
`java.lang.String` `getHeadline()` Deprecated.
`java.lang.String` `getHeadline(I18nLanguage language)`
`I18nMeta` `getI18nMeta(I18nLanguage language)` Returns I18nMeta for a language.
`int` `getId()`
`java.util.Set` `getKeywords()` Deprecated.
`java.util.Set` `getKeywords(I18nLanguage language)` Deprecated.
`java.lang.String` `getLanguageIso639_2()`
`LifeCyclePhase` `getLifeCyclePhase()`
`java.lang.String` `getMenuImage()` Deprecated.
`java.lang.String` `getMenuImage(I18nLanguage language)`
`java.lang.String` `getMenuText()` Deprecated.
`java.lang.String` `getMenuText(I18nLanguage language)`
`Meta` `getMeta()`
`java.util.Date` `getModifiedDatetime()`
`java.lang.String` `getName()`
`DocumentPermissionSets` `getPermissionSets()`
`DocumentPermissionSets` `getPermissionSetsForNewDocuments()`
`java.util.Map<java.lang.String,java.lang.String>` `getProperties()`
`java.lang.String` `getProperty(java.lang.String key)`
`java.util.Date` `getPublicationEndDatetime()`
`java.util.Date` `getPublicationStartDatetime()`
`Document.PublicationStatus` `getPublicationStatus()`
`java.lang.Integer` `getPublisherId()`
`RoleIdToDocumentPermissionSetTypeMappings` `getRoleIdsMappedToDocumentPermissionSetTypes()`
`java.util.Set` `getSectionIds()`
`java.lang.String` `getTarget()`
`int` `hashCode()`
`boolean` `isActive()`
`boolean` `isArchived()`
`boolean` `isLinkableByOtherUsers()`
`boolean` `isLinkedForUnauthorizedUsers()`
`boolean` `isPublished()`
`boolean` `isRestrictedOneMorePrivilegedThanRestrictedTwo()`
`boolean` `isSearchDisabled()`
`void` `removeAllCategories()`
`void` `removeAllSections()`
`void` `removeCategoryId(int categoryId)`
`void` `removeProperty(java.lang.String key)`
`void` `setActualModifiedDatetime(java.util.Date modifiedDatetime)`
`void` `setAlias(java.lang.String alias)`
`void` `setArchivedDatetime(java.util.Date v)`
`void` `setAttributes(DocumentDomainObject.Attributes attributes)`
`void` `setCategoryIds(java.util.Set categoryIds)`
`void` `setCreatedDatetime(java.util.Date v)`
`void` `setCreator(UserDomainObject creator)`
`void` `setCreatorId(int creatorId)`
`void` `setDependenciesMetaIdToNull()` // TODO: refactor into visitor For legacy code support: When saving document copy as new document its dependencies metaId should be set to null.
`void` `setDocumentPermissionSetTypeForRoleId(RoleId roleId, DocumentPermissionSetTypeDomainObject permissionSetType)`
`void` `setHeadline(I18nLanguage language, java.lang.String v)`
`void` `setHeadline(java.lang.String v)` Deprecated.
`void` `setId(int v)`
`void` `setKeywords(I18nLanguage language, java.util.Set keywords)` Deprecated.
`void` `setLanguageIso639_2(java.lang.String languageIso639_2)`
`void` `setLinkableByOtherUsers(boolean linkableByOtherUsers)`
`void` `setLinkedForUnauthorizedUsers(boolean linkedForUnauthorizedUsers)`
`void` `setMenuImage(I18nLanguage language, java.lang.String v)`
`void` `setMenuText(I18nLanguage language, java.lang.String v)`
`void` `setMenuText(java.lang.String v)` Deprecated.
`void` `setMeta(Meta meta)`
`void` `setModifiedDatetime(java.util.Date v)`
`void` `setPermissionSets(DocumentPermissionSets permissionSets)`
`void` `setPermissionSetsForNew(DocumentPermissionSets permissionSetsForNew)`
`void` `setProperties(java.util.Map properties)`
`void` `setProperty(java.lang.String key, java.lang.String value)`
`void` `setPublicationEndDatetime(java.util.Date datetime)`
`void` `setPublicationStartDatetime(java.util.Date v)`
`void` `setPublicationStatus(Document.PublicationStatus status)`
`void` `setPublisher(UserDomainObject user)`
`void` `setPublisherId(java.lang.Integer publisherId)`
`void` `setRestrictedOneMorePrivilegedThanRestrictedTwo(boolean b)`
`void` `setRoleIdsMappedToDocumentPermissionSetTypes(RoleIdToDocumentPermissionSetTypeMappings roleIdToDocumentPermissionSetTypeMappings)`
`void` `setSearchDisabled(boolean searchDisabled)`
`void` `setSectionIds(java.util.Set sectionIds)`
`void` `setTarget(java.lang.String v)`

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

Field Detail

### ID_NEW

    public static final int ID_NEW

See Also:
  Constant Field Values

### DOCUMENT_PROPERTIES__IMCMS_DOCUMENT_ALIAS

    public static final java.lang.String DOCUMENT_PROPERTIES__IMCMS_DOCUMENT_ALIAS

See Also:
  Constant Field Values

### attributes

    protected DocumentDomainObject.Attributes attributes

Constructor Detail

### DocumentDomainObject

    public DocumentDomainObject()

Method Detail

### clone

    public DocumentDomainObject clone()

  Overrides:
    `clone` in class `java.lang.Object`

### fromDocumentTypeId

    public static DocumentDomainObject fromDocumentTypeId(int documentTypeId)

### getArchivedDatetime

    public java.util.Date getArchivedDatetime()

### setArchivedDatetime

    public void setArchivedDatetime(java.util.Date v)

### getCategoryIds

    public java.util.Set<java.lang.Integer> getCategoryIds()

### getCreatedDatetime

    public java.util.Date getCreatedDatetime()

### setCreatedDatetime

    public void setCreatedDatetime(java.util.Date v)

### getCreatorId

    public int getCreatorId()

### setCreatorId

    public void setCreatorId(int creatorId)

### setCreator

    public void setCreator(UserDomainObject creator)

### setAttributes

    public void setAttributes(DocumentDomainObject.Attributes attributes)

### getHeadline

    @Deprecated
    public java.lang.String getHeadline()

  Deprecated.

  Use getHeadline(I18nLanguage language) instead

### getHeadline

    public java.lang.String getHeadline(I18nLanguage language)

### setHeadline

    @Deprecated
    public void setHeadline(java.lang.String v)

  Deprecated.

### setHeadline

    public void setHeadline(I18nLanguage language,
                            java.lang.String v)

### getId

    public int getId()

### setId

    public void setId(int v)

### getMenuImage

    @Deprecated
    public java.lang.String getMenuImage()

  Deprecated.

  Use getMenuImage(I18nLanguage language) instead

### getMenuImage

    public java.lang.String getMenuImage(I18nLanguage language)

  Parameters:
    `language` -
  Returns:
    (original) menu image for language specified.

### setMenuImage

    public void setMenuImage(I18nLanguage language,
                             java.lang.String v)

### getKeywords

    @Deprecated
    public java.util.Set getKeywords()

  Deprecated.

  Unsafe method. Use getKeywords(I18nLanguage language) instead.

### getKeywords

    @Deprecated
    public java.util.Set getKeywords(I18nLanguage language)

  Deprecated.

  Returns:
    keywords

### setKeywords

    @Deprecated
    public void setKeywords(I18nLanguage language,
                                       java.util.Set keywords)

  Deprecated.

### setProperties

    public void setProperties(java.util.Map properties)

### getProperties

    public java.util.Map<java.lang.String,java.lang.String> getProperties()

### getProperty

    public java.lang.String getProperty(java.lang.String key)

### setProperty

    public void setProperty(java.lang.String key,
                            java.lang.String value)

### removeProperty

    public void removeProperty(java.lang.String key)

### getLanguageIso639_2

    public java.lang.String getLanguageIso639_2()

### setLanguageIso639_2

    public void setLanguageIso639_2(java.lang.String languageIso639_2)

### getMenuText

    @Deprecated
    public java.lang.String getMenuText()

  Deprecated.

### setMenuText

    @Deprecated
    public void setMenuText(java.lang.String v)

  Deprecated.

### getMenuText

    public java.lang.String getMenuText(I18nLanguage language)

### setMenuText

    public void setMenuText(I18nLanguage language,
                            java.lang.String v)

### getModifiedDatetime

    public java.util.Date getModifiedDatetime()

### setModifiedDatetime

    public void setModifiedDatetime(java.util.Date v)

### setActualModifiedDatetime

    public void setActualModifiedDatetime(java.util.Date modifiedDatetime)

### getActualModifiedDatetime

    public java.util.Date getActualModifiedDatetime()

### getPublicationEndDatetime

    public java.util.Date getPublicationEndDatetime()

### setPublicationEndDatetime

    public void setPublicationEndDatetime(java.util.Date datetime)

### getPublicationStartDatetime

    public java.util.Date getPublicationStartDatetime()

### setPublicationStartDatetime

    public void setPublicationStartDatetime(java.util.Date v)

### getPublisherId

    public java.lang.Integer getPublisherId()

### setPublisher

    public void setPublisher(UserDomainObject user)

### setPublisherId

    public void setPublisherId(java.lang.Integer publisherId)

### getRoleIdsMappedToDocumentPermissionSetTypes

    public RoleIdToDocumentPermissionSetTypeMappings getRoleIdsMappedToDocumentPermissionSetTypes()

### setRoleIdsMappedToDocumentPermissionSetTypes

    public void setRoleIdsMappedToDocumentPermissionSetTypes(RoleIdToDocumentPermissionSetTypeMappings roleIdToDocumentPermissionSetTypeMappings)

### getSectionIds

    public java.util.Set getSectionIds()

### setSectionIds

    public void setSectionIds(java.util.Set sectionIds)

### getPublicationStatus

    public Document.PublicationStatus getPublicationStatus()

### setPublicationStatus

    public void setPublicationStatus(Document.PublicationStatus status)

### getTarget

    public java.lang.String getTarget()

### setTarget

    public void setTarget(java.lang.String v)

### isArchived

    public boolean isArchived()

### isLinkableByOtherUsers

    public boolean isLinkableByOtherUsers()

### setLinkableByOtherUsers

    public void setLinkableByOtherUsers(boolean linkableByOtherUsers)

### isRestrictedOneMorePrivilegedThanRestrictedTwo

    public boolean isRestrictedOneMorePrivilegedThanRestrictedTwo()

### setRestrictedOneMorePrivilegedThanRestrictedTwo

    public void setRestrictedOneMorePrivilegedThanRestrictedTwo(boolean b)

### isPublished

    public boolean isPublished()

### isActive

    public boolean isActive()

### isSearchDisabled

    public boolean isSearchDisabled()

### setSearchDisabled

    public void setSearchDisabled(boolean searchDisabled)

### isLinkedForUnauthorizedUsers

    public boolean isLinkedForUnauthorizedUsers()

### setLinkedForUnauthorizedUsers

    public void setLinkedForUnauthorizedUsers(boolean linkedForUnauthorizedUsers)

### addCategoryId

    public void addCategoryId(int categoryId)

### addSectionId

    public void addSectionId(int sectionId)

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### getDocumentType

    public abstract DocumentTypeDomainObject getDocumentType()

### getDocumentTypeId

    public final int getDocumentTypeId()

### getDocumentTypeName

    public final LocalizedMessage getDocumentTypeName()

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### removeAllCategories

    public void removeAllCategories()

### removeAllSections

    public void removeAllSections()

### removeCategoryId

    public void removeCategoryId(int categoryId)

### setDocumentPermissionSetTypeForRoleId

    public void setDocumentPermissionSetTypeForRoleId(RoleId roleId,
                                                      DocumentPermissionSetTypeDomainObject permissionSetType)

### getDocumentPermissionSetTypeForRoleId

    public DocumentPermissionSetTypeDomainObject getDocumentPermissionSetTypeForRoleId(RoleId roleId)

### getPermissionSets

    public DocumentPermissionSets getPermissionSets()

### getPermissionSetsForNewDocuments

    public DocumentPermissionSets getPermissionSetsForNewDocuments()

### getAttributes

    public DocumentDomainObject.Attributes getAttributes()

### accept

    public abstract void accept(DocumentVisitor documentVisitor)

### getLifeCyclePhase

    public LifeCyclePhase getLifeCyclePhase()

### setCategoryIds

    public void setCategoryIds(java.util.Set categoryIds)

### setPermissionSets

    public void setPermissionSets(DocumentPermissionSets permissionSets)

### setPermissionSetsForNew

    public void setPermissionSetsForNew(DocumentPermissionSets permissionSetsForNew)

### getAlias

    public java.lang.String getAlias()

### setAlias

    public void setAlias(java.lang.String alias)

### getName

    public java.lang.String getName()

### getMeta

    public Meta getMeta()

### setMeta

    public void setMeta(Meta meta)

### getI18nMeta

    public I18nMeta getI18nMeta(I18nLanguage language)

  Returns I18nMeta for a language. Wraps method invocation to meta instance.

  Throws:
    `I18nException` - if wrapped method call return null.

### setDependenciesMetaIdToNull

    public void setDependenciesMetaIdToNull()

  // TODO: refactor into visitor For legacy code support: When saving document copy as new document its dependencies metaId should be set to null.

  See Also:
    `DocumentSaver.saveNewDocument`