org.opencrx.kernel.document1.jdo2
Class Document

java.lang.Object
  extended by org.oasisopen.jdo2.Identifiable
      extended by org.w3c.jdo2.AbstractObject
          extended by org.opencrx.kernel.document1.jdo2.Document
All Implemented Interfaces:
Serializable, Auditee, Importer, Indexed, SecureObject, XmlExporter, Document, org.openmdx.base.cci2.BasicObject, org.openmdx.base.cci2.ContextCapable, org.openmdx.base.cci2.ExtentCapable, org.openmdx.compatibility.view1.cci2.ViewCapable

public class Document
extends org.w3c.jdo2.AbstractObject
implements Document

Class Document

See Also:
Serialized Form

Nested Class Summary
static class Document.Identity
          The object's application identity
static class Document.Slice
          Slice object hold the Document's multivalued attributes
 
Nested classes/interfaces inherited from class org.w3c.jdo2.AbstractObject
org.w3c.jdo2.AbstractObject.EmbeddedList<E>, org.w3c.jdo2.AbstractObject.EmbeddedSet<E>
 
Field Summary
static List<String> BASE_CLASS
          Define this class as base class
static List<String> CLASS
          Define the model class org::opencrx::kernel::document1::Document
 
Constructor Summary
Document()
           
 
Method Summary
 void addAttachment(boolean idIsPersistent, String id, DocumentAttachment attachment)
          Adds the specified element to the set of the values for the reference attachment.
 void addLink(boolean idIsPersistent, String id, DocumentLink link)
          Adds the specified element to the set of the values for the reference link.
 void addLock(boolean idIsPersistent, String id, DocumentLock lock)
          Adds the specified element to the set of the values for the reference lock.
 ModifySecureObjectResult addOwningGroup(PrincipalGroup group, short mode)
           
 void addPropertySet(boolean idIsPersistent, String id, PropertySet propertySet)
          Adds the specified element to the set of the values for the reference propertySet.
 void addRevision(boolean idIsPersistent, String id, DocumentRevision revision)
          Adds the specified element to the set of the values for the reference revision.
 void addToSegment(Segment segment)
          Sets a new value for the reference segment.
 void addToSegment(Segment segment, boolean idIsPersistent, String id)
          Set the object's composite association org:opencrx:kernel:document1:SegmentContainsDocument.
 CheckPermissionsResult checkPermissions(String principalName)
           
 ExportResult exportXml(String attributeFilter, String referenceFilter)
           
 org.openmdx.base.cci2.BasicObject getAccessGrantedByParent()
          Retrieves the value for the reference accessGrantedByParent.
 short getAccessLevelBrowse()
          Retrieves the value for the attribute accessLevelBrowse.
 short getAccessLevelDelete()
          Retrieves the value for the attribute accessLevelDelete.
 short getAccessLevelUpdate()
          Retrieves the value for the attribute accessLevelUpdate.
 Date getActiveOn()
          Retrieves the possibly null value for the optional attribute activeOn.
 Date getActiveUntil()
          Retrieves the possibly null value for the optional attribute activeUntil.
<T extends DocumentAttachment>
Collection<T>
getAttachment()
          Retrieves a set containing all the elements for the reference attachment.
 DocumentAttachment getAttachment(boolean idIsPersistent, String id)
          Retrieves the value for the reference attachment for the specified qualifier attribute value.
