public class WGContent extends WGDocument implements PageHierarchyNode
| Modifier and Type | Class and Description |
|---|---|
class |
WGContent.SessionData |
WGDocument.FakeMetaDataContext, WGDocument.SaveAction| Modifier and Type | Field and Description |
|---|---|
static java.text.DateFormat |
DATEFORMAT_HISTORY
The date format used in workflow history entries
|
static java.lang.String |
DISPLAYTYPE_NAVIGATOR
Content is hidden for navigators.
|
static java.lang.String |
DISPLAYTYPE_NONE
Content is not hidden for any navigation facility.
|
static java.lang.String |
DISPLAYTYPE_SEARCH
Content is invisible for searches
|
static java.lang.String |
DISPLAYTYPE_SITEMAP
Content is invisible in sitemaps.
|
static java.lang.String |
ITEM_PENDINGRELEASE
Item to store the "pending release" flag on non-extdata-capable content store versions lower than 5
|
static java.lang.String |
ITEM_REPLACEREASON
Item to store the replace reason comment (workflow).
|
static java.lang.String |
META_AUTHOR |
static java.lang.String |
META_BROWSERTITLE |
static java.lang.String |
META_COAUTHORS |
static java.lang.String |
META_CONTENTCLASS |
static java.lang.String |
META_DESCRIPTION |
static java.lang.String |
META_IS_HIDDEN_FROM |
static java.lang.String |
META_KEYWORDS |
static java.lang.String |
META_LANGUAGE |
static java.lang.String |
META_LASTCLIENT |
static java.lang.String |
META_LINK_TARGET |
static java.lang.String |
META_OWNER |
static java.lang.String |
META_PENDINGRELEASE |
static java.lang.String |
META_PUBLISHED |
static java.lang.String |
META_READERS |
static java.lang.String |
META_SEARCHSCORE |
static java.lang.String |
META_STATUS |
static java.lang.String |
META_STRUCTENTRY |
static java.lang.String |
META_TITLE |
static java.lang.String |
META_UNIQUE_NAME |
static java.lang.String |
META_VALID_FROM |
static java.lang.String |
META_VALID_TO |
static java.lang.String |
META_VERSION |
static java.lang.String |
META_VIRTUAL_LINK |
static java.lang.String |
META_VIRTUAL_LINK_TYPE |
static java.lang.String |
META_VISIBLE |
static java.lang.String |
META_WFHISTORY |
static MetaInfo |
METAINFO_AUTHOR |
static MetaInfo |
METAINFO_BROWSERTITLE |
static MetaInfo |
METAINFO_COAUTHORS |
static MetaInfo |
METAINFO_CONTENTCLASS |
static MetaInfo |
METAINFO_DESCRIPTION |
static MetaInfo |
METAINFO_IS_HIDDEN_FROM |
static MetaInfo |
METAINFO_KEYWORDS |
static MetaInfo |
METAINFO_LANGUAGE |
static MetaInfo |
METAINFO_LASTCLIENT |
static MetaInfo |
METAINFO_LINK_TARGET |
static MetaInfo |
METAINFO_OWNER |
static MetaInfo |
METAINFO_PENDINGRELEASE |
static MetaInfo |
METAINFO_PUBLISHED |
static MetaInfo |
METAINFO_READERS |
static MetaInfo |
METAINFO_SEARCHSCORE |
static MetaInfo |
METAINFO_STATUS |
static MetaInfo |
METAINFO_STRUCTENTRY |
static MetaInfo |
METAINFO_TITLE |
static MetaInfo |
METAINFO_UNIQUE_NAME |
static MetaInfo |
METAINFO_VALID_FROM |
static MetaInfo |
METAINFO_VALID_TO |
static MetaInfo |
METAINFO_VERSION |
static MetaInfo |
METAINFO_VIRTUAL_LINK |
static MetaInfo |
METAINFO_VIRTUAL_LINK_TYPE |
static MetaInfo |
METAINFO_VISIBLE |
static MetaInfo |
METAINFO_WFHISTORY |
static int |
RELATIONTYPE_NORMAL
Relation type that will allow deletion of targeted documents without further notice
|
static int |
RELATIONTYPE_PROTECTED
Relation type that will deny deletion of targeted documents
|
static int |
SEARCHORDER_ASCENDING
Used with WGContentNavigator to determine ascending searchorder when finding content
|
static int |
SEARCHORDER_DESCENDING
Used with WGContentNavigator to determine descending searchorder when finding content
|
static java.lang.String |
STATUS_ARCHIVE
Document is archived and no longer used.
|
static java.lang.String |
STATUS_DRAFT
Content is in status draft can be edited.
|
static java.lang.String |
STATUS_RELEASE
Content is released and shown online
|
static java.lang.String |
STATUS_REVIEW
Content is reviewed by workflow approvers
|
static java.lang.String |
SYSPROPERTY_LUCENE_KEYWORDS_AS_CONTENT
Sysproperty name to determine of metadata field
META_KEYWORDS should be included in lucenes "allcontent" field |
static java.lang.String |
VIRTUALLINKTYPE_CONTENT
Virtual link to another content in this database
|
static java.lang.String |
VIRTUALLINKTYPE_EXTERNAL
Virtual link to any URL
|
static java.lang.String |
VIRTUALLINKTYPE_EXTERNAL_FILE
Virtual link to a file on another content document
|
static java.lang.String |
VIRTUALLINKTYPE_FILE
Virtual link to a file on some file container
|
static java.lang.String |
VIRTUALLINKTYPE_INTERNAL_FILE
Virtual link to an attachment file in this document
|
static java.lang.String |
VIRTUALLINKTYPE_NOT_SPECIFIED
Link type was not specified.
|
static java.lang.String |
VIRTUALLINKTYPE_PRIMARY_FILE
Virtual link to the primary file of a content document
|
static java.lang.String |
VIRTUALLINKTYPE_UNIQUENAME
Virtual link to a document with unique name
|
CSFEATURE_EXTDATA, DERIVATE_NAME_PATTERN, DOCKEY_DIVIDER, EXT_PRIMARY_ATTACHMENT, EXTDATA_META_PREFIX, META_CREATED, META_LASTMODIFIED, META_PASTAUTHORS, META_PASTEDITDATES, META_REVISION, METAINFO_CREATED, METAINFO_LASTMODIFIED, METAINFO_PASTAUTHORS, METAINFO_PASTEDITDATES, METAINFO_REVISION, NOONE_ALLOWED, PAGERESTRICTION_ANY, PAGERESTRICTION_FIXEDTYPES, PAGERESTRICTION_NONE, PAGERESTRICTION_UNSPECIFIED, TYPE_ACLENTRY, TYPE_AREA, TYPE_CONTENT, TYPE_CONTENTTYPE, TYPE_CSSJS, TYPE_DBMETADATA, TYPE_FILECONTAINER, TYPE_FILEDERIVATE, TYPE_LANGUAGE, TYPE_STRUCTENTRY, TYPE_TML, TYPE_USERPROFILE, TYPENAME_ACLENTRY, TYPENAME_AREA, TYPENAME_CONTENT, TYPENAME_CONTENTTYPE, TYPENAME_CSSJS, TYPENAME_DBMETADATA, TYPENAME_FILECONTAINER, TYPENAME_FILEDERIVATE, TYPENAME_LANGUAGE, TYPENAME_STRUCTENTRY, TYPENAME_TML, TYPENAME_USERPROFILE| Constructor and Description |
|---|
WGContent(WGDatabase db,
WGDocumentCore doc)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addRelationToGroup(java.lang.String group,
WGContent target)
Creates a new normal relation and adds it to a relation group.
|
java.lang.String |
addRelationToGroup(java.lang.String group,
WGContent target,
int relType)
Creates a new relation and adds it to a relation group.
|
void |
approve(java.lang.String comment)
For a content document in status REVIEW, approves this document and continues the workflow.
|
void |
archive(java.lang.String comment)
For a content document in Status RELEASE archives this document immediately.
|
void |
clearRelationGroup(java.lang.String group)
Removes all relations of the given group
|
void |
clearVirtualLink()
Disables virtual link functionality for this content document and clears all fields related to it
|
WGContent |
createChildPage(WGContentType contentType,
java.lang.String title)
Creates a new child page, including struct entry and content.
|
WGDocument |
createClone(WGDatabase db,
WGDocument ref)
Creates a clone of this document in another database
|
WGContent |
createDraftCopy()
Creates a draft copy for this content that gets a new version number and starts in status "draft".
|
void |
dropCache()
Drops the cache of this document.
|
java.lang.String |
getAuthor()
Returns the name of the content author.
|
java.lang.String |
getAuthorEMail()
Returns the E-Mail address of the author of the current document
This method remains bc. of compatibility reasons.
|
java.lang.String |
getBrowserTitle()
Returns the browser title of this document, the title to be shown as for the browser window when this document is loaded
|
WGHierarchyContentIterator |
getChildContentIterator(int pageSize)
Returns an iterator over the child contents of this content
Internally the iterator fetches multiple pages at once from the backend for more performant backend retrieval processes.
|
java.util.List<WGContent> |
getChildContents()
Collects all released contents of identical language on child struct entries.
|
java.util.List<WGContent> |
getChildContents(int offset,
int size)
Collects a range of released contents of identical language on child struct entries.
|
SkippingIterator<? extends PageHierarchyNode> |
getChildNodeIterator(int pageSize)
Returns an iterator for the child nodes of this hierarchy node
|
java.util.List<PageHierarchyNode> |
getChildNodes()
Returns the child nodes of this hierarchy node
|
java.lang.Class |
getChildNodeType()
Return the class type of child nodes
|
java.util.List |
getCoauthors()
Returns the list of co-authors of this content.
|
java.lang.String |
getContentClass()
Returns the content class of this content.
|
WGContentKey |
getContentKey()
Returns the unique content key of this content document.
|
WGContentKey |
getContentKey(boolean unique)
Returns the content key of this document, either in unique mode (real version is always used) or in URL mode (0 is used as version, when document is released)
|
java.lang.String |
getDescription()
Returns a description for this content document
|
java.util.List<WGRelationData> |
getIncomingRelations()
Returns a list of relations that point the current document.
|
java.util.List<WGRelationData> |
getIncomingRelations(boolean includeUnreleased)
Returns a list of relations that point the current document
|
java.util.List<WGRelationData> |
getIncomingRelations(java.lang.String contentClass,
java.lang.String relName)
Returns a list of relations that point the current document, having a given relation name and being owned by a released content of the given content class
|
java.util.List<WGRelationData> |
getIncomingRelations(java.lang.String contentClass,
java.lang.String relName,
boolean includeUnreleased)
Returns a list of relations that point the current document, having a given relation name and being owned by a content of the given content class
|
java.util.List<WGRelationData> |
getIncomingRelations(java.lang.String contentClass,
java.lang.String relName,
boolean includeUnreleased,
java.lang.String orderExpression)
Returns a list of relations that point the current document, having a given relation name and being owned by a content of the given content class
|
java.util.List<WGRelationData> |
getIncomingRelationsOfGroup(java.lang.String contentClass,
java.lang.String relGroupName)
Returns a list of relations that point the current document, having a given relation group name and being owned by a released content of the given content class
|
java.util.List<WGRelationData> |
getIncomingRelationsOfGroup(java.lang.String contentClass,
java.lang.String relGroupName,
boolean includeUnreleased)
Returns a list of relations that point the current document, having a given relation group name and being owned by a content of the given content class
|
java.util.List<WGRelationData> |
getIncomingRelationsOfGroup(java.lang.String contentClass,
java.lang.String relGroupName,
boolean includeUnreleased,
java.lang.String orderExpression)
Returns a list of relations that point the current document, having a given relation group name and being owned by a content of the given content class
|
java.util.List<java.lang.String> |
getItemNames()
Retrieves a list of the names of all content items on this document
|
java.lang.Object |
getItemValue(java.lang.String strName)
Returns an item's value.
|
java.util.List |
getKeywords()
Returns a list of keywords for this content document to be used to identify this document in search machines.
|
WGLanguage |
getLanguage()
Returns the language of this content document.
|
java.lang.String |
getLastClient()
Returns the type of the last client that edited this content.
|
java.lang.String |
getLinkTarget()
Returns the link target of this document, i.e. the name of the frame/browser window, in which this content is displayed
when it is clicked in a navigator.
|
WGContent |
getNextContent()
Returns the next released content on the following struct entries in identical language
Starts with the immediately next struct entry and goes on with the one after that until
it finds a released content.
|
java.lang.String |
getNodeKey()
Returns a string key for the node that is unique among all keys of PageHierarchyNodes in this database.
|
java.lang.String |
getNodeTitle(java.lang.String language)
Returns the display title for the node.
|
java.lang.String |
getOwner()
Returns the name of the content owner.
|
WGContent |
getParentContent()
Returns the next released content of identical language up the struct hierarchy
This variant skips parents which have no released content in the right language and returns the first parent which has one.
|
WGContent |
getParentContent(boolean skipUnreleasedParents)
Returns the next released content of identical language up the struct hierarchy
Depending on parameter skipUnreleasedParents it only tests the immediate parent or goes further up it that one has no released content in the right language.
|
Lockable |
getParentLockable()
returns the parent lockable of this lockable for e.g.
|
PageHierarchyNode |
getParentNode()
Return the parent of this node in hierarchy.
|
WGContent |
getPreviousContent()
Returns the next released content on the previous struct entries of identical language
Starts with the immediately previous struct entry and goes on with the one before until
it finds a released content.
|
java.util.Date |
getPublished()
Returns the time when this content version was published
|
java.util.List |
getReaders()
Returns the list of allowed readers of this content.
|
WGContent |
getRelation(java.lang.String strName)
Retrieves the target content document of the given content relation
|
WGRelationData |
getRelationData(java.lang.String name)
Returns the data of a content relation
|
java.util.Set<java.lang.String> |
getRelationGroups()
Returns the names of all existing relation groups on this content document
|
java.util.List<java.lang.String> |
getRelationNames()
Returns the names of all relations that this content document holds
|
java.util.List<java.lang.String> |
getRelationNamesOfGroup(java.lang.String group)
Returns the names of all relations that belong to the given relation group
|
java.util.List<java.lang.String> |
getRelationNamesOfGroup(java.lang.String group,
java.lang.String orderExpression)
Returns the names of all relations that belong to the given relation group in a given order
|
java.util.List<WGRelationData> |
getRelationsDataOfGroup(java.lang.String group)
Returns the data of all relations that belong to the given relation group
|
java.util.List<WGRelationData> |
getRelationsDataOfGroup(java.lang.String group,
java.lang.String order)
Returns the data of all relations that belong to the given relation group in a given order
|
java.util.List<WGContent> |
getRelationsOfGroup(java.lang.String group)
Returns the target documents of all relations that belong to the given relation group
|
java.util.List<WGContent> |
getRelationsOfGroup(java.lang.String group,
java.lang.String orderExpression)
Returns the target documents of all relations that belong to the given relation group in a given order
|
WGContent |
getRootContent()
Retrieves the released content of identical language on the root entry of the current content's struct
|
SearchDetails |
getSearchDetails()
Returns detail information about the content depending on the last search
|
java.lang.Object |
getSearchExplanation()
Returns an explaination object that shows information about the choosage of this content as a query result in the most recent query.
|
float |
getSearchScore()
If the document was retrieved via query (and the db implementation supports this feature)
returns the search score of this document, i.e. a number representing how much this document matches
the search query.
|
java.util.List<WGContent> |
getSiblingContents()
Collects all released contents of identical language on sibling struct entries (including the current one)
|
java.lang.String |
getStatus()
Returns the workflow status of this content document, which is one of the constants WGContent.STATUS_...
|
java.lang.String |
getStoredStatus()
Returns the status of this content that is currently stored to the content store.
|
WGStructEntry |
getStructEntry()
Returns the struct entry, which this content document is attached to.
|
java.lang.Object |
getStructKey()
Returns the struct key for this content document, which is the key of the struct entry this content document is attached to.
|
java.lang.String |
getTitle()
Returns the title of this content document.
|
int |
getType()
Returns the type of this document as constant WGDocument.TYPE_...
|
java.lang.String |
getUniqueName()
Returns the unique key of this document, which can be used instead of the content key in an URL.
|
java.util.Date |
getValidFrom()
Returns the Date, since when this document is valid (i.e. is shown in the website) or null if no such Date is specified.
|
java.util.Date |
getValidTo()
Returns the Date, until when this document is valid (i.e. is shown in the website) or null if no such Date is specified.
|
int |
getVersion()
Returns the version number of this content document.
|
java.lang.String |
getVirtualLink()
Returns a link url, that is called instead of an URL to this content, when it is clicked in a navigator.
|
java.lang.String |
getVirtualLinkType()
Returns the type of this virtual link, which is one of the constants WGContent.VIRTUALLINKTYPE_...
|
WGWorkflow |
getWorkflow()
Retrieves the workflow object for the current content document, if it is available
|
java.util.List<java.lang.String> |
getWorkflowHistory()
Returns a list of history entries, describing the events that occured to this document in authoring workflow
|
int |
getWorkflowRole()
Returns the role of the current user in the content's current workflow state.
|
boolean |
hasCompleteRelationships()
Indicates if this content has "complete relationships", meaning it is no dummy, it has an associated language definition, a struct entry, and via this entry a content type
|
boolean |
hasItem(java.lang.String itemName)
Tests if the document has an item of this name
|
boolean |
isAuthorOrOwner()
Determines if the current user is an author of this document
|
boolean |
isAutoApprovable(WGWorkflow workflow)
Determine if the current user will auto-approve the content in the current state with the given workflow
Auto-approve should only happen when enabled, the user is a regular approver of the current workflow level (NOT just admin approver!)
|
java.util.List |
isHiddenFrom()
Returns a list of the navigation elements, where this content document should not be shown.
|
boolean |
isPendingRelease()
Returns if this document is pending for release, meaning it has passed the workflow and is waiting for an external process to publish it
|
boolean |
isPublic()
Tests if this content is publicly accessible, i.e. anyone can read its data
|
boolean |
isVirtual()
Determines, if this document is a "virtual document", i.e. if another link is shown instead of a link to this content in navigators.
|
boolean |
isVisible()
Returns the general visibility setting of this document.
|
boolean |
isVisibleFor(java.lang.String displayType)
Makes a complete test about the visibility of the content in publishing:
- Is the general visibility flag set?
|
boolean |
isVisibleNow()
Tests the general visibility of this content (see WGContent.isVisible()), and if the current settings for the "Valid from" and "Valid to" date
allow it to the visible right now.
|
boolean |
mayBePublished(boolean isAuthoringMode,
java.lang.String displayType)
A executed the static method "mayBePublished" on this content.
|
static boolean |
mayBePublished(WGContent content,
boolean isAuthoringMode,
java.lang.String displayType)
Determines, if a content may be published (visible to a user) right now, testing all necessary conditions.
|
boolean |
mayEditContent()
Tests if the current user is allowed to edit (i.e. save modifications) the current document
|
void |
performSaveCheck()
Performs a validation for saving the document at the current state, just like it actually was saved.
|
void |
publish()
For a content document in status DRAFT, set it to status REVIEW and let it enter publishing workflow.
|
void |
publish(java.lang.String comment)
For a content document in status DRAFT, set it to status REVIEW and let it enter publishing workflow.
|
void |
publish(java.lang.String comment,
java.lang.String reasonForReplacement)
For a content document in status DRAFT, set it to status REVIEW and let it enter publishing workflow.
|
void |
pushData(WGDocument newDoc)
Pushed the data of this document to another document of the same type.
|
void |
reassignVersionNumber()
Assigns a new version number to this content
Used to resolve key conflicts with contents.
|
void |
reject(java.lang.String comment)
Method reject.
|
void |
releaseImmediately(java.lang.String comment)
Releases this document immediately while exiting workflow.
|
void |
removeAllRelations()
Removes all relations from this content
|
WGContent |
removeRelation(java.lang.String name)
Removes a content relation
|
boolean |
removeRelationFromGroup(java.lang.String group,
WGContent target)
Removes the relation to a given target document from a relation group, if it contains such a relation.
|
java.lang.Object |
removeVirtualItemValue(java.lang.String name,
java.lang.Object value)
Removes an virtual item from this content document
|
WGDocumentCore |
retrieveCore()
(Re-)Retrieves the core object for this document.
|
boolean |
save(java.util.Date lastModified)
Saves changes made to this document.
|
void |
setBrowserTitle(java.lang.String title)
Sets the browser title of this document, the title to be shown as for the browser window when this document is loaded
|
boolean |
setCoauthors(java.util.List coauthors)
Sets a list of co-authors allowed to edit this content
|
void |
setContentClass(java.lang.String clazz)
Sets the content class for this content.
|
void |
setDescription(java.lang.String desc)
Set a description for this content document.
|
void |
setHiddenFrom(java.util.List hiddenFrom)
Sets the navigation elements, in that this content should not be shown.
|
void |
setKeywords(java.util.List keywords)
Sets keywords for this content to provide for internet search services.
|
boolean |
setLastClient(java.lang.String client)
Sets the last client that edited this content
|
void |
setLinkTarget(java.lang.String target)
Sets the link target of this content, i.e. the frame or browser window name, in which this content should be displayed
when clicked in a navigator.
|
void |
setOwner(java.lang.String owner)
Sets the owner of the content document
|
boolean |
setReaders(java.util.List readers)
Sets a list of readers allowed to see this content
|
WGContent |
setRelation(java.lang.String name,
WGContent target)
Sets a normal content relation to the designated target content.
|
WGContent |
setRelation(java.lang.String name,
WGContent target,
int type)
Sets a content relation to the designated target content.
|
WGContent |
setRelation(WGRelationData address)
Sets a content relation with the given data
|
void |
setSearchDetails(SearchDetails details)
Sets detail information for this document related to the last search.
|
void |
setSearchExplanation(java.lang.Object explaination)
Sets the search explanation for this document
This method is for e.g. used by lucene in 'explain' mode to give back a detail information of the scoring
|
void |
setSearchScore(float score)
Sets the search score for this document on the last fulltext search.
|
void |
setTitle(java.lang.String title)
Sets the title of this content document.
|
void |
setUniqueName(java.lang.String name)
Sets the unique name of this content document, which can be used in URLs instead of the content key.
|
void |
setValidity(java.util.Date from,
java.util.Date to)
Sets validity dates, narrowing the period of time, in which a document will be visible.
|
void |
setVirtualItemValue(java.lang.String name,
java.lang.Object value)
Sets a virtual item for this content document.
|
void |
setVirtualLink(java.lang.String type,
java.lang.String url)
Sets a virtual link for this document, making the content document a "virtual document".
|
void |
setVisible(boolean visible)
Sets the general visibility flag, choosing if this document is visible.
|
afterSave, attachAllFiles, attachAllFiles, attachFile, attachFile, attachFile, buildDocumentKey, createFileDerivate, createFileDerivate, docTypeClassToNumber, doctypeNameToNumber, doctypeNumberToClass, doctypeNumberToName, dropCore, equals, evaluateExpression, extractFile, getCore, getCoreRetrieved, getCreated, getDatabase, getDocumentKey, getDocumentKeyObj, getExpectedMetaClass, getExtdataMetaName, getExtensionData, getExtensionDataNames, getFileData, getFileDerivateData, getFileDerivateMetaData, getFileDerivates, getFileLastModified, getFileMetaData, getFileMimeType, getFileMimeTypes, getFileNames, getFileParent, getFileSize, getFileText, getFileText, getItemDate, getItemNumber, getItemText, getItemValueList, getLastModified, getLastUpdates, getLockStatus, getLockStatus, getMetaData, getMetaDataList, getMetaInfo, getMetaInfoByType, getMetaNames, getName, getNativeObject, getObjectCreated, getPastAuthors, getPastEditDates, getPersistentStore, getPrimaryFileName, getRevision, hasFile, hasFileMetadata, hashCode, isCachingEnabled, isCoreRetrieved, isDeleted, isDeleted, isDummy, isEdited, isListMeta, isSaved, isTemporary, lock, lock, markEdited, markMetaDataModified, mayRemove, mayRemove, maySave, performRemoveCheck, performRemoveCheck, remove, removeAllExtensionData, removeAllFiles, removeAllItems, removeExtensionData, removeFile, removeFileDerivate, removeItem, renameFile, resultIsFalse, resultIsTrue, save, saveQuiet, saveWithGivenTimestamps, setCachingEnabled, setItemValue, setMetaData, setMetaToDefault, setPrimaryFileName, unlock, unlock, validateMetas, validateMetas, writeExtensionData, writeFileDerivateMetaDatapublic static final java.lang.String SYSPROPERTY_LUCENE_KEYWORDS_AS_CONTENT
META_KEYWORDS should be included in lucenes "allcontent" fieldpublic static final java.lang.String STATUS_DRAFT
public static final java.lang.String STATUS_REVIEW
public static final java.lang.String STATUS_RELEASE
public static final java.lang.String STATUS_ARCHIVE
public static final java.lang.String ITEM_REPLACEREASON
public static final java.lang.String DISPLAYTYPE_NAVIGATOR
public static final java.lang.String DISPLAYTYPE_SEARCH
public static final java.lang.String DISPLAYTYPE_SITEMAP
public static final java.lang.String DISPLAYTYPE_NONE
public static final java.lang.String VIRTUALLINKTYPE_CONTENT
public static final java.lang.String VIRTUALLINKTYPE_FILE
public static final java.lang.String VIRTUALLINKTYPE_INTERNAL_FILE
public static final java.lang.String VIRTUALLINKTYPE_EXTERNAL
public static final java.lang.String VIRTUALLINKTYPE_NOT_SPECIFIED
public static final java.lang.String VIRTUALLINKTYPE_UNIQUENAME
public static final java.lang.String VIRTUALLINKTYPE_EXTERNAL_FILE
public static final java.lang.String VIRTUALLINKTYPE_PRIMARY_FILE
public static final java.text.DateFormat DATEFORMAT_HISTORY
public static final int SEARCHORDER_ASCENDING
public static final int SEARCHORDER_DESCENDING
public static final int RELATIONTYPE_NORMAL
public static final int RELATIONTYPE_PROTECTED
public static final java.lang.String META_STRUCTENTRY
public static final MetaInfo METAINFO_STRUCTENTRY
public static final java.lang.String META_TITLE
public static final MetaInfo METAINFO_TITLE
public static final java.lang.String META_BROWSERTITLE
public static final MetaInfo METAINFO_BROWSERTITLE
public static final java.lang.String META_LANGUAGE
public static final MetaInfo METAINFO_LANGUAGE
public static final java.lang.String META_STATUS
public static final MetaInfo METAINFO_STATUS
public static final java.lang.String META_VERSION
public static final MetaInfo METAINFO_VERSION
public static final java.lang.String META_UNIQUE_NAME
public static final MetaInfo METAINFO_UNIQUE_NAME
public static final java.lang.String META_IS_HIDDEN_FROM
public static final MetaInfo METAINFO_IS_HIDDEN_FROM
public static final java.lang.String META_VISIBLE
public static final MetaInfo METAINFO_VISIBLE
public static final java.lang.String META_VALID_FROM
public static final MetaInfo METAINFO_VALID_FROM
public static final java.lang.String META_VALID_TO
public static final MetaInfo METAINFO_VALID_TO
public static final java.lang.String META_CONTENTCLASS
public static final MetaInfo METAINFO_CONTENTCLASS
public static final java.lang.String META_VIRTUAL_LINK
public static final MetaInfo METAINFO_VIRTUAL_LINK
public static final java.lang.String META_VIRTUAL_LINK_TYPE
public static final MetaInfo METAINFO_VIRTUAL_LINK_TYPE
public static final java.lang.String META_LINK_TARGET
public static final MetaInfo METAINFO_LINK_TARGET
public static final java.lang.String META_KEYWORDS
public static final MetaInfo METAINFO_KEYWORDS
public static final java.lang.String META_AUTHOR
public static final MetaInfo METAINFO_AUTHOR
public static final java.lang.String META_OWNER
public static final MetaInfo METAINFO_OWNER
public static final java.lang.String META_COAUTHORS
public static final MetaInfo METAINFO_COAUTHORS
public static final java.lang.String META_SEARCHSCORE
public static final MetaInfo METAINFO_SEARCHSCORE
public static final java.lang.String META_WFHISTORY
public static final MetaInfo METAINFO_WFHISTORY
public static final java.lang.String META_DESCRIPTION
public static final MetaInfo METAINFO_DESCRIPTION
public static final java.lang.String META_READERS
public static final MetaInfo METAINFO_READERS
public static final java.lang.String META_LASTCLIENT
public static final MetaInfo METAINFO_LASTCLIENT
public static final java.lang.String META_PUBLISHED
public static final MetaInfo METAINFO_PUBLISHED
public static final java.lang.String META_PENDINGRELEASE
public static final MetaInfo METAINFO_PENDINGRELEASE
public static final java.lang.String ITEM_PENDINGRELEASE
public WGContent(WGDatabase db, WGDocumentCore doc) throws WGAPIException
WGAPIExceptionpublic WGLanguage getLanguage() throws WGAPIException
WGAPIExceptionpublic java.lang.String getTitle()
throws WGAPIException
WGAPIExceptionpublic void dropCache()
throws WGAPIException
WGDocumentdropCache in class WGDocumentWGAPIExceptionWGDocument.dropCache()public WGStructEntry getStructEntry() throws WGAPIException
WGAPIExceptionpublic java.lang.String getUniqueName()
throws WGAPIException
WGAPIExceptionpublic java.lang.String getStatus()
throws WGAPIException
WGAPIExceptionpublic boolean isVisibleFor(java.lang.String displayType)
throws WGAPIException
displayType - The navigation element to test, if this content is shown in it. Should be one of the constants WGContent.DISPLAYTYPE_...WGAPIExceptionpublic boolean isVisibleNow()
throws WGAPIException
WGAPIExceptionpublic boolean isVisible()
throws WGAPIException
WGAPIExceptionpublic java.util.Date getValidFrom()
throws WGAPIException
WGAPIExceptionpublic java.util.Date getValidTo()
throws WGAPIException
WGAPIExceptionpublic java.util.List isHiddenFrom()
throws WGAPIException
WGAPIExceptionpublic java.lang.String getVirtualLink()
throws WGAPIException
WGAPIExceptionpublic java.lang.String getVirtualLinkType()
throws WGAPIException
WGAPIExceptionpublic boolean isVirtual()
throws WGAPIException
WGAPIExceptionpublic java.lang.String getLinkTarget()
throws WGAPIException
WGAPIExceptionpublic java.lang.Object getStructKey()
throws WGAPIException
WGAPIExceptionpublic WGContentKey getContentKey(boolean unique) throws WGAPIException
unique - Determines, if the unique mode is used. If false, the URL mode is used.WGAPIExceptionpublic WGContentKey getContentKey() throws WGAPIException
WGAPIExceptionpublic int getVersion()
throws WGAPIException
WGAPIExceptionpublic WGDocumentCore retrieveCore() throws WGAPIException
WGDocumentWGAPIExceptionpublic void setTitle(java.lang.String title)
throws WGAPIException
title - WGAPIExceptionpublic void setOwner(java.lang.String owner)
throws WGAPIException
owner - WGAPIExceptionpublic java.util.List getKeywords()
throws WGAPIException
WGAPIExceptionpublic void setUniqueName(java.lang.String name)
throws WGAPIException
name - WGAPIExceptionpublic void setHiddenFrom(java.util.List hiddenFrom)
throws WGAPIException
hiddenFrom - List of navigation elements, represented as constants WGContent.DISPLAYTYPE_..., where to hide this content.
Provide empty list or null completely disable hiding.WGAPIExceptionpublic void setVisible(boolean visible)
throws WGAPIException
visible - WGAPIExceptionpublic void setValidity(java.util.Date from,
java.util.Date to)
throws WGAPIException
from - Date, from which the content will be visible (inclusive)to - Date, to which the content will be visible (inclusive)WGAPIExceptionpublic void setVirtualLink(java.lang.String type,
java.lang.String url)
throws WGAPIException
type - Type of the virtual link. Deciding how "explicit" the link url needs to be. Represented by the following constants at object WGContent:
VIRTUALLINKTYPE_CONTENT: Link to another content document. Only content key is needed as URLurl - The url given for the virtual link.WGAPIExceptionpublic void clearVirtualLink()
throws WGAPIException
WGAPIExceptionpublic void setLinkTarget(java.lang.String target)
throws WGAPIException
target - WGAPIExceptionpublic void setKeywords(java.util.List keywords)
throws WGAPIException
keywords - List of String keywordsWGAPIExceptionpublic java.lang.String getAuthor()
throws WGAPIException
WGAPIExceptionpublic java.lang.String getOwner()
throws WGAPIException
WGAPIExceptionpublic float getSearchScore()
throws WGAPIException
WGAPIExceptionpublic java.lang.Object getSearchExplanation()
throws WGClosedSessionException
WGClosedSessionExceptionpublic SearchDetails getSearchDetails() throws WGAPIException
WGAPIExceptionpublic void releaseImmediately(java.lang.String comment)
throws WGAPIException
comment - Comment for the release action.WGAPIExceptionpublic void publish(java.lang.String comment)
throws WGAPIException
comment - A comment for publishing this content.WGAPIExceptionpublic void publish()
throws WGAPIException
WGAPIExceptionpublic void publish(java.lang.String comment,
java.lang.String reasonForReplacement)
throws WGAPIException
comment - A comment for publishing this content.reasonForReplacement - If a released content allready exists, a reason for it's replacement can be set by this param. Allowes null value.WGAPIExceptionpublic boolean isAutoApprovable(WGWorkflow workflow) throws WGAPIException
workflow - The workflowWGAPIExceptionpublic void approve(java.lang.String comment)
throws WGAPIException
comment - A comment for the approval actionWGAPIExceptionpublic void reject(java.lang.String comment)
throws WGAPIException
comment - A comment for the rejectal actionWGAPIExceptionpublic void archive(java.lang.String comment)
throws WGAPIException
comment - A comment for archiving this documentWGAPIExceptionpublic boolean save(java.util.Date lastModified)
throws WGAPIException
save in class WGDocumentlastModified - Date of last modification to set (if this is supported by the implementation)WGAPIExceptionWGAuthorisationExceptionLockException - - instance of ResourceIsLockedException if a process try to modifiy a locked object without obtaining a lockWGSystemExceptionWGIllegalArgumentExceptionpublic boolean mayEditContent()
throws WGAPIException
WGAPIExceptionpublic void performSaveCheck()
throws WGAuthorisationException,
WGAPIException
WGDocumentWGAuthorisationException is thrown.
For checking saving permissions without catching an exception see WGDocument.maySave().performSaveCheck in class WGDocumentWGAPIExceptionWGAuthorisationExceptionpublic boolean isAuthorOrOwner()
throws WGAPIException
WGAPIExceptionpublic java.lang.String getDescription()
throws WGAPIException
WGAPIExceptionpublic void setDescription(java.lang.String desc)
throws WGAPIException
desc - WGAPIExceptionpublic int getWorkflowRole()
throws WGAPIException
WGAPIExceptionpublic WGWorkflow getWorkflow() throws WGAPIException
WGAPIExceptionpublic WGDocument createClone(WGDatabase db, WGDocument ref) throws WGAPIException
WGDocumentcreateClone in class WGDocumentdb - The target databaseref - A reference document in the target database. For struct
entries, this is the parent entry in the target db. For
contents this is the struct entry in the target db.WGAPIExceptionpublic void pushData(WGDocument newDoc) throws WGAPIException, WGCreationException
WGDocumentpushData in class WGDocumentnewDoc - The target document receiving the data.WGAPIException - If something goes wrongWGCreationExceptionpublic java.util.List<java.lang.String> getWorkflowHistory()
throws WGAPIException
WGAPIExceptionpublic void removeAllRelations()
throws WGAPIException
WGAPIExceptionpublic WGContent createDraftCopy() throws WGAPIException
WGAPIExceptionpublic java.util.List getReaders()
throws WGAPIException
WGAPIExceptionpublic java.util.List getCoauthors()
throws WGAPIException
WGAPIExceptionpublic boolean setReaders(java.util.List readers)
throws WGAPIException
readers - WGAPIExceptionpublic boolean setCoauthors(java.util.List coauthors)
throws WGAPIException
coauthors - WGAPIExceptionpublic boolean hasCompleteRelationships()
throws WGAPIException
WGAPIExceptionpublic java.lang.String getLastClient()
throws WGAPIException
WGAPIExceptionpublic boolean setLastClient(java.lang.String client)
throws WGAPIException
client - The client string.WGAPIExceptionpublic static boolean mayBePublished(WGContent content, boolean isAuthoringMode, java.lang.String displayType) throws WGAPIException
content - The content to testisAuthoringMode - When true, the WGAPI assumes usage by an author in some kind of authoring app (who may see any docs that are visibility protected), when false assumes usage by a web user that may see only released contentdisplayType - The display type for which the content is used. Use constants WGContent.DISPLAYTYPE_...WGAPIExceptionpublic boolean mayBePublished(boolean isAuthoringMode,
java.lang.String displayType)
throws WGAPIException
isAuthoringMode - When true, the WGAPI assumes usage by an author (who can see docs with status != published), when false assumes usage by a web user that may see only released contentdisplayType - The display type for which the content is used. Use constants WGContent.DISPLAYTYPE_...WGAPIExceptionpublic void setSearchScore(float score)
throws WGClosedSessionException
score - WGClosedSessionExceptionpublic void setSearchExplanation(java.lang.Object explaination)
throws WGClosedSessionException
explaination - WGClosedSessionExceptionpublic void setSearchDetails(SearchDetails details) throws WGClosedSessionException
details - WGClosedSessionExceptionpublic Lockable getParentLockable() throws WGAPIException
LockablegetParentLockable in interface LockablegetParentLockable in class WGDocumentWGAPIExceptionpublic WGContent getParentContent(boolean skipUnreleasedParents) throws WGAPIException
skipUnreleasedParents - Determines the behaviour when a parent has no released content. If true the parent is skipped and the method continues with the next higher parent. If false the method returns null.WGAPIExceptionpublic WGContent getParentContent() throws WGAPIException
WGAPIExceptionpublic java.util.List<WGContent> getChildContents() throws WGAPIException
WGAPIExceptionpublic java.util.List<WGContent> getChildContents(int offset, int size) throws WGAPIException
offset - The offset of the first content to retrieve, 0 being the first onesize - The number of entries to retrieveWGAPIExceptionpublic WGHierarchyContentIterator getChildContentIterator(int pageSize) throws WGAPIException
pageSize - The size of retrieval pagesWGAPIExceptionpublic java.util.List<WGContent> getSiblingContents() throws WGAPIException
WGAPIExceptionpublic WGContent createChildPage(WGContentType contentType, java.lang.String title) throws WGAPIException
contentType - The content type of the pagetitle - The title of the page that will be used for both struct entryWGAPIExceptionpublic WGContent getPreviousContent() throws WGAPIException
WGAPIExceptionpublic WGContent getNextContent() throws WGAPIException
WGAPIExceptionpublic WGContent getRelation(java.lang.String strName) throws WGAPIException
strName - Name of the relationWGAPIExceptionpublic java.util.List<java.lang.String> getRelationNames()
throws WGAPIException
WGAPIExceptionpublic WGContent setRelation(java.lang.String name, WGContent target, int type) throws WGAPIException
name - The name of the relationtarget - The relation target contenttype - The type of relation. Use constants WGContent.RELATIONTYPE_...WGAPIExceptionpublic WGContent setRelation(java.lang.String name, WGContent target) throws WGAPIException
name - The name of the relationtarget - The relation target contentWGAPIExceptionpublic WGContent setRelation(WGRelationData address) throws WGAPIException
address - The data of the relation to setWGAPIExceptionpublic WGContent removeRelation(java.lang.String name) throws WGAPIException
name - Name of the relationWGAPIExceptionpublic void setVirtualItemValue(java.lang.String name,
java.lang.Object value)
throws WGClosedSessionException
getItemValue(String).
A virtual item whose name matches a persistent item on the same document
hides this item untilthe end of the session.name - Name of the itemvalue - Value of the itemWGClosedSessionExceptionpublic java.lang.Object removeVirtualItemValue(java.lang.String name,
java.lang.Object value)
throws WGClosedSessionException
name - value - WGClosedSessionExceptionpublic java.util.List<java.lang.String> getItemNames()
throws WGAPIException
WGDocumentgetItemNames in class WGDocumentWGAPIExceptionpublic java.lang.Object getItemValue(java.lang.String strName)
throws WGAPIException
WGDocumentgetItemValue in class WGDocumentstrName - Name of the itemWGAPIExceptionpublic boolean hasItem(java.lang.String itemName)
throws WGAPIException
WGDocumenthasItem in class WGDocumentWGAPIExceptionpublic java.lang.String getContentClass()
throws WGAPIException
WGAPIExceptionpublic void setContentClass(java.lang.String clazz)
throws WGAPIException
clazz - The content class to setWGAPIExceptionpublic WGContent getRootContent() throws WGAPIException
WGAPIExceptionpublic java.util.List<PageHierarchyNode> getChildNodes() throws WGAPIException
PageHierarchyNodegetChildNodes in interface PageHierarchyNodeWGAPIExceptionpublic SkippingIterator<? extends PageHierarchyNode> getChildNodeIterator(int pageSize) throws WGAPIException
PageHierarchyNodegetChildNodeIterator in interface PageHierarchyNodepageSize - The size of a fetch page, if the implementation fetches childnodes page-wiseWGAPIExceptionpublic java.lang.Class getChildNodeType()
PageHierarchyNodegetChildNodeType in interface PageHierarchyNodepublic java.lang.String getNodeKey()
throws WGAPIException
PageHierarchyNodegetNodeKey in interface PageHierarchyNodeWGAPIExceptionpublic java.lang.String getNodeTitle(java.lang.String language)
throws WGAPIException
PageHierarchyNodegetNodeTitle in interface PageHierarchyNodelanguage - The language whose title is wantedWGAPIExceptionpublic PageHierarchyNode getParentNode() throws WGAPIException
PageHierarchyNodegetParentNode in interface PageHierarchyNodeWGAPIExceptionpublic java.util.Date getPublished()
throws WGAPIException
WGAPIExceptionpublic java.lang.String getAuthorEMail()
throws WGAPIException
getAuthor().WGAPIExceptionpublic java.util.List<WGRelationData> getIncomingRelations(boolean includeUnreleased) throws WGAPIException
includeUnreleased - Specify true to also retrieve documents in draft or approval state. False will retrieve only published documents.WGAPIExceptionpublic java.util.List<WGRelationData> getIncomingRelations(java.lang.String contentClass, java.lang.String relName, boolean includeUnreleased) throws WGAPIException
contentClass - Content class of the content owning the relations to retrieverelName - Name of the relations to retrieveincludeUnreleased - Specify true to also retrieve documents in draft or approval state. False will retrieve only published documents.WGAPIExceptionpublic java.util.List<WGRelationData> getIncomingRelations(java.lang.String contentClass, java.lang.String relName, boolean includeUnreleased, java.lang.String orderExpression) throws WGAPIException
contentClass - Content class of the content owning the relations to retrieverelName - Name of the relations to retrieveincludeUnreleased - Specify true to also retrieve documents in draft or approval state. False will retrieve only published documents.WGAPIExceptionpublic java.util.List<WGRelationData> getIncomingRelations(java.lang.String contentClass, java.lang.String relName) throws WGAPIException
contentClass - Content class of the content owning the relations to retrieverelName - Name of the relations to retrieveWGAPIExceptionpublic java.util.List<WGRelationData> getIncomingRelationsOfGroup(java.lang.String contentClass, java.lang.String relGroupName, boolean includeUnreleased) throws WGAPIException
contentClass - Content class of the content owning the relations to retrieverelGroupName - Group name of the relations to retrieveincludeUnreleased - Specify true to also retrieve documents in draft or approval state. False will retrieve only published documents.WGAPIExceptionpublic java.util.List<WGRelationData> getIncomingRelationsOfGroup(java.lang.String contentClass, java.lang.String relGroupName, boolean includeUnreleased, java.lang.String orderExpression) throws WGAPIException
contentClass - Content class of the content owning the relations to retrieverelGroupName - Group name of the relations to retrieveincludeUnreleased - Specify true to also retrieve documents in draft or approval state. False will retrieve only published documents.orderExpression - Order expression denoting the order in which to return relations, evaluated against the parent content of the relationWGAPIExceptionpublic java.util.List<WGRelationData> getIncomingRelationsOfGroup(java.lang.String contentClass, java.lang.String relGroupName) throws WGAPIException
contentClass - Content class of the content owning the relations to retrieverelGroupName - Group name of the relations to retrieveWGAPIExceptionpublic java.util.List<WGRelationData> getIncomingRelations() throws WGAPIException
WGAPIExceptionpublic WGRelationData getRelationData(java.lang.String name) throws WGAPIException
name - Name of the relationWGAPIExceptionpublic void reassignVersionNumber()
throws WGAPIException
WGAPIExceptionpublic int getType()
WGDocumentgetType in class WGDocumentpublic java.lang.String getStoredStatus()
throws WGClosedSessionException
WGClosedSessionExceptionpublic java.util.List<java.lang.String> getRelationNamesOfGroup(java.lang.String group)
throws WGAPIException
group - WGAPIExceptionpublic java.util.List<java.lang.String> getRelationNamesOfGroup(java.lang.String group,
java.lang.String orderExpression)
throws WGAPIException
group - The group nameorderExpression - Order expression denoting the order in which to return relations, evaluated against their target contentWGAPIExceptionpublic java.util.List<WGContent> getRelationsOfGroup(java.lang.String group) throws WGAPIException
group - The group to queryWGAPIExceptionpublic java.util.List<WGContent> getRelationsOfGroup(java.lang.String group, java.lang.String orderExpression) throws WGAPIException
group - The group to queryorderExpression - Order expression denoting the order in which to return relations, evaluated against their target contentWGAPIExceptionpublic java.util.List<WGRelationData> getRelationsDataOfGroup(java.lang.String group) throws WGAPIException
group - The group to queryWGAPIExceptionpublic java.util.List<WGRelationData> getRelationsDataOfGroup(java.lang.String group, java.lang.String order) throws WGAPIException
group - The group to queryorder - Order expression denoting the order in which to return relations, evaluated against their target contentWGAPIExceptionpublic java.lang.String addRelationToGroup(java.lang.String group,
WGContent target,
int relType)
throws WGAPIException
group - The group of the relation.target - The target of the relationrelType - The type of relation. Use constants RELATIONTYPE_*.WGAPIExceptionpublic boolean removeRelationFromGroup(java.lang.String group,
WGContent target)
throws WGAPIException
group - The grouptarget - The target document that should no longer be addressed by the groupWGAPIExceptionpublic java.lang.String addRelationToGroup(java.lang.String group,
WGContent target)
throws WGAPIException
addRelationToGroup(String, WGContent, int) with relation type RELATIONTYPE_NORMAL.group - The group of the relation.target - The target of the relationWGAPIExceptionpublic void clearRelationGroup(java.lang.String group)
throws WGAPIException
group - The relation group to removeWGAPIExceptionpublic java.util.Set<java.lang.String> getRelationGroups()
throws WGAPIException
WGAPIExceptionpublic boolean isPendingRelease()
throws WGAPIException
WGAPIExceptionpublic boolean isPublic()
throws WGAPIException
WGAPIExceptionpublic void setBrowserTitle(java.lang.String title)
throws WGAPIException
title - The titleWGAPIExceptionpublic java.lang.String getBrowserTitle()
throws WGAPIException
WGAPIException