public class WGArea extends WGSchemaDocument implements PageHierarchyNode
Represents an area of the content database, containing content documents. Areas are treated as separated regions of the content, where each has it's own access controlling.
| Modifier and Type | Class and Description |
|---|---|
static class |
WGArea.AreaCache |
class |
WGArea.SessionData |
WGDocument.Cache, WGDocument.FakeMetaDataContext, WGDocument.SaveAction| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
META_ALLOWED_ROOTTYPES |
static java.lang.String |
META_EDITORS |
static java.lang.String |
META_READERS |
static java.lang.String |
META_ROOTPAGERESTRICTIONS |
static java.lang.String |
META_SYSTEM |
static MetaInfo |
METAINFO_ALLOWED_ROOTTYPES |
static MetaInfo |
METAINFO_EDITORS |
static MetaInfo |
METAINFO_READERS |
static MetaInfo |
METAINFO_ROOTPAGERESTRICTIONS |
static MetaInfo |
METAINFO_SYSTEM |
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 |
|---|
WGArea(WGDatabase db,
WGDocumentCore doc) |
WGArea(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
|
WGContent |
createContent()
Creates a new content as root for this area.
|
WGContent |
createContent(java.lang.Object key,
java.lang.String title)
Creates a new content object as root in this area.
|
WGStructEntry |
createRootEntry(WGContentType contentType,
java.lang.String title)
Creates a new root entry for this area.
|
WGContent |
createRootPage(WGContentType contentType,
java.lang.String title)
Variant of
createRootPage(WGContentType, String, String) that always uses default language. |
WGContent |
createRootPage(WGContentType contentType,
java.lang.String title,
java.lang.String language)
Creates a new root page, including struct entry and content.
|
java.util.List<java.lang.String> |
getAllowedRootTypes()
Returns the allowed content types for root pages on this area.
|
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.util.List |
getEditors()
Returns a list of allowed content editors in this area.
|
java.util.List |
getEffectiveEditors()
Returns the list of currently effective editors.
|
java.util.List |
getEffectiveReaders()
Returns the list of currently effective readers.
|
java.lang.String |
getName()
Returns the name of this area.
|
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.
|
WGStructEntryList |
getOrderedRootEntries(int offset,
int size,
java.lang.String orderExpression)
Returns a partial list of the root entries of this area, ordered by a special order expression
|
WGStructEntryList |
getOrderedRootEntries(java.lang.String orderExpression)
Returns a list of all root entries in this area, ordered by a special order expression
|
WGStructEntryIterator |
getOrderedRootEntryIterator(int pageSize,
java.lang.String pageOrder)
Returns an iterator over the root entries of this area, returned in a particular order
Internally the iterator fetches multiple entities at once from the backend for more performant backend retrieval processes.
|
PageHierarchyNode |
getParentNode()
Return the parent of this node in hierarchy.
|
java.util.List |
getReaders()
Returns a list of allowed readers of contents in this area.
|
WGHierarchyContentIterator |
getRootContentIterator(java.lang.String language,
int pageSize)
Returns an iterator over the root contents of area in a given language
Internally the iterator fetches multiple pages at once from the backend for more performant backend retrieval processes.
|
WGStructEntryList |
getRootEntries()
Returns a list of all root entries in this area.
|
WGStructEntryList |
getRootEntries(int offset,
int size)
Returns a partial list of the root entries in this area.
|
int |
getRootEntryCount() |
WGStructEntryIterator |
getRootEntryIterator(int pageSize)
Returns an iterator over the root entries of this area.
|
java.lang.String |
getRootPageRestrictions()
Returns the restrictions regarding root pages on this area.
|
int |
getType()
Returns the type of this document as constant WGDocument.TYPE_...
|
boolean |
isPublic()
Tests if this area is publicly accessible, i.e. anyone can generally read its content
|
boolean |
isSystemArea()
Returns if this area is marked as being a system area, which contains no publishable content
|
boolean |
mayEditAreaChildren()
Deprecated.
Use
mayEditPages() |
boolean |
mayEditPages()
Tests if the current user is generally allowed to edit documents in this area, according to area access rights
|
boolean |
mayReadContent()
Tests if the current user may read contents in this area
|
void |
performRemoveCheck(boolean deepCheck,
WGDocument deletionRoot)
Performs a validation for removing the document at the current state, just like it actually was removed.
|
void |
performRootCreationCheck(WGContentType ct)
Checks if the current user may create a new root struct entry of the given content type.
|
void |
performRootPageCreationCheck(WGContentType ct,
WGLanguage lang)
Checks if the current user may create a new root page with the given data.
|
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 |
setAllowedRootTypes(java.util.List<java.lang.String> types)
Sets the allowed content types for root pages on this area.
|
boolean |
setEditors(java.util.List list)
Sets the allowed editors for this area.
|
boolean |
setReaders(java.util.List list)
Sets the allowed readers for this area.
|
void |
setRootPageRestrictions(java.lang.String rootPages)
Sets the restrictions regarding root pages on this area
|
void |
setSystemArea(boolean system)
Sets if this area should be marked a system area.
|
void |
visit(WGPageVisitor visitor)
Implements the visitor pattern on the page hierarchy of this area.
|
createSchemaDefinition, getSchemaDefinition, isMetaDeterminedInSchema, setMetaDatabuildDesignDocumentKey, createClone, getDescription, getDesignReference, getMediaKey, getParentLockable, isVariant, mayEditDocument, rename, rename, retrieveCore, setDescriptionafterSave, attachAllFiles, attachAllFiles, attachFile, attachFile, attachFile, attachFileWithoutAnnotation, attachFileWithoutAnnotation, autoSave, buildDocumentKey, createFileDerivate, createFileDerivate, docTypeClassToNumber, doctypeNameToNumber, doctypeNumberToClass, doctypeNumberToName, dropCache, 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, 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, writeFileDerivateMetaDatapublic static final java.lang.String META_READERS
public static final MetaInfo METAINFO_READERS
public static final java.lang.String META_EDITORS
public static final MetaInfo METAINFO_EDITORS
public static final java.lang.String META_SYSTEM
public static final MetaInfo METAINFO_SYSTEM
public static final java.lang.String META_ROOTPAGERESTRICTIONS
public static final MetaInfo METAINFO_ROOTPAGERESTRICTIONS
public static final java.lang.String META_ALLOWED_ROOTTYPES
public static final MetaInfo METAINFO_ALLOWED_ROOTTYPES
public WGArea(WGDatabase db, WGDocumentCore doc) throws WGAPIException
WGAPIExceptionWGDocument.WGDocument(WGDatabase, WGDocumentCore)public WGArea(WGDatabase wgDatabase, WGDocumentCore doc, de.innovationgate.webgate.api.WGDocumentObjectFlags flags) throws WGAPIException
WGAPIExceptionpublic java.lang.String getName()
throws WGAPIException
getName in class WGDesignDocumentWGAPIExceptionpublic WGStructEntryList getRootEntries() throws WGAPIException
WGSystemExceptionWGBackendExceptionWGAPIExceptionpublic WGStructEntryIterator getRootEntryIterator(int pageSize) throws WGAPIException
pageSize - The size of retrieval pagesWGAPIExceptionpublic WGStructEntryIterator getOrderedRootEntryIterator(int pageSize, java.lang.String pageOrder) throws WGAPIException
pageSize - The size of retrieval pagespageOrder - Order expression denoting the order in which pages should be returnedWGAPIExceptionpublic WGHierarchyContentIterator getRootContentIterator(java.lang.String language, int pageSize) throws WGAPIException
pageSize - The size of retrieval pagesWGAPIExceptionpublic WGStructEntryList getRootEntries(int offset, int size) throws WGAPIException
offset - The offset of the first entry to retrieve, 0 being the first onesize - The number of entries to retrieveWGSystemExceptionWGBackendExceptionWGAPIExceptionpublic WGStructEntryList getOrderedRootEntries(int offset, int size, java.lang.String orderExpression) throws WGAPIException
offset - The offset of the first entry to retrieve, 0 being the first onesize - The number of entries to retrieveorderExpression - Page order set expressionWGAPIExceptionpublic WGStructEntryList getOrderedRootEntries(java.lang.String orderExpression) throws WGAPIException
orderExpression - Page order set expressionWGSystemExceptionWGBackendExceptionWGAPIExceptionpublic java.util.List getEditors()
throws WGAPIException
WGAPIExceptionpublic java.util.List getReaders()
throws WGAPIException
WGAPIExceptionpublic boolean setEditors(java.util.List list)
throws WGAPIException
list - WGAPIExceptionpublic boolean setReaders(java.util.List list)
throws WGAPIException
list - WGAPIExceptionpublic boolean mayEditAreaChildren()
throws WGAPIException
mayEditPages()WGAPIExceptionpublic boolean mayEditPages()
throws WGAPIException
WGAPIExceptionpublic java.util.List getEffectiveReaders()
throws WGAPIException
WGAPIExceptionpublic java.util.List getEffectiveEditors()
throws WGAPIException
WGAPIExceptionpublic WGStructEntry createRootEntry(WGContentType contentType, java.lang.String title) throws WGAPIException
contentType - The content type for this new entry.title - The title of this new entry.WGAPIExceptionpublic WGContent createRootPage(WGContentType contentType, java.lang.String title, java.lang.String language) throws WGAPIException
contentType - The content type of the pagetitle - The title of the page that will be used for both struct entrylanguage - The language of the content to create. Leave null to use databases default language.WGAPIExceptionpublic WGContent createRootPage(WGContentType contentType, java.lang.String title) throws WGAPIException
createRootPage(WGContentType, String, String) that always uses default language.contentType - title - 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 void performRemoveCheck(boolean deepCheck,
WGDocument deletionRoot)
throws WGAPIException
WGDocumentWGAuthorisationException is thrown.
For checking remove permissions without catching an exception see WGDocument.mayRemove(boolean).deepCheck - Perform an hierarchical check beyond the current document, which is more expensive but also 100% accurate. This is only effective for document types whose deletion will also delete dependent documents.WGAuthorisationExceptionWGAPIExceptionpublic WGContent createContent(java.lang.Object key, java.lang.String title) throws WGAPIException
key - The key for the new contenttitle - The title of the new contentWGAPIExceptionpublic WGContent createContent() throws WGAPIException
WGAPIExceptionpublic java.lang.Class getChildNodeType()
PageHierarchyNodegetChildNodeType in interface PageHierarchyNodepublic java.util.List<PageHierarchyNode> getChildNodes() throws WGAPIException
PageHierarchyNodegetChildNodes in interface PageHierarchyNodeWGAPIExceptionpublic de.innovationgate.utils.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 PageHierarchyNode getParentNode() throws WGAPIException
PageHierarchyNodegetParentNode in interface PageHierarchyNodeWGAPIExceptionpublic 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 void performSaveCheck()
throws ResourceIsLockedException,
WGAPIException
WGDocumentWGAuthorisationException is thrown.
For checking saving permissions without catching an exception see WGDocument.maySave().performSaveCheck in class WGSchemaDocumentWGAPIExceptionResourceIsLockedExceptionpublic void visit(WGPageVisitor visitor) throws WGAPIException
visitor - WGAPIExceptionpublic void performRootCreationCheck(WGContentType ct) throws WGAPIException
ct - The content type to use.WGAPIException - If the user may not create the document. The exception informs about the reason.public void performRootPageCreationCheck(WGContentType ct, WGLanguage lang) throws WGAPIException
ct - The content type to use for the struct entrylang - The language to use for the contentWGAPIException - If the user may not create the document. The exception informs about the reason.public int getType()
WGDocumentgetType in class WGDocumentpublic boolean isSystemArea()
throws WGAPIException
WGAPIExceptionpublic void setSystemArea(boolean system)
throws WGAPIException
system - WGAPIExceptionpublic boolean mayReadContent()
throws WGAPIException
WGAPIExceptionpublic int getRootEntryCount()
throws WGAPIException
WGAPIExceptionpublic boolean isPublic()
throws WGAPIException
WGAPIExceptionpublic java.lang.String getRootPageRestrictions()
throws WGAPIException
WGAPIExceptionpublic void setRootPageRestrictions(java.lang.String rootPages)
throws WGAPIException
rootPages - Restriction string. Use constants PAGERESTRICTION_...sWGAPIExceptionpublic java.util.List<java.lang.String> getAllowedRootTypes()
throws WGAPIException
getRootPageRestrictions() is WGDocument.PAGERESTRICTION_FIXEDTYPESWGAPIExceptionpublic void setAllowedRootTypes(java.util.List<java.lang.String> types)
throws WGAPIException
getRootPageRestrictions() is WGDocument.PAGERESTRICTION_FIXEDTYPEStypes - Names of content typesWGAPIException