<T extends AuditEntry>
Collection<T>
getAudit()
          Retrieves a set containing all the elements for the reference audit.
 AuditEntry getAudit(boolean idIsPersistent, String id)
          Retrieves the value for the reference audit for the specified qualifier attribute value.
 String getAuthor()
          Retrieves the possibly null value for the optional attribute author.
 String getCmsClass()
          Retrieves the possibly null value for the optional attribute cmsClass.
 String getCmsDefaultLanguage()
          Retrieves the possibly null value for the optional attribute cmsDefaultLanguage.
 String getCmsLanguage()
          Retrieves the possibly null value for the optional attribute cmsLanguage.
 String getCmsMeta()
          Retrieves the possibly null value for the optional attribute cmsMeta.
 String getCmsTemplate()
          Retrieves the possibly null value for the optional attribute cmsTemplate.
 Integer getCmsTranslation()
          Retrieves the possibly null value for the optional attribute cmsTranslation.
 short getContentLanguage()
          Retrieves the value for the attribute contentLanguage.
 Integer getContentLength()
          Retrieves the possibly null value for the optional attribute contentLength.
 String getContentType()
          Retrieves the possibly null value for the optional attribute contentType.
 Date getCreatedAt()
          Retrieves the value for the attribute createdAt.
 Set<String> getCreatedBy()
          Retrieves a set containing all the elements for the attribute createdBy.
 String getDescription()
          Retrieves the possibly null value for the optional attribute description.
 String getDocumentAbstract()
          Retrieves the possibly null value for the optional attribute documentAbstract.
 String getDocumentNumber()
          Retrieves the possibly null value for the optional attribute documentNumber.
 short getDocumentState()
          Retrieves the value for the attribute documentState.
 short getDocumentType()
          Retrieves the value for the attribute documentType.
<T extends DocumentFolder>
List<T>
getFolder()
          Retrieves the Collection of objects referenced by folder.
 DocumentRevision getHeadRevision()
          Retrieves the value for the reference headRevision.
 String getIdentity()
          Retrieves the value for the attribute identity.
<T extends IndexEntry>
Collection<T>
getIndexEntry()
          Retrieves a set containing all the elements for the reference indexEntry.
 IndexEntry getIndexEntry(boolean idIsPersistent, String id)
          Retrieves the value for the reference indexEntry for the specified qualifier attribute value.
 String getKeywords()
          Retrieves the possibly null value for the optional attribute keywords.
<T extends DocumentLink>
Collection<T>
getLink()
          Retrieves a set containing all the elements for the reference link.
 DocumentLink getLink(boolean idIsPersistent, String id)
          Retrieves the value for the reference link for the specified qualifier attribute value.
 short getLiteratureType()
          Retrieves the value for the attribute literatureType.
 String getLocation()
          Retrieves the possibly null value for the optional attribute location.
<T extends DocumentLock>
Collection<T>
getLock()
          Retrieves a set containing all the elements for the reference lock.
 DocumentLock getLock(boolean idIsPersistent, String id)
          Retrieves the value for the reference lock for the specified qualifier attribute value.
 Date getModifiedAt()
          Retrieves the value for the attribute modifiedAt.
 Set<String> getModifiedBy()
          Retrieves a set containing all the elements for the attribute modifiedBy.
 String getName()
          Retrieves the value for the attribute name.
 List<String> getOwner()
          Retrieves a list containing all the elements for the attribute owner.
<T extends PrincipalGroup>
List<T>
getOwningGroup()
          Retrieves the Collection of objects referenced by owningGroup.
 User getOwningUser()
          Retrieves the value for the reference owningUser.
 Document getParent()
          Retrieves the value for the reference parent.
<T extends PropertySet>
Collection<T>
getPropertySet()
          Retrieves a set containing all the elements for the reference propertySet.
 PropertySet getPropertySet(boolean idIsPersistent, String id)
          Retrieves the value for the reference propertySet for the specified qualifier attribute value.
 String getQualifiedName()
          Retrieves the possibly null value for the optional attribute qualifiedName.
<T extends DocumentRevision>
Collection<T>
getRevision()
          Retrieves a set containing all the elements for the reference revision.
 DocumentRevision getRevision(boolean idIsPersistent, String id)
          Retrieves the value for the reference revision for the specified qualifier attribute value.
 String getSearchText()
          Retrieves the possibly null value for the optional attribute searchText.
 String getTitle()
          Retrieves the possibly null value for the optional attribute title.
<T extends org.openmdx.compatibility.view1.cci2.View>
Collection<T>
getView()
          Retrieves a set containing all the elements for the reference view.
 org.openmdx.compatibility.view1.cci2.View getView(boolean namespaceIsPersistent, String namespace)
          Retrieves the value for the reference view for the specified qualifier attribute value.
 ImportResult importItem(byte[] item, String itemMimeType, String itemName, short locale)
           
