public class WGContentType extends WGSchemaDocument implements PageHierarchyNode
WGDocument.Cache, 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_SCHEMADEFINITION
META_DESCRIPTION, META_DESIGNREFERENCE, META_NAME, META_VARIANT, METAINFO_DESCRIPTION, METAINFO_DESIGNREFERENCE, METAINFO_NAME, METAINFO_VARIANT
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 |
---|
WGContentType(WGDatabase db,
WGDocumentCore doc)
Constructor.
|
WGContentType(WGDatabase wgDatabase,
WGDocumentCore doc,
de.innovationgate.webgate.api.WGDocumentObjectFlags flags) |
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.
|
de.innovationgate.utils.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, setMetaData
buildDesignDocumentKey, createClone, getDescription, getDesignReference, getMediaKey, getParentLockable, isVariant, mayEditDocument, rename, rename, retrieveCore, setDescription
afterSave, attachAllFiles, attachAllFiles, attachFile, attachFile, attachFile, attachFileWithoutAnnotation, attachFileWithoutAnnotation, autoSave, buildDocumentKey, createFileDerivate, createFileDerivate, docTypeClassToNumber, doctypeNameToNumber, doctypeNumberToClass, doctypeNumberToName, dropCore, equals, evaluateExpression, 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, innerAttachFile, isCachingEnabled, isCoreRetrieved, isDeleted, isDeleted, isDummy, isEdited, isListMeta, isSaved, isTemporary, lock, lock, markEdited, markMetaDataModified, mayPushExtData, mayRemove, mayRemove, maySave, performRemoveCheck, performRemoveCheck, remove, removeAllExtensionData, removeAllFiles, removeAllItems, removeExtensionData, removeFile, removeFileDerivate, removeItem, renameFile, resultIsFalse, resultIsTrue, save, save, saveQuiet, saveWithGivenTimestamps, setCachingEnabled, setItem, setItems, setItemValue, setMeta, setMetas, setMetaToDefault, setPrimaryFileName, setValues, unlock, unlock, validateMetas, validateMetas, writeExtensionData, writeFileDerivateMetaData
public 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
WGAPIException
public WGContentType(WGDatabase wgDatabase, WGDocumentCore doc, de.innovationgate.webgate.api.WGDocumentObjectFlags flags) throws WGAPIException
WGAPIException
public void dropCache() throws WGAPIException
WGDocument
dropCache
in class WGDocument
WGAPIException
public java.lang.String getName() throws WGAPIException
getName
in class WGDesignDocument
WGAPIException
public java.lang.String getNameForLanguage(java.lang.String lang) throws WGAPIException
lang
- WGAPIException
public java.lang.String getDescriptionForLanguage(java.lang.String lang) throws WGAPIException
lang
- WGAPIException
public WGTMLModule getOuterLayout(java.lang.String mediaKey) throws WGAPIException
mediaKey
- The media key of the needed layout.WGAPIException
public java.lang.String getOuterLayoutName() throws WGAPIException
WGAPIException
public java.lang.String getInnerLayoutName() throws WGAPIException
WGAPIException
public boolean setOuterLayout(WGTMLModule mod) throws WGAPIException
mod
- The module, whose name will be taken as outer layout.WGAPIException
public boolean setOuterLayoutName(java.lang.String modName) throws WGAPIException
modName
- The name of the WebTML module representing outer layoutWGAPIException
public WGTMLModule getInnerLayout(java.lang.String mediaKey) throws WGAPIException
mediaKey
- The media key of the needed layoutWGAPIException
public boolean setInnerLayout(WGTMLModule mod) throws WGAPIException
mod
- The module, whose name will be taken as inner layout.WGAPIException
public boolean setInnerLayoutName(java.lang.String modName) throws WGAPIException
modName
- Name of the WebTML module to use for inner layoutWGAPIException
public java.util.List getEditors() throws WGAPIException
WGAPIException
public java.util.List getContentCreators() throws WGAPIException
getEditors()
. Avoid in new developments.WGAPIException
public void setEditors(java.util.List cc) throws WGAPIException
cc
- WGAPIException
public boolean setContentCreators(java.util.List cc) throws WGAPIException
setEditors(List)
. Avoid in new developments.cc
- WGAPIException
public boolean mayCreateChildEntry(WGDocument parent) throws WGAPIException
parent
- A struct entry or an area, that should be the parent for the
new entryWGAPIException
public boolean mayCreateContent() throws WGAPIException
WGAPIException
public java.lang.String getPositioning() throws WGAPIException
WGAPIException
public boolean setPositioning(java.lang.String pos) throws WGAPIException
pos
- WGAPIException
public java.util.List getAllowedPositions() throws WGAPIException
WGAPIException
public boolean setAllowedPositions(java.util.List pos) throws WGAPIException
pos
- WGAPIException
public WGDocument createClone(WGDatabase db) throws WGAPIException
WGDesignDocument
createClone
in class WGDesignDocument
db
- Target databaseWGAPIException
public void pushData(WGDocument doc) throws WGAPIException
WGDocument
pushData
in class WGDocument
doc
- The target document receiving the data.WGAPIException
- If something goes wrongpublic java.lang.String getWorkflow() throws WGAPIException
WGAPIException
public boolean setWorkflow(java.lang.String name) throws WGAPIException
name
- WGAPIException
public java.util.List getNameAliases() throws WGAPIException
WGAPIException
public boolean setNameAliases(java.util.List aliases) throws WGAPIException
aliases
- WGAPIException
public java.util.List getDescriptionAliases() throws WGAPIException
WGAPIException
public boolean setDescriptionAliases(java.util.List aliases) throws WGAPIException
aliases
- WGAPIException
public WGEventScript getEventContentCreated() throws WGAPIException
WGAPIException
public WGEventScript getEventStatusChange() throws WGAPIException
WGAPIException
public WGEventScript getEventContentSaved() throws WGAPIException
WGAPIException
public WGEventScript getEventWorkflowMail() throws WGAPIException
WGAPIException
public boolean setEventContentCreated(WGEventScript script) throws WGAPIException
script
- The script to execute for this eventWGAPIException
public boolean setEventContentSaved(WGEventScript script) throws WGAPIException
script
- The script to execute for this eventWGAPIException
public boolean setEventWorkflowMail(WGEventScript script) throws WGAPIException
script
- The script to execute for this eventWGAPIException
public boolean setEventStatusChange(WGEventScript script) throws WGAPIException
script
- The script to execute for this eventWGAPIException
public WGStructEntry getPreferredParent() throws WGAPIException
WGAPIException
public boolean setPreferredParent(WGStructEntry parent) throws WGAPIException
parent
- The parent struct entry to preferWGAPIException
public void performSaveCheck() throws ResourceIsLockedException, WGAPIException
WGDocument
WGAuthorisationException
is thrown.
For checking saving permissions without catching an exception see WGDocument.maySave()
.performSaveCheck
in class WGSchemaDocument
WGAPIException
ResourceIsLockedException
public java.util.List<PageHierarchyNode> getChildNodes() throws WGAPIException
PageHierarchyNode
getChildNodes
in interface PageHierarchyNode
WGAPIException
public de.innovationgate.utils.SkippingIterator<? extends PageHierarchyNode> getChildNodeIterator(int pageSize) throws WGAPIException
PageHierarchyNode
getChildNodeIterator
in interface PageHierarchyNode
pageSize
- The size of a fetch page, if the implementation fetches childnodes page-wiseWGAPIException
public java.lang.Class getChildNodeType()
PageHierarchyNode
getChildNodeType
in interface PageHierarchyNode
public java.lang.String getNodeKey() throws WGAPIException
PageHierarchyNode
getNodeKey
in interface PageHierarchyNode
WGAPIException
public java.lang.String getNodeTitle(java.lang.String language) throws WGAPIException
PageHierarchyNode
getNodeTitle
in interface PageHierarchyNode
language
- The language whose title is wantedWGAPIException
public PageHierarchyNode getParentNode() throws WGAPIException
PageHierarchyNode
getParentNode
in interface PageHierarchyNode
WGAPIException
public int getType()
WGDocument
getType
in class WGDocument
public boolean isAuthoring() throws WGAPIException
WGAPIException
public void setAuthoring(boolean authoring) throws WGAPIException
authoring
- WGAPIException
public java.lang.String getChildPageRestrictions() throws WGAPIException
WGAPIException
public void setChildPageRestrictions(java.lang.String childPages) throws WGAPIException
childPages
- Restriction string. Use constants PAGERESTRICTION_...WGAPIException
public java.util.List<java.lang.String> getAllowedChildTypes() throws WGAPIException
getChildPageRestrictions()
is WGDocument.PAGERESTRICTION_FIXEDTYPES
WGAPIException
public void setAllowedChildTypes(java.util.List<java.lang.String> types) throws WGAPIException
getChildPageRestrictions()
is WGDocument.PAGERESTRICTION_FIXEDTYPES
types
- Names of content typesWGAPIException