public class WGContentType extends WGSchemaDocument implements PageHierarchyNode
WGDocument.FakeMetaDataContext, WGDocument.SaveAction| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
META_ALLOWED_CHILDTYPES |
static java.lang.String |
META_ALLOWED_POSITIONS |
static java.lang.String |
META_AUTHORING |
static java.lang.String |
META_CHILDPAGERESTRICTIONS |
static java.lang.String |
META_DESCRIPTIONALIASES |
static java.lang.String |
META_EDITORS |
static java.lang.String |
META_EVENT_CREATECONTENT |
static java.lang.String |
META_EVENT_SAVECONTENT |
static java.lang.String |
META_EVENT_STATUSCHANGE |
static java.lang.String |
META_EVENT_WORKFLOWMAIL |
static java.lang.String |
META_INNER_LAYOUT |
static java.lang.String |
META_NAMEALIASES |
static java.lang.String |
META_OUTER_LAYOUT |
static java.lang.String |
META_POSITIONING |
static java.lang.String |
META_PREFERREDPARENT |
static java.lang.String |
META_WORKFLOW |
static MetaInfo |
METAINFO_ALLOWED_CHILDTYPES |
static MetaInfo |
METAINFO_ALLOWED_POSITIONS |
static MetaInfo |
METAINFO_AUTHORING |
static MetaInfo |
METAINFO_CHILDPAGERESTRICTIONS |
static MetaInfo |
METAINFO_DESCRIPTIONALIASES |
static MetaInfo |
METAINFO_EDITORS |
static MetaInfo |
METAINFO_EVENT_CREATECONTENT |
static MetaInfo |
METAINFO_EVENT_SAVECONTENT |
static MetaInfo |
METAINFO_EVENT_STATUSCHANGE |
static MetaInfo |
METAINFO_EVENT_WORKFLOWMAIL |
static MetaInfo |
METAINFO_INNER_LAYOUT |
static MetaInfo |
METAINFO_NAMEALIASES |
static MetaInfo |
METAINFO_OUTER_LAYOUT |
static MetaInfo |
METAINFO_POSITIONING |
static MetaInfo |
METAINFO_PREFERREDPARENT |
static MetaInfo |
METAINFO_WORKFLOW |
static java.lang.String |
POSITIONING_CHILDENTRIES
Content type is allowed in all child entries
|
static java.lang.String |
POSITIONING_EVERYWHERE
Content type is allowed everywhere.
|
static java.lang.String |
POSITIONING_FIXEDPARENTS
Content type is allowed under special parent documents, specified as
allowed positions
|
static java.lang.String |
POSITIONING_FIXEDPARENTTYPES
Content type is allowed under parent documents with special content
types, specified as allowed positions
|
static java.lang.String |
POSITIONING_ROOTENTRIES
Content type is allowed in all root entries.
|
EXTDATA_SCHEMADEFINITIONMETA_DESCRIPTION, META_DESIGNREFERENCE, META_NAME, META_VARIANT, METAINFO_DESCRIPTION, METAINFO_DESIGNREFERENCE, METAINFO_NAME, METAINFO_VARIANTCSFEATURE_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 |
|---|
WGContentType(WGDatabase db,
WGDocumentCore doc)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
WGDocument |
createClone(WGDatabase db)
Creates a clone of this design document in another database
|
void |
dropCache()
Drops the cache of this document.
|
java.util.List<java.lang.String> |
getAllowedChildTypes()
Returns the allowed content types for child pages on pages of this type.
|
java.util.List |
getAllowedPositions()
Returns the list of allowed positions for content of this type.
|
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.lang.String |
getChildPageRestrictions()
Returns the restrictions regarding childpages on pages of this content type.
|
java.util.List |
getContentCreators()
Deprecated.
|
java.util.List |
getDescriptionAliases()
Returns aliases for descriptions in different languages.
|
java.lang.String |
getDescriptionForLanguage(java.lang.String lang)
Returns a content type description for the specified language.
|
java.util.List |
getEditors()
Returns a list of users allowed to edit content based on this content
type.
|
WGEventScript |
getEventContentCreated()
Retrieves the event script for event "contentCreated"
|
WGEventScript |
getEventContentSaved()
Retrieves the event script for event "contentSaved"
|
WGEventScript |
getEventStatusChange()
Retrieves the event script for event "statusChange"
|
WGEventScript |
getEventWorkflowMail()
Retrieves the event script for event "workflowMail"
|
WGTMLModule |
getInnerLayout(java.lang.String mediaKey)
Returns the inner layout for this content type.
|
java.lang.String |
getInnerLayoutName()
Returns the name of WebTML modules used as inner layouts for this content type
|
java.lang.String |
getName()
Returns the name of this content type.
|
java.util.List |
getNameAliases()
Returns the name aliases for this content type in other languages.
|
java.lang.String |
getNameForLanguage(java.lang.String lang)
Returns a content type name for the specified language.
|
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.
|
WGTMLModule |
getOuterLayout(java.lang.String mediaKey)
Returns the outer layout for this content type.
|
java.lang.String |
getOuterLayoutName()
Returns the name of WebTML modules used as outer layouts for this content type
|
PageHierarchyNode |
getParentNode()
Return the parent of this node in hierarchy.
|
java.lang.String |
getPositioning()
Returns in which positions content of this type is allowed.
|
WGStructEntry |
getPreferredParent()
Returns the preferred parent for documents of this content type.
|
int |
getType()
Returns the type of this document as constant WGDocument.TYPE_...
|
java.lang.String |
getWorkflow()
Retrieves the name of the workflow for this content type.
|
boolean |
isAuthoring()
Returns if this content type is available for authoring purposes
|
boolean |
mayCreateChildEntry(WGDocument parent)
Tests, if the user is allowed to create struct entries in this content
type for the given parent, according to this content type.
|
boolean |
mayCreateContent()
Tests if the current user may create contents for this content type.
|
void |
performSaveCheck()
Performs a validation for saving the document at the current state, just like it actually was saved.
|
void |
pushData(WGDocument doc)
Pushed the data of this document to another document of the same type.
|
void |
setAllowedChildTypes(java.util.List<java.lang.String> types)
Sets the allowed content types for child pages on pages of this type.
|
boolean |
setAllowedPositions(java.util.List pos)
Sets the allowed positions for this content type.
|
void |
setAuthoring(boolean authoring)
Sets if this content type should be available for authoring purposes.
|
void |
setChildPageRestrictions(java.lang.String childPages)
Sets the restrictions regarding childpages on pages of this content type.
|
boolean |
setContentCreators(java.util.List cc)
Deprecated.
|
boolean |
setDescriptionAliases(java.util.List aliases)
Sets the description aliases in different languages.
|
void |
setEditors(java.util.List cc)
Sets the list of allowed content creators for this content type.
|
boolean |
setEventContentCreated(WGEventScript script)
Sets the event script for event "contentCreated"
|
boolean |
setEventContentSaved(WGEventScript script)
Sets the event script for event "contentSaved"
|
boolean |
setEventStatusChange(WGEventScript script)
Sets the event script for event "statusChange"
|
boolean |
setEventWorkflowMail(WGEventScript script)
Sets the event script for event "workflowMail"
|
boolean |
setInnerLayout(WGTMLModule mod)
Sets the inner layout for this content type.
|
boolean |
setInnerLayoutName(java.lang.String modName)
Sets the inner layout for this content type by specifying the name without reference to the document
|
boolean |
setNameAliases(java.util.List aliases)
Sets the name aliases in different languages.
|
boolean |
setOuterLayout(WGTMLModule mod)
Sets the outer layout for this content type.
|
boolean |
setOuterLayoutName(java.lang.String modName)
Sets the outer layout for this content type by specifying the name without reference to the document
|
boolean |
setPositioning(java.lang.String pos)
Sets the allowed positioning of content of this content type.
|
boolean |
setPreferredParent(WGStructEntry parent)
Sets the preferred parent for documents of this content type.
|
boolean |
setWorkflow(java.lang.String name)
Sets the workflow name of this content type.
|
createSchemaDefinition, getSchemaDefinition, isMetaDeterminedInSchema, setMetaDatabuildDesignDocumentKey, createClone, getDescription, getDesignReference, getMediaKey, getParentLockable, isVariant, mayEditDocument, rename, rename, retrieveCore, setDescriptionafterSave, 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, getItemNames, getItemNumber, getItemText, getItemValue, getItemValueList, getLastModified, getLastUpdates, getLockStatus, getLockStatus, getMetaData, getMetaDataList, getMetaInfo, getMetaInfoByType, getMetaNames, getName, getNativeObject, getObjectCreated, getPastAuthors, getPastEditDates, getPersistentStore, getPrimaryFileName, getRevision, hasFile, hasFileMetadata, hashCode, hasItem, 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, save, saveQuiet, saveWithGivenTimestamps, setCachingEnabled, setItemValue, setMetaToDefault, setPrimaryFileName, unlock, unlock, validateMetas, validateMetas, writeExtensionData, writeFileDerivateMetaDatapublic static final java.lang.String POSITIONING_EVERYWHERE
public static final java.lang.String POSITIONING_ROOTENTRIES
public static final java.lang.String POSITIONING_CHILDENTRIES
public static final java.lang.String POSITIONING_FIXEDPARENTS
public static final java.lang.String POSITIONING_FIXEDPARENTTYPES
public static final java.lang.String META_WORKFLOW
public static final MetaInfo METAINFO_WORKFLOW
public static final java.lang.String META_OUTER_LAYOUT
public static final MetaInfo METAINFO_OUTER_LAYOUT
public static final java.lang.String META_INNER_LAYOUT
public static final MetaInfo METAINFO_INNER_LAYOUT
public static final java.lang.String META_EDITORS
public static final MetaInfo METAINFO_EDITORS
public static final java.lang.String META_ALLOWED_POSITIONS
public static final MetaInfo METAINFO_ALLOWED_POSITIONS
public static final java.lang.String META_POSITIONING
public static final MetaInfo METAINFO_POSITIONING
public static final java.lang.String META_CHILDPAGERESTRICTIONS
public static final MetaInfo METAINFO_CHILDPAGERESTRICTIONS
public static final java.lang.String META_ALLOWED_CHILDTYPES
public static final MetaInfo METAINFO_ALLOWED_CHILDTYPES
public static final java.lang.String META_EVENT_CREATECONTENT
public static final MetaInfo METAINFO_EVENT_CREATECONTENT
public static final java.lang.String META_EVENT_SAVECONTENT
public static final MetaInfo METAINFO_EVENT_SAVECONTENT
public static final java.lang.String META_EVENT_WORKFLOWMAIL
public static final MetaInfo METAINFO_EVENT_WORKFLOWMAIL
public static final java.lang.String META_EVENT_STATUSCHANGE
public static final MetaInfo METAINFO_EVENT_STATUSCHANGE
public static final java.lang.String META_NAMEALIASES
public static final MetaInfo METAINFO_NAMEALIASES
public static final java.lang.String META_DESCRIPTIONALIASES
public static final MetaInfo METAINFO_DESCRIPTIONALIASES
public static final java.lang.String META_PREFERREDPARENT
public static final MetaInfo METAINFO_PREFERREDPARENT
public static final java.lang.String META_AUTHORING
public static final MetaInfo METAINFO_AUTHORING
public WGContentType(WGDatabase db, WGDocumentCore doc) throws WGAPIException
WGAPIExceptionpublic void dropCache()
throws WGAPIException
WGDocumentdropCache in class WGDocumentWGAPIExceptionpublic java.lang.String getName()
throws WGAPIException
getName in class WGDesignDocumentWGAPIExceptionpublic java.lang.String getNameForLanguage(java.lang.String lang)
throws WGAPIException
lang - WGAPIExceptionpublic java.lang.String getDescriptionForLanguage(java.lang.String lang)
throws WGAPIException
lang - WGAPIExceptionpublic WGTMLModule getOuterLayout(java.lang.String mediaKey) throws WGAPIException
mediaKey - The media key of the needed layout.WGAPIExceptionpublic java.lang.String getOuterLayoutName()
throws WGAPIException
WGAPIExceptionpublic java.lang.String getInnerLayoutName()
throws WGAPIException
WGAPIExceptionpublic boolean setOuterLayout(WGTMLModule mod) throws WGAPIException
mod - The module, whose name will be taken as outer layout.WGAPIExceptionpublic boolean setOuterLayoutName(java.lang.String modName)
throws WGAPIException
modName - The name of the WebTML module representing outer layoutWGAPIExceptionpublic WGTMLModule getInnerLayout(java.lang.String mediaKey) throws WGAPIException
mediaKey - The media key of the needed layoutWGAPIExceptionpublic boolean setInnerLayout(WGTMLModule mod) throws WGAPIException
mod - The module, whose name will be taken as inner layout.WGAPIExceptionpublic boolean setInnerLayoutName(java.lang.String modName)
throws WGAPIException
modName - Name of the WebTML module to use for inner layoutWGAPIExceptionpublic java.util.List getEditors()
throws WGAPIException
WGAPIExceptionpublic java.util.List getContentCreators()
throws WGAPIException
getEditors(). Avoid in new developments.WGAPIExceptionpublic void setEditors(java.util.List cc)
throws WGAPIException
cc - WGAPIExceptionpublic boolean setContentCreators(java.util.List cc)
throws WGAPIException
setEditors(List). Avoid in new developments.cc - WGAPIExceptionpublic boolean mayCreateChildEntry(WGDocument parent) throws WGAPIException
parent - A struct entry or an area, that should be the parent for the
new entryWGAPIExceptionpublic boolean mayCreateContent()
throws WGAPIException
WGAPIExceptionpublic java.lang.String getPositioning()
throws WGAPIException
WGAPIExceptionpublic boolean setPositioning(java.lang.String pos)
throws WGAPIException
pos - WGAPIExceptionpublic java.util.List getAllowedPositions()
throws WGAPIException
WGAPIExceptionpublic boolean setAllowedPositions(java.util.List pos)
throws WGAPIException
pos - WGAPIExceptionpublic WGDocument createClone(WGDatabase db) throws WGAPIException
WGDesignDocumentcreateClone in class WGDesignDocumentdb - Target databaseWGAPIExceptionpublic void pushData(WGDocument doc) throws WGAPIException
WGDocumentpushData in class WGDocumentdoc - The target document receiving the data.WGAPIException - If something goes wrongpublic java.lang.String getWorkflow()
throws WGAPIException
WGAPIExceptionpublic boolean setWorkflow(java.lang.String name)
throws WGAPIException
name - WGAPIExceptionpublic java.util.List getNameAliases()
throws WGAPIException
WGAPIExceptionpublic boolean setNameAliases(java.util.List aliases)
throws WGAPIException
aliases - WGAPIExceptionpublic java.util.List getDescriptionAliases()
throws WGAPIException
WGAPIExceptionpublic boolean setDescriptionAliases(java.util.List aliases)
throws WGAPIException
aliases - WGAPIExceptionpublic WGEventScript getEventContentCreated() throws WGAPIException
WGAPIExceptionpublic WGEventScript getEventStatusChange() throws WGAPIException
WGAPIExceptionpublic WGEventScript getEventContentSaved() throws WGAPIException
WGAPIExceptionpublic WGEventScript getEventWorkflowMail() throws WGAPIException
WGAPIExceptionpublic boolean setEventContentCreated(WGEventScript script) throws WGAPIException
script - The script to execute for this eventWGAPIExceptionpublic boolean setEventContentSaved(WGEventScript script) throws WGAPIException
script - The script to execute for this eventWGAPIExceptionpublic boolean setEventWorkflowMail(WGEventScript script) throws WGAPIException
script - The script to execute for this eventWGAPIExceptionpublic boolean setEventStatusChange(WGEventScript script) throws WGAPIException
script - The script to execute for this eventWGAPIExceptionpublic WGStructEntry getPreferredParent() throws WGAPIException
WGAPIExceptionpublic boolean setPreferredParent(WGStructEntry parent) throws WGAPIException
parent - The parent struct entry to preferWGAPIExceptionpublic void performSaveCheck()
throws ResourceIsLockedException,
WGAPIException
WGDocumentWGAuthorisationException is thrown.
For checking saving permissions without catching an exception see WGDocument.maySave().performSaveCheck in class WGSchemaDocumentWGAPIExceptionResourceIsLockedExceptionpublic 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 int getType()
WGDocumentgetType in class WGDocumentpublic boolean isAuthoring()
throws WGAPIException
WGAPIExceptionpublic void setAuthoring(boolean authoring)
throws WGAPIException
authoring - WGAPIExceptionpublic java.lang.String getChildPageRestrictions()
throws WGAPIException
WGAPIExceptionpublic void setChildPageRestrictions(java.lang.String childPages)
throws WGAPIException
childPages - Restriction string. Use constants PAGERESTRICTION_...WGAPIExceptionpublic java.util.List<java.lang.String> getAllowedChildTypes()
throws WGAPIException
getChildPageRestrictions() is WGDocument.PAGERESTRICTION_FIXEDTYPESWGAPIExceptionpublic void setAllowedChildTypes(java.util.List<java.lang.String> types)
throws WGAPIException
getChildPageRestrictions() is WGDocument.PAGERESTRICTION_FIXEDTYPEStypes - Names of content typesWGAPIException