static Document.Identity newIdentity(org.openmdx.base.cci2.Segment.Identity segment, boolean idIsPersistent, String id)
           
protected  org.w3c.jdo2.AbstractObject.Slice newSlice(int index)
           
protected  List<String> openmdxjdoGetClass()
          Retrieve the model class
protected  String openmdxjdoGetObjectId()
          Retrieve the object's JDO identity key
static CloseableCollection<Document> openmdxjdoGetObjectsByParent(Segment segment)
          Navigate through an object's composite association
protected  int openmdxjdoGetSize(int field)
           
protected
<E extends org.w3c.jdo2.AbstractObject.Slice>
SortedMap<Integer,E>
openmdxjdoGetSlices()
           
protected  void openmdxjdoSetSize(int field, int size)
           
static Document.Identity openmdxjdoToIdentity(org.oasisopen.spi2.ObjectId objectId)
           
 ModifySecureObjectResult removeAllOwningGroup(short mode)
           
 ModifySecureObjectResult removeOwningGroup(PrincipalGroup group, short mode)
           
 ModifySecureObjectResult setAccessLevel(short accessLevelBrowse, short accessLevelDelete, short accessLevelUpdate, short mode)
           
 void setAccessLevelBrowse(short accessLevelBrowse)
          Sets a new value for the attribute accessLevelBrowse.
 void setAccessLevelDelete(short accessLevelDelete)
          Sets a new value for the attribute accessLevelDelete.
 void setAccessLevelUpdate(short accessLevelUpdate)
          Sets a new value for the attribute accessLevelUpdate.
 void setActiveOn(Date activeOn)
          Sets a new value for the attribute activeOn.
 void setActiveUntil(Date activeUntil)
          Sets a new value for the attribute activeUntil.
 void setAuthor(String author)
          Sets a new value for the attribute author.
 void setCmsClass(String cmsClass)
          Sets a new value for the attribute cmsClass.
 void setCmsDefaultLanguage(String cmsDefaultLanguage)
          Sets a new value for the attribute cmsDefaultLanguage.
 void setCmsLanguage(String cmsLanguage)
          Sets a new value for the attribute cmsLanguage.
 void setCmsMeta(String cmsMeta)
          Sets a new value for the attribute cmsMeta.
 void setCmsTemplate(String cmsTemplate)
          Sets a new value for the attribute cmsTemplate.
 void setCmsTranslation(Integer cmsTranslation)
          Sets a new value for the attribute cmsTranslation.
 void setContentLanguage(short contentLanguage)
          Sets a new value for the attribute contentLanguage.
 void setContentLength(Integer contentLength)
          Sets a new value for the attribute contentLength.
 void setContentType(String contentType)
          Sets a new value for the attribute contentType.
 void setDescription(String description)
          Sets a new value for the attribute description.
 void setDocumentAbstract(String documentAbstract)
          Sets a new value for the attribute documentAbstract.
 void setDocumentNumber(String documentNumber)
          Sets a new value for the attribute documentNumber.
 void setDocumentState(short documentState)
          Sets a new value for the attribute documentState.
 void setDocumentType(short documentType)
          Sets a new value for the attribute documentType.
 void setHeadRevision(DocumentRevision headRevision)
          Sets a new value for the reference headRevision.
 void setKeywords(String keywords)
          Sets a new value for the attribute keywords.
 void setLiteratureType(short literatureType)
          Sets a new value for the attribute literatureType.
 void setLocation(String location)
          Sets a new value for the attribute location.
 void setName(String name)
          Sets a new value for the attribute name.
 ModifySecureObjectResult setOwningUser(short mode, User user)
           
 void setOwningUser(User owningUser)
          Sets a new value for the reference owningUser.
 void setParent(Document parent)
          Sets a new value for the reference parent.
 void setQualifiedName(String qualifiedName)
          Sets a new value for the attribute qualifiedName.
 void setSearchText(String searchText)
          Sets a new value for the attribute searchText.
 void setTitle(String title)
          Sets a new value for the attribute title.
 UpdateIndexResult updateIndex()
           
 
Methods inherited from class org.w3c.jdo2.AbstractObject
openmdxjdoClassName, openmdxjdoGetIdentityBuilder, openmdxjdoGetList, openmdxjdoGetObjectsByParent, openmdxjdoGetSet, openmdxjdoGetSparseArray, openmdxjdoNewSlice, openmdxjdoSetArray, openmdxjdoSetCollection, openmdxjdoToArray, openmdxjdoToArray, openmdxjdoValidateElement
 
Methods inherited from class org.oasisopen.jdo2.Identifiable
openmdxjdoGetObject, openmdxjdoGetObjectById, openmdxjdoGetObjectId, openmdxjdoGetObjectSet, openmdxjdoNewObjectId, openmdxjdoNewObjectId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS

public static final List<String> CLASS
Define the model class org::opencrx::kernel::document1::Document


BASE_CLASS

public static final List<String> BASE_CLASS
Define this class as base class

See Also:
Document.CLASS
Constructor Detail

Document

public Document()
Method Detail

openmdxjdoGetObjectId

protected String openmdxjdoGetObjectId()
Retrieve the object's JDO identity key

Specified by:
openmdxjdoGetObjectId in class org.oasisopen.jdo2.Identifiable
Returns:
the value of the object's JDO identity key

openmdxjdoGetSlices

protected final <E extends org.w3c.jdo2.AbstractObject.Slice> SortedMap<Integer,E> openmdxjdoGetSlices()
Overrides:
openmdxjdoGetSlices in class org.w3c.jdo2.AbstractObject

getAccessLevelDelete

public short getAccessLevelDelete()
Retrieves the value for the attribute accessLevelDelete.

Specified by:
getAccessLevelDelete in interface SecureObject
Returns:
The non-null value for attribute accessLevelDelete.

setAccessLevelDelete

public void setAccessLevelDelete(short accessLevelDelete)
Sets a new value for the attribute accessLevelDelete.

Specified by:
setAccessLevelDelete in interface SecureObject
Parameters:
accessLevelDelete - The non-null new value for attribute accessLevelDelete.

getDocumentType

public short getDocumentType()
Retrieves the value for the attribute documentType.

Specified by:
getDocumentType in interface Document
Returns:
The non-null value for attribute documentType.

setDocumentType

public void setDocumentType(short documentType)
Sets a new value for the attribute documentType.

Specified by:
setDocumentType in interface Document
Parameters:
documentType - The non-null new value for attribute documentType.

exportXml

public ExportResult exportXml(String attributeFilter,
                              String referenceFilter)
Specified by:
exportXml in interface XmlExporter

getLocation

public final String getLocation()
Retrieves the possibly null value for the optional attribute location.

Specified by:
getLocation in interface Document
Returns:
The possibly null value for attribute location.

setLocation

public void setLocation(String location)
Sets a new value for the attribute location.

Specified by:
setLocation in interface Document
Parameters:
location - The possibly null new value for attribute location.

getModifiedBy

public final Set<String> getModifiedBy()
Retrieves a set containing all the elements for the attribute modifiedBy.

Specified by:
getModifiedBy in interface org.openmdx.base.cci2.BasicObject
Returns:
A set containing all elements for this attribute.

getCmsMeta

public final String getCmsMeta()
Retrieves the possibly null value for the optional attribute cmsMeta.

Specified by:
getCmsMeta in interface Document
Returns:
The possibly null value for attribute cmsMeta.

setCmsMeta

public void setCmsMeta(String cmsMeta)
Sets a new value for the attribute cmsMeta.

Specified by:
setCmsMeta in interface Document
Parameters:
cmsMeta - The possibly null new value for attribute cmsMeta.

getContentType

public final String getContentType()
Retrieves the possibly null value for the optional attribute contentType.

Specified by:
getContentType in interface Document
Returns:
The possibly null value for attribute contentType.

setContentType

public void setContentType(String contentType)
Sets a new value for the attribute contentType.

Specified by:
setContentType in interface Document
Parameters:
contentType - The possibly null new value for attribute contentType.

getAccessLevelBrowse

public short getAccessLevelBrowse()
Retrieves the value for the attribute accessLevelBrowse.

Specified by:
getAccessLevelBrowse in interface SecureObject
Returns:
The non-null value for attribute accessLevelBrowse.

setAccessLevelBrowse

public void setAccessLevelBrowse(short accessLevelBrowse)
Sets a new value for the attribute accessLevelBrowse.

Specified by:
setAccessLevelBrowse in interface SecureObject
Parameters:
accessLevelBrowse - The non-null new value for attribute accessLevelBrowse.

getRevision

public <T extends DocumentRevision> Collection<T> getRevision()
Retrieves a set containing all the elements for the reference revision.

Specified by:
getRevision in interface Document
Returns:
A set containing all the elements for this reference.

getRevision

public DocumentRevision getRevision(boolean idIsPersistent,
                                    String id)
Retrieves the value for the reference revision for the specified qualifier attribute value.

Specified by:
getRevision in interface Document
Parameters:
idIsPersistent - Defines whether value for the qualifier is persistent or not
id - The value for the qualifier attribute that qualifies this reference.
Returns:
The possibly null value for this qualifier

addRevision

public void addRevision(boolean idIsPersistent,
                        String id,
                        DocumentRevision revision)
Adds the specified element to the set of the values for the reference revision.

Note: This is an extension to the JMI 1 standard.

Specified by:
addRevision in interface Document
Parameters:
idIsPersistent - true if id is persistent
id - The qualifier attribute value that qualifies the reference to get the element to be appended.
revision - The element to be appended.

getDescription

public final String getDescription()
Retrieves the possibly null value for the optional attribute description.

Specified by:
getDescription in interface Document
Returns:
The possibly null value for attribute description.

setDescription

public void setDescription(String description)
Sets a new value for the attribute description.

Specified by:
setDescription in interface Document
Parameters:
description - The possibly null new value for attribute description.

removeAllOwningGroup

public ModifySecureObjectResult removeAllOwningGroup(short mode)
Specified by:
removeAllOwningGroup in interface SecureObject

getDocumentNumber

public final String getDocumentNumber()
Retrieves the possibly null value for the optional attribute documentNumber.

Specified by:
getDocumentNumber in interface Document
Returns:
The possibly null value for attribute documentNumber.

setDocumentNumber

public void setDocumentNumber(String documentNumber)
Sets a new value for the attribute documentNumber.

Specified by:
setDocumentNumber in interface Document
Parameters:
documentNumber - The possibly null new value for attribute documentNumber.

setOwningUser

public ModifySecureObjectResult setOwningUser(short mode,
                                              User user)
Specified by:
setOwningUser in interface SecureObject

getContentLength

public final Integer getContentLength()
Retrieves the possibly null value for the optional attribute contentLength.

Specified by:
getContentLength in interface Document
Returns:
The possibly null value for attribute contentLength.

setContentLength

public void setContentLength(Integer contentLength)
Sets a new value for the attribute contentLength.

Specified by:
setContentLength in interface Document
Parameters:
contentLength - The possibly null new value for attribute contentLength.

getOwningGroup

public <T extends PrincipalGroup> List<T> getOwningGroup()
Retrieves the Collection of objects referenced by owningGroup.

Specified by:
getOwningGroup in interface SecureObject
Returns:
The Collection of referenced objects.

addOwningGroup

public ModifySecureObjectResult addOwningGroup(PrincipalGroup group,
                                               short mode)
Specified by:
addOwningGroup in interface SecureObject

getActiveUntil

public final Date getActiveUntil()
Retrieves the possibly null value for the optional attribute activeUntil.

Specified by:
getActiveUntil in interface Document
Returns:
The possibly null value for attribute activeUntil.

setActiveUntil

public void setActiveUntil(Date activeUntil)
Sets a new value for the attribute activeUntil.

Specified by:
setActiveUntil in interface Document
Parameters:
activeUntil - The possibly null new value for attribute activeUntil.

getKeywords

public final String getKeywords()
Retrieves the possibly null value for the optional attribute keywords.

Specified by:
getKeywords in interface Document
Returns:
The possibly null value for attribute keywords.

setKeywords

public void setKeywords(String keywords)
Sets a new value for the attribute keywords.

Specified by:
setKeywords in interface Document
Parameters:
keywords - The possibly null new value for attribute keywords.

getParent

public Document getParent()
Retrieves the value for the reference parent.

Specified by:
getParent in interface Document
Returns:
The – possibly null – value for this reference.

setParent

public void setParent(Document parent)
Sets a new value for the reference parent.

Specified by:
setParent in interface Document
Parameters:
parent - The non-null new value for this reference.

importItem

public ImportResult importItem(byte[] item,
                               String itemMimeType,
                               String itemName,
                               short locale)
Specified by:
importItem in interface Importer

removeOwningGroup

public ModifySecureObjectResult removeOwningGroup(PrincipalGroup group,
                                                  short mode)
Specified by:
removeOwningGroup in interface SecureObject

getDocumentAbstract

public final String getDocumentAbstract()
Retrieves the possibly null value for the optional attribute documentAbstract.

Specified by:
getDocumentAbstract in interface Document
Returns:
The possibly null value for attribute documentAbstract.

setDocumentAbstract

public void setDocumentAbstract(String documentAbstract)
Sets a new value for the attribute documentAbstract.

Specified by:
setDocumentAbstract in interface Document
Parameters:
documentAbstract - The possibly null new value for attribute documentAbstract.

getCmsDefaultLanguage

public final String getCmsDefaultLanguage()
Retrieves the possibly null value for the optional attribute cmsDefaultLanguage.

Specified by:
getCmsDefaultLanguage in interface Document
Returns:
The possibly null value for attribute cmsDefaultLanguage.

setCmsDefaultLanguage

public void setCmsDefaultLanguage(String cmsDefaultLanguage)
Sets a new value for the attribute cmsDefaultLanguage.

Specified by:
setCmsDefaultLanguage in interface Document
Parameters:
cmsDefaultLanguage - The possibly null new value for attribute cmsDefaultLanguage.

getCmsTemplate

public final String getCmsTemplate()
Retrieves the possibly null value for the optional attribute cmsTemplate.

Specified by:
getCmsTemplate in interface Document
Returns:
The possibly null value for attribute cmsTemplate.

setCmsTemplate

public void setCmsTemplate(String cmsTemplate)
Sets a new value for the attribute cmsTemplate.

Specified by:
setCmsTemplate in interface Document
Parameters:
cmsTemplate - The possibly null new value for attribute cmsTemplate.

getCreatedBy

public final Set<String> getCreatedBy()
Retrieves a set containing all the elements for the attribute createdBy.

Specified by:
getCreatedBy in interface org.openmdx.base.cci2.BasicObject
Returns:
A set containing all elements for this attribute.

getAccessGrantedByParent

public org.openmdx.base.cci2.BasicObject getAccessGrantedByParent()
Retrieves the value for the reference accessGrantedByParent.

Specified by:
getAccessGrantedByParent in interface SecureObject
Returns:
The – possibly null – value for this reference.

setAccessLevel

public ModifySecureObjectResult setAccessLevel(short accessLevelBrowse,
                                               short accessLevelDelete,
                                               short accessLevelUpdate,
                                               short mode)
Specified by:
setAccessLevel in interface SecureObject

getOwner

public final List<String> getOwner()
Retrieves a list containing all the elements for the attribute owner.

Specified by:
getOwner in interface SecureObject
Returns:
A list containing all elements for this attribute.

getIndexEntry

public <T extends IndexEntry> Collection<T> getIndexEntry()
Retrieves a set containing all the elements for the reference indexEntry.

Specified by:
getIndexEntry in interface Indexed
Returns:
A set containing all the elements for this reference.

getIndexEntry

public IndexEntry getIndexEntry(boolean idIsPersistent,
                                String id)
Retrieves the value for the reference indexEntry for the specified qualifier attribute value.

Specified by:
getIndexEntry in interface