public class WGDatabase extends java.lang.Object implements Lockable, WGDesignChangeListener, PageHierarchyNode, AuthenticationSourceListener, WGExtensionDataContainer
Represents a WGA Database. Can be a content database, design database, repository database, user profile database or a mixture of it. The Roles of a database give info about it's contents. Can be retrieved via getRoles().
Simple use:
This is recommended, when there are is only one stream of operation to be done and the used databases will not be opened again for a time.
WGDatabase db = WGFactory.getInstance().openDatabase(dbtype, dbpath, username, password, options);
... db actions ...
db.close();
After db.close() the database object must not be used further.
Recurring and multithreaded use:
This is recommended when the opened databases should be reused at later time and/or will be used by multiple threads. This mode introduces the "database session", that will open a WGDatabase object for usage and can be closed without completely closing the database object and opened again later.
// Initial opening - Opens the database and implicitly a session too
WGDatabase db = WGFactory.getInstance().openDatabase(dbtype, dbpath, username, password, options);
... db actions ...
db.closeSession();
...
// Recurring opening - maybe in another thread using the same db object
db.openSession(username, password)
... db actions ...
db.closeSession();
...
// Final closing at the end of the program - No further WGA processing after that
db.close();
This mode not only allows the WGAPI to keep database connections but also allows for caching of field values.
Modifier and Type | Class and Description |
---|---|
static class |
WGDatabase.AccessLevel
Represents an ACL Access Level
|
static class |
WGDatabase.AccessLevelPrivilege
Represents an ACL privilege for an ACL level
|
class |
WGDatabase.AllDocumentsHierarchy |
static interface |
WGDatabase.ConnectAction |
static interface |
WGDatabase.DatabaseAction
An interface defining an action that can be execute on certain database events.
|
class |
WGDatabase.DocumentCollectionHierarchy |
class |
WGDatabase.FreeContentVersionFinder
Util class for finding the next free content version
|
class |
WGDatabase.NoItemBehaviour
Defines a behaviour for WGDatabases how they should respond to requests
for nonexistent items
|
class |
WGDatabase.QueryCacheEntry
Represents an Entry in Query cache with all neccessary info
|
class |
WGDatabase.QueryCacheKey
Represents the key of a query cache entry, containing query type, query
string and parameter
|
class |
WGDatabase.ReconfigurationAccessor |
class |
WGDatabase.SessionStatistic
Contains statistics about a WGA session.
|
class |
WGDatabase.WGCascadedTransaction |
class |
WGDatabase.WGDatabaseStatistics
Collects various statistics about this database.
|
class |
WGDatabase.WGFakeTransaction |
class |
WGDatabase.WGRealTransaction |
Modifier and Type | Field and Description |
---|---|
static int |
ACCESSLEVEL_AUTHOR
User can create content documents but has no access to content documents,
not created by him
|
static int |
ACCESSLEVEL_CHIEF_EDITOR
Full functional rights, restricted technical rights
|
static int |
ACCESSLEVEL_EDITOR
User can create new content documents, and edit existing ones that he
didn't create.
|
static int |
ACCESSLEVEL_MANAGER
Full access, creation and administration rights.
|
static int |
ACCESSLEVEL_NOACCESS
User has not access to the database.
|
static int |
ACCESSLEVEL_NOTLOGGEDIN
User nas no valid login
|
static int |
ACCESSLEVEL_READER
User can read documents but cannot create or edit them.
|
static java.util.Map<java.lang.Integer,WGDatabase.AccessLevel> |
ACCESSLEVELS
Map of all access levels.
|
static java.lang.String |
ALNAME_AUTHOR
Accesslevel-Name for ACCESSLEVEL_AUTHOR
|
static java.lang.String |
ALNAME_CHIEF_EDITOR
Accesslevel-Name for ACCESSLEVEL_CHIEF_EDITOR
|
static java.lang.String |
ALNAME_EDITOR
Accesslevel-Name for ACCESSLEVEL_EDITOR
|
static java.lang.String |
ALNAME_MANAGER
Accesslevel-Name for ACCESSLEVEL_MANAGER
|
static java.lang.String |
ALNAME_NOACCESS
Accesslevel-Name for ACCESSLEVEL_NOACCESS
|
static java.lang.String |
ALNAME_NOTLOGGEDIN
Accesslevel-Name for ACCESSLEVEL_NOTLOGGEDIN
|
static java.lang.String |
ALNAME_READER
Accesslevel-Name for ACCESSLEVEL_READER
|
static java.lang.String |
ANONYMOUS_USER
Anonymous user name
|
static java.lang.String |
ATTRIB_UPDATED
Special DB attribute that is to be set while a batch process (e.g.
|
static java.lang.String |
AUTHENTICATED_GROUP
Name of the implicit "authenticated" group holding all users that were able to authenticate themselves
|
static java.lang.String |
BACKENDSERVICE_CLEAR_CONTENT
Service to clear all areas, struct entries and content documents from the content store in one fast batch operation.
|
static java.lang.String |
BACKENDSERVICE_CLEAR_CONTENT_AND_SCHEMA
Service to clear all content (areas, structs and contents) and schema (contenttypes and language definitions) from the content store in one fast batch operation.
|
static java.lang.String |
BACKENDSERVICE_CLEAR_DATABASE
Completely clears all data from the database, including all documents, the ACL, database metadata, historylog.
|
static java.lang.String |
BACKENDSERVICE_CLEAR_USERPROFILES
Service to clear all user profiles of the personalisation database in one fast batch operation.
|
static java.lang.String |
BACKENDSERVICE_DAILY_MAINTENANCE
A backend service defining some daily maintenance operation, to execute on the first event thread run each day
|
static java.lang.String |
BACKENDSERVICE_FETCH_MULTI_CONTENT
Fetches multiple contents in one backend call by their content key
|
static java.lang.String |
BACKENDSERVICE_NEW_CONTENT_VERSION
Service to effectively determine the version number for a new content document
|
static java.lang.String |
BACKENDSERVICE_PROBE_CONTENT
Checks if a content document for a certain page exists in a given language and status
|
static java.lang.String |
BACKENDSERVICE_SELECT_PENDINGRELEASE_DOCS
Selects all documents that are pending release.
|
static java.lang.String |
COPTION_ALLOWCACHEMAINTENANCE
Defines, if incremental cache maintenance is allowed for this database.
|
static java.lang.String |
COPTION_AUTOAPPROVE
Predefined creation option, controlling if the WGA workflow should
automatically approve a document in workflow if it's publisher is also
the approver
|
static java.lang.String |
COPTION_CACHELATENCY
Determines the latency of regular caches that expire after the given time (in minutes).
|
static java.lang.String |
COPTION_CACHEOVERFLOW
Deprecated.
|
static java.lang.String |
COPTION_CACHING_ENABLED
Defines if caching is globally enabled for this database, defaults to
true.
|
static java.lang.String |
COPTION_CLUSTERED
Option to configure if this database is clustered if used in an OpenWGA server cluster
|
static java.lang.String |
COPTION_CONTENT_STORE_VERSION
Option to directly determine the content store version of this database
|
static java.lang.String |
COPTION_DBREFERENCE
Sets a db reference directly at creation time, so the WGAPI might use it
from the start
|
static java.lang.String |
COPTION_DELETIONCHECK
Defines if an online deletion check for documents should be enabled which
costs performance.
|
static java.lang.String |
COPTION_DESIGNPROVIDERTYPES
Specifies the document types that a design provider for the current db
should provide, taking a commaseparated list of typenames of design
documents.
|
static java.lang.String |
COPTION_DISABLE_CERTAUTH
Option to disable certificate authentication even when the auth module to use has certauth enabled
|
static java.lang.String |
COPTION_DOCUMENTCACHESIZE
Option to configure the maximum number of document objects to be kept in document cache
|
static java.lang.String |
COPTION_FAKE_CERTAUTH
Option to fake certificate authentication.
|
static java.lang.String |
COPTION_LEGACY_DBCP_MONITORING
Option to enable legacy DBCP 1 JMX monitoring, provided by WGA-own beans (actually only for databases using DBCP, ergo JDBC databases)
|
static java.lang.String |
COPTION_LIST_CACHE_REBUILD_THRESHOLD
Number of documents in a cache list that may need to be retrieved to rebuild the cache.
|
static java.lang.String |
COPTION_MANDATORY_READERS
Option to define users/groups/roles that should be able to read all documents no matter the contents of reader fields
|
static java.lang.String |
COPTION_MAXCORES
Predefined creation option, that defines how many "cores" (i.e. backend
documents) a session may retrieve at once.
|
static java.lang.String |
COPTION_MEMORYCACHESIZE
Deprecated.
|
static java.lang.String |
COPTION_MONITORLASTCHANGE
Predefined creation option, that determines if the LastChange-Date of
this database should be monitored to drop cache when it changes.
|
static java.lang.String |
COPTION_NAMECACHESIZE
Option to configure the maximum number of document names to be kept in name cache
|
static java.lang.String |
COPTION_NOITEMBEHAVIOUR
Determines the behaviour of this database and functionalitites that use
this database regarding the retrieval of nonexistent items.
|
static java.lang.String |
COPTION_PAGEREADERS_ENABLED
Predefined creation option, controlling if hierarchical reader fields on areas and
pages are in effect, defaulting to true.
|
static java.lang.String |
COPTION_PAGERIGHTSFILTER
Class name of a type that implements
PageRightsFilter and is to be used as this |
static java.lang.String |
COPTION_PROJECTMODE
Enables/Disables project mode.
|
static java.lang.String |
COPTION_QUERYCACHESIZE
Option to configure the maximum number of query results to be kept in query cache
|
static java.lang.String |
COPTION_READERPROFILECREATION
Determines if users at access level "READER" are allowed to create user
profiles in this database
|
static java.lang.String |
COPTION_SHAREDPOOL
Determines if this database may use a shared connection pool on servers
which have one available.
|
static java.lang.String |
COPTION_UPDATETIMEOUT
Predefined creation option, determining how many seconds the update
monitoring should pause after an update has been processed.
|
static java.lang.String |
COPTION_USERCACHELATENCY
Determines the latency of user specific caches that expire after the
given time (in minutes).
|
static java.lang.String |
COPTION_USERCACHES_ENABLED
Controls usage of user caches, which will cache user authorisation results for some time.
|
static java.lang.String |
COPTION_WORKFLOWENGINE
Predefined creation option, that determines the class name of a workflow
engine to use.
|
static java.lang.String |
COPTION_XML
Deprecated.
|
static double |
CSVERSION_NO_CONTENTSTORE
Content store version identifying a database that is no content store at all
|
static double |
CSVERSION_WGA3
Content store version identifying a content store used as of WGA version 3.0
|
static double |
CSVERSION_WGA4_1
Content store version identifying a content store used as of WGA version 4.1, including optimized file handling
|
static double |
CSVERSION_WGA5
Content store version identifying a content store used as of WGA version 5
|
static java.lang.String |
DEFAULT_MEDIAKEY
The default media key
|
static int |
DOCUMENTCACHE_SIZE_DEFAULT |
static java.lang.String |
EXTDATA_CS_SYNC_RUNNING |
static java.lang.String |
EXTDATA_DATABASE_UUID |
static java.lang.String |
EXTDATA_DERIVATE_CREATORS |
static java.lang.String |
EXTDATA_DERIVATE_REVISION |
static java.lang.String |
EXTDATA_PATCH_LEVEL |
static java.lang.String |
FEATURE_ACCEPTS_STRUCTKEYS
Controls if this implementation's newly created struct entries can accept
keys from the creator
|
static java.lang.String |
FEATURE_ACL_MANAGEABLE
ACL of this database is manageable via WGAPI
|
static java.lang.String |
FEATURE_AUTOCASCADES_DELETIONS
Automatically cascades deletions (i.e. deletes all dependent documents),
so that the WGAPI doesn't need to do that
|
static java.lang.String |
FEATURE_COMPLEXVALUES
Content database can store complex values beyond string, number an dates
and performs type checking itself
|
static java.lang.String |
FEATURE_CONTENT_FILE_DERIVATES
Determines if the database is able to store derivates to content file attachments
|
static java.lang.String |
FEATURE_CONTENT_READ_PROTECTION
Indicates if the database knows any kind of user-specific content read protection, so that content caches must be individual for every user
|
static java.lang.String |
FEATURE_CONTENT_RELATIONS
determines if the database supports real content relations
|
static java.lang.String |
FEATURE_CREATEABLE
Use the WGAPI to create a new database of this type (Method
WGFactory.createDatabase())
|
static java.lang.String |
FEATURE_DIRECT_ENTITY_READDING
Determines if the database supports removing and re-adding a subentity (item, relation, file attachments) without intermittent save
|
static java.lang.String |
FEATURE_DISABLE_META_LOWERCASING
Enabling this feature will disable the lowercasing of metadata field values for fields that normally enforce this.
|
static java.lang.String |
FEATURE_EDITABLE
Database is editable i.e. can modify data of it's backend
|
static java.lang.String |
FEATURE_EXTERNAL_AUTHENTICATION
Shows if this database relies on authentication modules for external
authentication.
|
static java.lang.String |
FEATURE_FIND_UPDATED_DOCS
Find updated documents since a cutoff date by core-method
getUpdateDocumentsSince
|
static java.lang.String |
FEATURE_FULLCONTENTFEATURES
Content database has content types, struct entries, is multilingual and
maintains content versioning, so content document creation must receive
and generate all this info.
|
static java.lang.String |
FEATURE_GENERATES_STRUCTKEYS
Controls, if this implementations's newly created struct entries can
generate their own keys
|
static java.lang.String |
FEATURE_HIERARCHICAL
Content can be navigated hierarchical / is hierarchically ordered
|
static java.lang.String |
FEATURE_LASTCHANGED
Content database maintains a last changed property, that should be
monitored to track database changes.
|
static java.lang.String |
FEATURE_LOADBALANCE
determines that the underlying core has the feature to loadbalance
connections to multiple db servers, in this case connections are by
default readonly and each db updates have to be initialized by calling
beginUpdate()
|
static java.lang.String |
FEATURE_MILLISECOND_PRECISION
determines if the database implementation has the ability to return document changes and modified dates on millisecond precision
|
static java.lang.String |
FEATURE_MULTILANGUAGE
Controls, if this implementation holds content in multiple languages
|
static java.lang.String |
FEATURE_NATIVEEXPRESSIONS
DB has a native expression language
|
static java.lang.String |
FEATURE_ORDERED_NAVIGATION_RESULTS
Determines if a database returns ordered results on hierarchy navigation methods
WGDatabaseCore.getRootEntries(WGArea, WGPageOrderSet) and WGDatabaseCore.getChildEntries(WGStructEntry, WGPageOrderSet) , allowing the fetching of partial results |
static java.lang.String |
FEATURE_PERFORMS_BACKEND_LOGIN
Controls if this implementation is able to perform a backend login, i.e. the core itself
logs in with the user's login data.
|
static java.lang.String |
FEATURE_PROVIDE_PORTLETITEM_STORAGE
Determines if a database is able to return meta
WGUserProfile.META_PORTLETITEMSTORAGE , a storage service for items of transient portlets |
static java.lang.String |
FEATURE_QUERY_PROFILES
Shows, if this implementation supports querying user profiles by method
queryUserProfileNames
|
static java.lang.String |
FEATURE_QUERYABLE
Content supports query languages.
|
static java.lang.String |
FEATURE_REDUCE_CALLBACKS
This feature instructs the WGAPI to reduce callbacks to the database on
some occassions where it is unlikely necessary to connect (Should
increase performance on implementations with slow database connections)
|
static java.lang.String |
FEATURE_RETRIEVE_ALL_CONTENTKEYS
Controls if this WGAPI implementation implements the getAllContentKeys()
method
|
static java.lang.String |
FEATURE_SELF_PERSONALIZABLE
The content store is able to also store user profiles and be its own "personalisation database"
|
static java.lang.String |
FEATURE_SESSIONTOKEN
Controls if this implementation can take session tokens for a login
|
static java.lang.String |
FEATURE_STORESVARS
Content database needs temporary storage of webtml variables in content
documents (e.g. to allow native expression languages to access them)
|
static java.lang.String |
FEATURE_TRANSACTIONS
Content database supports transactions
|
static java.lang.String |
FEATURE_UNLIMITED_CORES
Feature that will prevent the WGAPI from limiting the fetched cores for a session
Should be set for DBs where limiting on WGAPI level makes no sense
|
static java.lang.String |
FEATURE_UNPATCHEABLE
Marks databases that should not be patched, f.e. because they are read-only
|
static java.lang.String |
FEATURE_USE_OBJECTS_AS_REFERENCES
Controls the behaviour when setting object relations for newly created
objects.
|
static java.lang.String |
FEATURE_VALIDATE_ATTACHMENTS
determines if documents in this database has the ability to validate file
attachments by calling doc.validateAttachments();
|
static java.lang.String |
MASTER_USERNAME
The user name that is returned for the user of a WGA master session
|
static int |
NAMECACHE_SIZE_DEFAULT |
static java.lang.String |
PORTLETREGISTRYMODE_PERSISTENT
Portlet registry mode "persistent" where registrations are stored on the user profile and persisted.
|
static java.lang.String |
PORTLETREGISTRYMODE_TRANSIENT
Portlet registry mode "transient", where registrations are only kept for each individual request.
|
static java.lang.String |
PROFILEQUERY_TYPE_ALL
Query type for
queryUserProfileNames(String, String, Map) that retrieves all existent user profiles |
static java.util.List<java.lang.String> |
PROTECTED_DATABASE_EXTDATA
Extension data fields on the database which are no regular data and do not represent any database state and should be protected from data deletion operations
|
static int |
QUERYCACHE_SIZE_DEFAULT |
static java.lang.String |
QUERYOPTION_CACHERESULT
Cache the results of queries.
|
static java.lang.String |
QUERYOPTION_ENHANCE
Enhance the query with default settings (e.g. not to retrieve documents
that are set invisible).
|
static java.lang.String |
QUERYOPTION_EXCLUDEDOCUMENT
When set, excludes the WGContent object given as option value from the
query result
|
static java.lang.String |
QUERYOPTION_FETCHSIZE
A query option used on non-iterating query types, determining the size of a results fetch page to retrieve from the backend
|
static java.lang.String |
QUERYOPTION_LANGUAGES
Injects a priority list of languages to return in the query.
|
static java.lang.String |
QUERYOPTION_MAXRESULTS
Controls the maximum results of the query.
|
static java.lang.String |
QUERYOPTION_NATIVEOPTIONS
Takes native options for the database implementation as commaseparated
key=value-Pairs.
|
static java.lang.String |
QUERYOPTION_ONLYLANGUAGE
Set to a specific language code to reduce query results to content of
this language
|
static java.lang.String |
QUERYOPTION_ONLYRELEASED
Set to Boolean(true), to reduce query results to only released content
|
static java.lang.String |
QUERYOPTION_QUERY_PARAMETERS
This query option contains a map with query parameters, whose values
should be used by the underlying query mechanism to fill parameter parts
in the query text.
|
static java.lang.String |
QUERYOPTION_RETURNQUERY
This is an output option set by the implementation, that carries the
complete query that was executed, as it was modified by the
implementation.
|
static java.lang.String |
QUERYOPTION_ROLE
Set to the role, that this query should act as, filtering contents that
should be invisible to that role.
|
static java.lang.String |
QUERYOPTION_USEDCACHE
The occurence of this queryoption in the query parameters after the
execution of the query shows, that the result set was retrieved from
query cache
|
static java.util.Map<java.lang.Integer,WGDatabase.AccessLevel> |
REAL_ACCESSLEVELS
Map of "real" access levels, which are available for new ACLs entries
|
static java.lang.String |
ROLE_CONTENT
Database serves content and supplementary docs like content type,
language if it is a full content store
|
static java.lang.String |
ROLE_DESIGN
Database servers design documents (WebTML, CSS/JS)
|
static java.lang.String |
ROLE_REPOSITORY
Database serves file containers
|
static java.lang.String |
ROLE_USERPROFILES
Database servers user profiles
|
static java.lang.String |
SESSIONTOKEN_USER
Dummy user name that is used in openSession-Method to insert a session
token.
|
static java.lang.String |
SYSPROPERTY_MAINTAIN_OPERATIONKEYS
Java system property to enable/disable automatic operation key maintaining
|
static java.lang.String |
SYSPROPERTY_VERBOSE_BACKENDACCESS
Sysproperty to enable verbose backend access
|
static java.lang.String |
SYSPROPERTY_VERBOSE_BACKENDACCESS_DOCTYPES
Sysproperty to configure the doctypes for verbose backend access, as commaseparated typename list
|
static java.lang.String |
SYSPROPERTY_VERBOSE_CACHEMANAGEMENT
Java system property for turning on verbose cachemanagement in applog
|
static java.lang.String |
SYSPROPERTY_VERBOSE_MUTABLECLONING
Java system property for turning on verbose output when a mutable object
needs to be cloned in WGAPI
|
static java.lang.String |
UNKNOWN_REMOTE_USER
Dummy user name that is used on request based authmodules if
request.getRemoteUser() returns 'null'
|
static java.util.Set<java.lang.String> |
USER_BACKENDSERVICES
Backend services that are allowed to be called under user session
|
Modifier and Type | Method and Description |
---|---|
static WGDatabase.AccessLevel |
accessLevel(int levelCode)
Returns access level information for the given access level code
|
static int |
accessLevelCode(java.lang.String levelName)
Converts access level names WGDatabase.ALNAME_... to codes
WGDatabase.ACCESSLEVEL_...
|
static java.lang.String |
accessLevelText(int levelCode)
Converts access level access level names WGDatabase.ALNAME_... to codes
WGDatabase.ACCESSLEVEL_...
|
void |
addBackendChangeListener(WGBackendChangeListener listener)
Adds a listener for backend changes to the database
|
void |
addContentEventListener(WGContentEventListener listener)
Adds a listener for content events to the database.
|
void |
addDatabaseConnectListener(WGDatabaseConnectListener listener)
Adds a listener for the connection of this database to its backend.
|
void |
addDatabaseEventListener(WGDatabaseEventListener listener)
Registers a listerer for database events.
|
void |
addDesignChangeListener(WGDesignChangeListener changeListener)
Adds a design change listener to this database.
|
void |
addWorkflowEventListener(WGWorkflowEventListener listener)
Adds a listener for workflow events to the database
|
void |
annotateMetadata(java.io.File file,
WGFileMetaData meta,
java.util.List<WGFileAnnotator> additionalAnnotators)
Tool method for annotating a metadata object based on the given file, using the default and optionally given additional annotators
|
static boolean |
anyoneAllowed(java.util.List users)
Given a list of user/group names from an access control field (e.g.
|
static boolean |
anyoneAllowed(java.util.List users,
boolean emptyMeansYes)
Given a list of user/group names from an access control field (e.g.
|
void |
authenticationDataChanged()
Callback method on a change in the authentication data backend
|
boolean |
beginTransaction()
Deprecated.
|
void |
beginUpdate()
Notify database of the beginning of update operations via this
connection.
|
java.lang.Object |
callBackendService(java.lang.String serviceName,
java.lang.Object[] params)
Calls a backend service whose support is optional.
|
java.lang.Comparable |
catchupBackendChanges()
checks for backend changes
|
boolean |
certAuthEnabled()
Determines if certificate authentication is enabled for this database
|
void |
clearContentData()
Completely clears this document of all content related documents, which is all contents, struct entries, areas, content types and languages
WARNING (in case this has not yet become clear): This single method call will delete ALL documents of the given types in the database!
|
void |
clearUserCaches()
Clears all user-specific caches.
|
void |
close()
Completely closes this database object.
|
void |
closeSession()
Closes the database session.
|
boolean |
commitTransaction()
Deprecated.
|
WGArea |
createArea(java.lang.String name)
Creates a new area definition.
|
WGContent |
createContent()
Creates a simple content document.
|
WGContent |
createContent(java.lang.String title)
Creates a simple content document.
|
WGContent |
createContent(WGArea area,
java.lang.Object key,
java.lang.String title)
Creates a simple content document with the content key given.
|
WGContent |
createContent(WGStructEntry entry,
WGLanguage language,
java.lang.String title)
Creates a new content document.
|
WGContentType |
createContentType(java.lang.String name)
Creates a new content type.
|
WGCSSJSModule |
createCSSJSModule(java.lang.String name,
java.lang.String type)
Creates a new Script module
|
WGContent |
createDraftCopy(WGContent content)
Creates a draft copy of the given content document, keeping it's language
|
WGContent |
createDraftCopy(WGContent content,
WGLanguage language)
Creates a draft copy of the given content, using the language given as
parameter.
|
WGFileContainer |
createFileContainer(java.lang.String name)
Creates a new file container.
|
WGLanguage |
createLanguage(java.lang.String name)
Creates a new language definition only by name, which is also used as title
|
WGLanguage |
createLanguage(java.lang.String name,
java.lang.String title)
Creates a new language definition.
|
WGCSSJSModule |
createMetadataModule(java.lang.String name)
Creates a new metadata module.
|
void |
createPageSequence(WGStructEntry struct,
boolean forceCreate) |
WGSchemaDefinition |
createSchemaDefinition()
Creates a schema definition containing all content types and areas in this database with their current metadata.
|
WGScriptModule |
createScriptModule(java.lang.String name,
java.lang.String type)
Create a new script module.
|
WGStructEntry |
createStructEntry(java.lang.Object key,
WGDocument parent,
WGContentType contentType,
java.lang.String title)
Creates a new struct entry
|
WGStructEntry |
createStructEntry(WGDocument parent,
WGContentType contentType,
java.lang.String title)
Equivalent to calling createStructKey(null, parent, contentType, title).
|
WGTMLModule |
createTMLModule(java.lang.String name,
java.lang.String mediaKey)
Creates a new TML module.
|
WGUserProfile |
createUserProfile(java.lang.String userNameWish,
int type)
Creates a new user profile.
|
WGUserProfile |
createUserProfile(java.lang.String userNameWish,
int type,
boolean forceNew)
Creates a new user profile.
|
WGUserDetails |
defaultBuildUserDetails(AuthenticationSession authSession)
Default implementation for building user details for an authentication
session.
|
boolean |
defaultIsMemberOfUserList(java.util.List userList)
Default implementation for determining user list membership.
|
static boolean |
defaultIsMemberOfUserList(java.util.List userListOrig,
WGUserDetails userDetails)
Default implementation for determining user list membership against any custom user details object.
|
void |
designChanged(WGDesignChangeEvent event)
The design of a design core provider or the database has changed.
|
void |
determineDefaultLanguage()
Trigger the determination of a default language.
|
void |
dropAllDocumentCores(boolean untimelyDispose)
Called to drop all retrieved document cores for this session at once.
|
void |
enforceSchema(WGSchemaDefinition schemaDef)
Enforces the given schema definition on the database
|
void |
enforceVersionCompliance(java.lang.String compliance,
boolean enforceNoItemBehaviour)
Enforces the given version compliance behaviour on this database
|
java.util.List |
fireWorkflowEvent(WGWorkflowEvent event)
Fires a workflow event.
|
WGACL |
getACL()
Retrieves a WGACL object which manages the access control to this
database.
|
java.util.Iterator<WGContent> |
getAllContent()
Returns an Iterator iterating over all content documents in this database
does not include archived documents
|
java.util.Iterator<WGContent> |
getAllContent(boolean includeArchived)
Returns an Iterator iterating over all content documents in this database
|
java.util.List |
getAllContentKeys(boolean includeArchived)
Returns a list of all content keys in the current database.
|
java.util.Iterator |
getAllUserProfileNames()
Returns the names of all user profiles that are stored in the personalisation database
|
WGContent |
getAnyContentByName(java.lang.String name)
Returns a content with the given name in any language.
|
WGArea |
getArea(java.lang.String strName)
Returns the area with the given name
|
WGAreaMap |
getAreas()
Returns a map of all areas of this database, mapped by their area name.
|
java.lang.Object |
getAttribute(java.lang.String name)
Returns a custom attribute set to this database.
|
java.util.Set |
getAttributeNames()
Returns the names of all database attributes as a Set
|
AuthenticationModule |
getAuthenticationModule()
Returns the authentication module used to authenticate sessions, if this database supports and uses a auth module.
|
java.lang.Comparable |
getBackendRevision()
Returns the revision state of the database backend.
|
boolean |
getBooleanAttribute(java.lang.String name,
boolean defaultValue)
Returns the boolean value of an attribute, accepting boolean objects and
those string representations that are converted by
WGUtils.stringToBoolean().
|
de.innovationgate.utils.SkippingIterator<PageHierarchyNode> |
getChildNodeIterator(int pageSize)
Returns an iterator for the child nodes of this hierarchy node
|
java.util.List |
getChildNodes()
Returns the child nodes of this hierarchy node
|
java.lang.Class |
getChildNodeType()
Return the class type of child nodes
|
Version |
getComplianceVersion()
Returns the WGA version whose behaviour is enforced on this database via
enforceVersionCompliance(String, boolean) |
WGContent |
getContentByKey(java.lang.String keyStr)
Return a content document by content key string.
|
WGContent |
getContentByKey(WGContentKey key)
Return a content document by content key
|
WGContent |
getContentByName(java.lang.String name)
Retrieves a content by it's unique name in the database's default
language.
|
WGContent |
getContentByName(java.lang.String strName,
java.lang.String strLanguage)
Retrieves a content by it's unique name.
|
java.util.List |
getContentEventListeners()
Returns the list of content event listeners for this database.
|
int |
getContentStorePatchLevel()
Returns the patch level of this content store.
|
double |
getContentStoreVersion()
Returns the version of content store that this database represents, i.e the version of its storage format.
|
WGContentType |
getContentType(java.lang.String name)
Returns a content type document of the given name
|
java.util.List<WGContentType> |
getContentTypes()
Returns a list with all content types stored in this database
|
WGDatabaseCore |
getCore()
Returns the core implementation object of this database.
|
java.util.Map |
getCreationOptions()
Returns the map of creation options provided to this database when it was
initially opened
|
WGScriptModule |
getCSSJSModule(java.lang.String name)
Returns the script module of the given name.
|
WGScriptModule |
getCSSJSModule(java.lang.String name,
java.lang.String type)
Returns the script module of the given name and type
|
java.util.List |
getCSSJSModules()
Returns the script modules in this database.
|
java.util.List |
getCurrentBackendOperations()
Returns the operation keys of backend operations that are currently running
|
java.lang.String |
getDbReference()
Returns a database reference to be used throughout the application (in
WGA: the database key)
|
java.lang.String |
getDefaultLanguage()
Returns the default language of this database
|
WGDesignDocument |
getDesignObject(int type,
java.lang.String strName)
Returns a design object with the given information.
|
WGDesignDocument |
getDesignObject(int type,
java.lang.String strName,
java.lang.String mediaKey)
Returns a design object with the given information
|
java.util.List<? extends WGDesignDocument> |
getDesignObjects(int type)
Returns all design objects of a specific type.
|
WGDesignProvider |
getDesignProvider()
Returns an external design provider that was set to this database, if
available
|
WGDocument |
getDocumentByDocumentKey(java.lang.String key)
Deprecated.
Use
getDocumentByKey(String) instead |
WGDocument |
getDocumentByDocumentKeyFromCache(java.lang.String documentKeyStr)
Returns a document by it's document key, only if it is contained in
cache.
|
WGDocument |
getDocumentByDocumentKeyFromCache(WGDocumentKey documentKey)
Returns a document by it's document key, only if it is contained in
cache.
|
WGDocument |
getDocumentByKey(java.lang.String key)
Returns a document by the given document key.
|
WGDocument |
getDocumentByKey(WGDocumentKey documentKey)
Returns a document by the given document key.
|
WGContent |
getDummyContent(java.lang.String language)
Retrieves a dummy content object.
|
WGUserProfile |
getDummyProfile(java.lang.String name)
Returns a dummy profile object that does not store information.
|
java.lang.Object |
getExtensionData(java.lang.String name)
Retrieves the value of an extension data field stored in this database.
|
java.util.List<java.lang.String> |
getExtensionDataNames()
Returns the names of stored extension data fields on this database
This feature is only available in WGA Content Stores of Version 5 or higher.
|
java.util.List<WGFileAnnotator> |
getFileAnnotators()
Returns the currently active file annotators on this database
|
WGFileContainer |
getFileContainer(java.lang.String name)
Return the file container of the given name
|
java.util.List<WGFileContainer> |
getFileContainers()
Returns the list of file containers in this database
|
WGFileConverter |
getFileConverter() |
WGContent |
getFirstReleasedContent(java.lang.String language)
Returns the first released content of the given language to be found in
this database.
|
WGContent |
getFirstReleasedContent(java.lang.String language,
boolean onlyRoots)
Returns the first released content document of this database in the
specified language.
|
WGContent |
getFirstReleasedContent(WGLanguageChooser chooser,
boolean onlyRoots)
Returns the first released content document of this database.
|
WGLanguage |
getLanguage(java.lang.String name)
Returns the language of that name (code) if it exists.
|
WGLanguage |
getLanguageForLocale(java.util.Locale locale)
Retrieves the best matching language definition for the given locale.
|
java.util.Map<java.lang.String,WGLanguage> |
getLanguages()
Returns a map of WGLanguage objects, mapped by their language name (code)
|
java.util.Date |
getLastCacheMaintenance()
Returns the system time where the last cache maintenance happened
|
java.util.Date |
getLastChanged()
Returns date, where data in the database was last changed.
|
int |
getLockStatus()
gets the lockstatus for the current sessioncontext
|
int |
getLockStatus(LockOwner owner)
returns the current lockstatus of the lockable - if parent is set and locked the lockstatus is inherited
|
java.util.List<java.lang.String> |
getMandatoryReaders()
Returns a list of readers that automatically have read access to all read-protected documents
|
java.lang.String |
getMasterLoginName()
Gets the name of the master login, which is the login user name used with
the initial call to WGDatabase.open().
|
java.lang.String |
getMasterLoginPassword()
Returns the password of the master login used to open this database.
|
int |
getMaxCores()
Returns the maximum cores (i.e. backend document) that a session is
allowed to hold at once.
|
WGScriptModule |
getMetadataModule(java.lang.String name)
A metadata module is a special version of a script module that is used to
store metadata about the state of the database.
|
java.lang.Object |
getNativeObject()
Returns the native backend object for this database if there is one.
|
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.
|
WGDatabase.NoItemBehaviour |
getNoItemBehaviour()
Returns the currently configured behaviour of this database regarding the
request of nonexistent items
|
java.util.Map |
getOperationKeys()
Returns a map of operation keys currently or recently in usage
|
PageRightsFilter |
getPageRightsFilter() |
WGStructEntry |
getParentEntry(WGStructEntry entry)
Returns the parent entry to the given struct entry
|
Lockable |
getParentLockable()
returns the parent lockable of this lockable for e.g.
|
PageHierarchyNode |
getParentNode()
Return the parent of this node in hierarchy.
|
java.lang.String |
getPath()
Returns the database path, given as parameter of the method
WGDatabase.open()
|
WGPersonalisationDatabaseCore |
getPersonalisationCore()
Returns the personalisation core implementation of this database, if it is a personalisation database.
|
java.util.List |
getRecentBackendOperations()
Returns the operation keys of backend operations that have run and are not yet cleant up
|
java.lang.Comparable |
getRevision()
Returns the revision state of the database.
|
java.util.Date |
getRevisionDate(java.lang.Comparable lastModified)
Retrieve the datetime where a given database revision was done.
|
WGDatabaseRevision |
getRevisionObject()
Returns the revision state of the database as an high level object, usable for revision comparison and storage independently from the concrete backend type of revision value
Just like
getRevision() this returns the revision state of the database that is safely represented by all caches. |
java.util.List |
getRoles()
Returns the roles of this db implementation, describing what documents
can be found in it.
|
WGSchemaDefinition |
getSchemaDefinition()
Returns the schema definition in effect on this database
|
WGCSSJSModule |
getScriptModule(java.lang.String name)
Returns the script module of the given name and any codetype
|
WGScriptModule |
getScriptModule(java.lang.String name,
java.lang.String codetype)
Returns the script module of the given name and codetype
|
java.util.List<WGScriptModule> |
getScriptModules()
Returns the script modules in this database.
|
WGSequence |
getSequence(java.lang.String sequenceName)
Returns an WGAPI sequence object for the given sequence name.
|
WGDatabaseServer |
getServer()
Returns the server used to connect to this database
|
java.lang.String |
getServerName()
Returns the name of the database server (if there is one).
|
WGSessionContext |
getSessionContext()
Returns the session context, providing all data about the currently
opened database session.
|
org.apache.commons.collections.SortedBag |
getSessionStatistics()
Returns collected statistics of sessions that exceeded the maxdocs
threshold.
|
WGDatabase.WGDatabaseStatistics |
getStatistics()
Returns an object containing internal statistics about the database
|
WGStructEntry |
getStructEntryByKey(java.lang.Object structKey)
Returns a struct entry by it's struct key
|
WGStructEntry |
getStructEntryByName(java.lang.String strName)
Retrieves a struct entry which has the given unique name
This method will only return struct entries if they themselves own the unique name, not if any content of them owns it.
|
WGStructEntry |
getStructEntryBySequence(long seq)
Returns a struct entry by it's page sequence
|
java.lang.String |
getTitle()
Returns the title of this database (if there is one).
|
WGTMLModule |
getTMLModule(java.lang.String name,
java.lang.String mediaKey)
Returns the TML module for the given name and media key
|
java.util.List<WGTMLModule> |
getTMLModules()
Returns the list of TML modules in this database.
|
java.lang.String |
getType()
Returns the imlementation type (i.e. the class name of the database core
implementation)
|
java.lang.String |
getTypeName()
Returns a descriptive type name of the database implementation used.
|
java.util.List<WGUpdateLog> |
getUpdatedDocumentsSince(java.lang.Comparable cutoff)
Retrieves logs of documents that were modified since a cutoff revision.
|
java.util.List<java.lang.String> |
getUsedSequenceNames()
Returns the names of sequences that are initialized and/or in use
|
de.innovationgate.utils.UserHashMap |
getUserCache()
Returns a HashMap that will store userdefined data for the currently
logged in user.
|
int |
getUserCacheLatency()
Returns the user cache latency in minutes.
|
de.innovationgate.utils.UserHashMapGroup |
getUserHashMapGroup()
Returns the group of UserHashMaps for this database.
|
WGUserProfile |
getUserProfile(java.lang.String name)
Retrieves a user profile for the given profile name.
|
java.lang.String |
getUUID()
Returns a universal ID for the current database.
|
WGWorkflowEngine |
getWorkflowEngine()
Gets the workflow engine object for this database.
|
boolean |
hasAttribute(java.lang.String name)
Tests if the database contains an attribute of the given name
|
boolean |
hasContents(WGStructEntry entry)
Returns if the given struct entry contains a content document.
|
boolean |
hasFeature(java.lang.String featureName)
Queries the database for specific features.
|
boolean |
isAllowDesignModification()
Returns if this database allows modification of design documents for the
current session This method returs false if any of the doctypes file
container, script or tml module are not modifiable.
|
boolean |
isAnonymousAccessible()
Returns if the database can be accessed by anonymous users
|
boolean |
isAutoApprove()
Returns if automatic approval is enabled, see
COPTION_AUTOAPPROVE . |
boolean |
isBackendServiceSupported(java.lang.String serviceName)
Returns if a backend service is supported
|
boolean |
isCachingEnabled()
Indicates, if document caching is enabled globally for the database
|
boolean |
isConnected()
Returns if this database is already connected to its backend.
|
boolean |
isContentEmpty()
Returns if this database has neither content hierarchy (areas, struct
entries, contents) nor content schema documents (content types,
languages) and can be regarded "content-empty"
|
boolean |
isContentRole()
Returns, if the database contains content
|
boolean |
isDatabaseUpdatedInBackground()
Returns if the database has been updated in background and caches may not
reflect the most up-to-date state, because cache management has not yet
processed these updates
|
boolean |
isDeletionCheck()
Returns if backend deletion checks are enabled, see
COPTION_DELETIONCHECK |
static boolean |
isDesignDocumentType(int docType)
Tests if the given document type is the type of a design document, i.e.
|
boolean |
isDesignEmpty()
Returns if this database has no design documents (file containers, script
modules, WebTML modules) and can be regarded "design-empty".
|
boolean |
isDesignRole()
Returns if the database contains design documents
|
boolean |
isDoctypeModifiable(int type)
Tests if documents of a given doctypes are modifiable for the current
session
|
boolean |
isEmpty()
Determines if this database is completely empty of (content store)
documents.
|
boolean |
isMemberOfUserList(java.util.List list)
Tests, if the current user can be associated with any entry in the list.
|
boolean |
isPageReadersEnabled()
Returns if visibility constraints of the hierarchical reader fields on areas and pages are enabled
|
boolean |
isProjectMode()
Returns if project mode is enabled, see
COPTION_PROJECTMODE |
boolean |
isReaderProfileCreation()
Returns if users with reader access to this profile database may create
profile documents.
|
boolean |
isReady()
Returns, if the database is ready for work.
|
boolean |
isRepositoryRole()
Returns if if the database contains file containers.
|
boolean |
isSessionOpen()
Indicates if a database session is open
|
boolean |
isUserProfilesRole()
Indicates if the database contains user profiles
|
void |
lock()
locks the database for the current sessioncontext
|
void |
lock(LockOwner owner)
locks the object for the given owner
|
void |
maintenance(boolean fullMaintenance) |
boolean |
monitorLastChange()
Shows, if the database monitors the last change date of the backend
database to maintain caches.
|
boolean |
moveStructEntry(WGStructEntry entry,
WGDocument newParent)
Moves a struct entry to a new position.
|
WGOperationKey |
obtainOperationKey(int operation,
java.lang.Object key)
Returns on operation key for syncing of backend access.
|
boolean |
onConnect(WGDatabase.ConnectAction action)
Deprecated.
|
boolean |
onConnect(WGDatabase.DatabaseAction action)
Registers an action that should be executed when the database is
connected.
|
int |
openAnonymousSession()
Opens a session as anonymous user
|
int |
openAnonymousSession(java.lang.String accessFilter)
Opens a session as anonymous user, including an access filter
|
int |
openSession()
Opens a new session with master login.
|
int |
openSession(java.lang.String user,
java.lang.Object credentials)
Opens a new session.
|
int |
openSession(java.lang.String user,
java.lang.Object credentials,
java.lang.String filter) |
int |
openSession(java.lang.String user,
java.lang.Object credentials,
java.lang.String filter,
javax.servlet.http.HttpServletRequest request)
Opens a new session.
|
int |
openSession(java.security.cert.X509Certificate cert,
java.lang.String filter)
Opens a new session using a certificate for login.
|
java.lang.Object |
parseStructKey(java.lang.String key)
Parses the string representation of a struct key (e.g. used in a URL) to
the real internal struct key format
|
void |
performContentCreationCheck(WGStructEntry entry,
WGLanguage language)
Controls if the current user may create a content document with the given data.
|
void |
performDesignCreationCheck(int type,
java.lang.String name,
java.lang.String mediaKey)
Controls if the current user may create a design document with the given data.
|
void |
performStructCreationCheck(java.lang.Object key,
WGDocument parent,
WGContentType contentType)
Controls if the current user may create a struct entry with the given data.
|
void |
performStructMoveCheck(WGStructEntry entry,
WGDocument newParent)
Controls if the current user may move a struct entry to the given new parent.
|
static void |
putDefaultOption(java.util.Map options,
java.lang.String key,
java.lang.Object value)
Sets an option to a map if it is not already set
|
WGAbstractResultSet |
query(java.lang.String type,
java.lang.String query,
java.util.Map parameters)
Executes a query in the database giving a result set of content documents
in return.
|
java.util.List |
queryUserProfileNames(java.lang.String query)
Queries a user profile database for stored profiles, based on their data.
|
java.util.List |
queryUserProfileNames(java.lang.String type,
java.lang.String query,
java.util.Map params)
Queries a user profile database for stored profiles, based on their data.
|
void |
refresh()
Refreshes the data in database, testing for changes in the backend and
clearing all caches.
|
void |
releasePendingContents()
Fetches all content documents pending release and releases those that are ready to be released
|
java.lang.Object |
removeAttribute(java.lang.String name)
Removes a database attribute.
|
void |
removeBackendChangeListener(WGBackendChangeListener listener)
Removes a listener for backend changes from the database
|
void |
removeContentEventListener(WGContentEventListener listener)
Removes a content event listener.
|
void |
removeDatabaseConnectListener(WGDatabaseConnectListener listener)
Removes a listener for the connection of this database to its backend
|
void |
removeDatabaseEventListener(WGDatabaseEventListener listener)
Removes a database event listener.
|
void |
removeDesignChangeListener(WGDesignChangeListener changeListener)
Removes a design change listener to this database.
|
void |
removeExtensionData(java.lang.String name)
Removes a extension data field from the database.
|
void |
removeWorkflowEventListener(WGWorkflowEventListener listener)
Removes a workflow event listener.
|
int |
reopenSession()
Closes and reopens the session with the current logged in user.
|
int |
reopenSession(java.lang.String username,
java.lang.Object credentials)
Closes and reopens the session with the given user information
|
int |
reopenSession(java.lang.String username,
java.lang.Object credentials,
java.lang.String filter)
Closes and reopens the session with the given user information
|
boolean |
rollbackTransaction()
Deprecated.
|
void |
setAllowDesignModification(boolean allowDesignUpdates)
Sets if this database should allow modification of design documents This
call equals calling
setDoctypeModifiable(int, boolean) for the
doctypes file container, script and tml module to false. |
void |
setAttribute(java.lang.String name,
java.lang.Object obj)
Sets a custom attribute to the database.
|
void |
setAuthenticationModule(AuthenticationModule authenticationModule)
Injects an authentication module to the database that should be used to authenticate users.
|
void |
setAutoApprove(boolean autoApprove)
Sets if automatic approval is enabled
|
void |
setCachingEnabled(boolean b)
Controls if the document caching is enabled for this database.
|
void |
setDbReference(java.lang.String dbReference)
Sets a reference for this database to use throughout the application.
|
void |
setDefaultLanguage(java.lang.String defaultLanguage)
Manually set a default language for this database
|
void |
setDesignProvider(WGDesignProvider designProvider)
Sets an external design provider from which this database should retrieve
design documents.
|
void |
setDoctypeModifiable(int type,
boolean modifiable)
Sets if documents of a given doctype are modifiable for non-master
sessions Functionalities that feed the design of a database with external
data might want to disable modifiability of those types that are served.
|
void |
setFileAnnotators(java.util.List<WGFileAnnotator> annotators)
Sets annotators which are called when files are attached to this database and is able to annotate the file with additional information
|
void |
setFileConverter(WGFileConverter conv) |
void |
setPageRightsFilter(PageRightsFilter pageRightsFilter) |
void |
setTitle(java.lang.String string)
Sets the title of the database.
|
WGTransaction |
startTransaction()
Starts a transaction and returns a transaction object.
|
java.lang.String |
toLowerCaseMeta(java.lang.String meta)
Lowercases a metadata field value for this database if metadata lowercasing is not disabled
|
void |
unlock()
unlocks the database for the current sessioncontext
|
void |
unlock(LockOwner owner)
unlock the object if it is locked by the given owner
this method only delegates to LockOwner.releaseLock()
|
void |
visit(WGPageVisitor visitor)
Implements the visitor pattern on the page hierarchy.
|
void |
writeExtensionData(java.lang.String name,
java.lang.Object value)
Writes a extension data field.
|
public static final java.lang.String EXTDATA_DATABASE_UUID
public static final java.lang.String EXTDATA_PATCH_LEVEL
public static final java.lang.String EXTDATA_DERIVATE_CREATORS
public static final java.lang.String EXTDATA_DERIVATE_REVISION
public static final java.lang.String EXTDATA_CS_SYNC_RUNNING
public static final java.util.List<java.lang.String> PROTECTED_DATABASE_EXTDATA
public static final int DOCUMENTCACHE_SIZE_DEFAULT
public static final int NAMECACHE_SIZE_DEFAULT
public static final int QUERYCACHE_SIZE_DEFAULT
public static final double CSVERSION_NO_CONTENTSTORE
public static final double CSVERSION_WGA3
public static final double CSVERSION_WGA4_1
public static final double CSVERSION_WGA5
public static final java.lang.String AUTHENTICATED_GROUP
public static final java.lang.String COPTION_MEMORYCACHESIZE
public static final java.lang.String COPTION_CACHEOVERFLOW
public static final java.lang.String COPTION_AUTOAPPROVE
public static final java.lang.String COPTION_PAGEREADERS_ENABLED
public static final java.lang.String COPTION_USERCACHES_ENABLED
public static final java.lang.String COPTION_PAGERIGHTSFILTER
PageRightsFilter
and is to be used as thispublic static final java.lang.String SYSPROPERTY_VERBOSE_CACHEMANAGEMENT
public static final java.lang.String SYSPROPERTY_VERBOSE_MUTABLECLONING
public static final java.lang.String SYSPROPERTY_MAINTAIN_OPERATIONKEYS
public static final java.lang.String SYSPROPERTY_VERBOSE_BACKENDACCESS
public static final java.lang.String SYSPROPERTY_VERBOSE_BACKENDACCESS_DOCTYPES
public static final java.lang.String COPTION_UPDATETIMEOUT
public static final java.lang.String COPTION_DBREFERENCE
public static final java.lang.String ALNAME_NOTLOGGEDIN
public static final java.lang.String ALNAME_READER
public static final java.lang.String ALNAME_NOACCESS
public static final java.lang.String ALNAME_MANAGER
public static final java.lang.String ALNAME_EDITOR
public static final java.lang.String ALNAME_CHIEF_EDITOR
public static final java.lang.String ALNAME_AUTHOR
public static final java.util.Map<java.lang.Integer,WGDatabase.AccessLevel> ACCESSLEVELS
public static final java.util.Map<java.lang.Integer,WGDatabase.AccessLevel> REAL_ACCESSLEVELS
public static final java.lang.String ANONYMOUS_USER
public static final java.lang.String SESSIONTOKEN_USER
public static final java.lang.String UNKNOWN_REMOTE_USER
public static final java.lang.String DEFAULT_MEDIAKEY
public static final int ACCESSLEVEL_NOTLOGGEDIN
public static final int ACCESSLEVEL_NOACCESS
public static final int ACCESSLEVEL_READER
public static final int ACCESSLEVEL_AUTHOR
public static final int ACCESSLEVEL_EDITOR
public static final int ACCESSLEVEL_CHIEF_EDITOR
public static final int ACCESSLEVEL_MANAGER
public static final java.lang.String QUERYOPTION_ENHANCE
public static final java.lang.String QUERYOPTION_ONLYRELEASED
public static final java.lang.String QUERYOPTION_ONLYLANGUAGE
public static final java.lang.String QUERYOPTION_EXCLUDEDOCUMENT
public static final java.lang.String QUERYOPTION_RETURNQUERY
public static final java.lang.String QUERYOPTION_MAXRESULTS
public static final java.lang.String QUERYOPTION_CACHERESULT
public static final java.lang.String QUERYOPTION_NATIVEOPTIONS
public static final java.lang.String QUERYOPTION_ROLE
public static final java.lang.String QUERYOPTION_USEDCACHE
public static final java.lang.String QUERYOPTION_LANGUAGES
QUERYOPTION_ONLYLANGUAGE
if available.public static final java.lang.String QUERYOPTION_QUERY_PARAMETERS
public static final java.lang.String PROFILEQUERY_TYPE_ALL
queryUserProfileNames(String, String, Map)
that retrieves all existent user profilespublic static final java.lang.String ROLE_CONTENT
public static final java.lang.String ROLE_DESIGN
public static final java.lang.String ROLE_REPOSITORY
public static final java.lang.String ROLE_USERPROFILES
public static final java.lang.String FEATURE_QUERYABLE
public static final java.lang.String FEATURE_SELF_PERSONALIZABLE
public static final java.lang.String FEATURE_NATIVEEXPRESSIONS
public static final java.lang.String FEATURE_EDITABLE
public static final java.lang.String FEATURE_HIERARCHICAL
public static final java.lang.String FEATURE_LASTCHANGED
public static final java.lang.String FEATURE_COMPLEXVALUES
public static final java.lang.String FEATURE_STORESVARS
public static final java.lang.String FEATURE_FULLCONTENTFEATURES
public static final java.lang.String FEATURE_USE_OBJECTS_AS_REFERENCES
public static final java.lang.String FEATURE_GENERATES_STRUCTKEYS
public static final java.lang.String FEATURE_ACCEPTS_STRUCTKEYS
public static final java.lang.String FEATURE_UNLIMITED_CORES
public static final java.lang.String FEATURE_PERFORMS_BACKEND_LOGIN
WGDatabaseCore.openSession(AuthenticationSession, Object, boolean)
as BackendAuthSession
.public static final java.lang.String FEATURE_EXTERNAL_AUTHENTICATION
public static final java.lang.String FEATURE_RETRIEVE_ALL_CONTENTKEYS
public static final java.lang.String FEATURE_QUERY_PROFILES
public static final java.lang.String FEATURE_AUTOCASCADES_DELETIONS
public static final java.lang.String FEATURE_SESSIONTOKEN
public static final java.lang.String FEATURE_MULTILANGUAGE
public static final java.lang.String FEATURE_TRANSACTIONS
public static final java.lang.String FEATURE_REDUCE_CALLBACKS
public static final java.lang.String FEATURE_ACL_MANAGEABLE
public static final java.lang.String FEATURE_FIND_UPDATED_DOCS
public static final java.lang.String FEATURE_CREATEABLE
public static final java.lang.String FEATURE_LOADBALANCE
public static final java.lang.String FEATURE_VALIDATE_ATTACHMENTS
public static final java.lang.String FEATURE_CONTENT_RELATIONS
public static final java.lang.String FEATURE_MILLISECOND_PRECISION
public static final java.lang.String FEATURE_DISABLE_META_LOWERCASING
public static final java.lang.String FEATURE_DIRECT_ENTITY_READDING
public static final java.lang.String FEATURE_ORDERED_NAVIGATION_RESULTS
WGDatabaseCore.getRootEntries(WGArea, WGPageOrderSet)
and WGDatabaseCore.getChildEntries(WGStructEntry, WGPageOrderSet)
, allowing the fetching of partial resultspublic static final java.lang.String FEATURE_PROVIDE_PORTLETITEM_STORAGE
WGUserProfile.META_PORTLETITEMSTORAGE
, a storage service for items of transient portletspublic static final java.lang.String FEATURE_CONTENT_READ_PROTECTION
public static final java.lang.String FEATURE_CONTENT_FILE_DERIVATES
public static final java.lang.String FEATURE_UNPATCHEABLE
public static final java.lang.String COPTION_XML
public static final java.lang.String COPTION_CACHING_ENABLED
public static final java.lang.String COPTION_MAXCORES
public static final java.lang.String COPTION_MONITORLASTCHANGE
public static final java.lang.String COPTION_DESIGNPROVIDERTYPES
public static final java.lang.String COPTION_WORKFLOWENGINE
public static final java.lang.String COPTION_NOITEMBEHAVIOUR
public static final java.lang.String COPTION_USERCACHELATENCY
public static final java.lang.String COPTION_CACHELATENCY
public static final java.lang.String COPTION_SHAREDPOOL
public static final java.lang.String COPTION_READERPROFILECREATION
public static final java.lang.String COPTION_CONTENT_STORE_VERSION
public static final java.lang.String COPTION_MANDATORY_READERS
public static final java.lang.String ATTRIB_UPDATED
public static final java.lang.String COPTION_ALLOWCACHEMAINTENANCE
public static final java.lang.String COPTION_DELETIONCHECK
public static final java.lang.String COPTION_PROJECTMODE
public static final java.lang.String PORTLETREGISTRYMODE_TRANSIENT
public static final java.lang.String PORTLETREGISTRYMODE_PERSISTENT
public static final java.lang.String MASTER_USERNAME
public static final java.lang.String COPTION_LIST_CACHE_REBUILD_THRESHOLD
public static final java.lang.String COPTION_DISABLE_CERTAUTH
public static final java.lang.String COPTION_FAKE_CERTAUTH
public static final java.lang.String QUERYOPTION_FETCHSIZE
public static final java.lang.String COPTION_DOCUMENTCACHESIZE
public static final java.lang.String COPTION_NAMECACHESIZE
public static final java.lang.String COPTION_QUERYCACHESIZE
public static final java.lang.String COPTION_CLUSTERED
public static final java.lang.String COPTION_LEGACY_DBCP_MONITORING
public static final java.lang.String BACKENDSERVICE_CLEAR_USERPROFILES
public static final java.lang.String BACKENDSERVICE_NEW_CONTENT_VERSION
public static final java.lang.String BACKENDSERVICE_CLEAR_CONTENT
public static final java.lang.String BACKENDSERVICE_CLEAR_CONTENT_AND_SCHEMA
public static final java.lang.String BACKENDSERVICE_CLEAR_DATABASE
public static final java.lang.String BACKENDSERVICE_DAILY_MAINTENANCE
public static final java.lang.String BACKENDSERVICE_SELECT_PENDINGRELEASE_DOCS
WGAbstractResultSet
.public static final java.lang.String BACKENDSERVICE_PROBE_CONTENT
public static final java.lang.String BACKENDSERVICE_FETCH_MULTI_CONTENT
public static final java.util.Set<java.lang.String> USER_BACKENDSERVICES
public boolean monitorLastChange()
public static java.lang.String accessLevelText(int levelCode)
levelCode
- The access level code to convertpublic static int accessLevelCode(java.lang.String levelName)
levelName
- The access level name to convertpublic static WGDatabase.AccessLevel accessLevel(int levelCode)
levelCode
- public boolean isDatabaseUpdatedInBackground() throws WGAPIException
WGAPIException
public void refresh() throws WGAPIException
WGAPIException
public void closeSession() throws WGAPIException
WGAPIException
public void dropAllDocumentCores(boolean untimelyDispose)
untimelyDispose
- public int reopenSession(java.lang.String username, java.lang.Object credentials) throws WGAPIException
username
- credentials
- WGAPIException
public int reopenSession(java.lang.String username, java.lang.Object credentials, java.lang.String filter) throws WGAPIException
username
- credentials
- filter
- ID of the user access filter to apply. Specify null for none.WGAPIException
public int reopenSession() throws WGAPIException
WGAPIException
public WGArea getArea(java.lang.String strName) throws WGAPIException
strName
- Name of the areaWGAPIException
public WGAreaMap getAreas() throws WGAPIException
WGAPIException
public WGStructEntry getStructEntryBySequence(long seq) throws WGAPIException
seq
- The page sequence numberWGAPIException
public WGStructEntry getStructEntryByKey(java.lang.Object structKey) throws WGAPIException
structKey
- The struct key to find a struct entry for.WGAPIException
public WGOperationKey obtainOperationKey(int operation, java.lang.Object key)
operation
- key
- public WGDesignDocument getDesignObject(int type, java.lang.String strName, java.lang.String mediaKey) throws WGAPIException
type
- document type choosing, which kind of design object to
retrieve. Use constants WGDocument.TYPE_...strName
- Name of the design objectmediaKey
- media key of the design object. If design object has no media
key, provide null.WGAPIException
public WGDesignDocument getDesignObject(int type, java.lang.String strName) throws WGAPIException
type
- document type choosing, which kind of design object to
retrieve. Use constants WGDocument.TYPE_...strName
- Name of the design objectWGAPIException
public java.lang.String getTitle()
public void addDatabaseEventListener(WGDatabaseEventListener listener)
listener
- The listener to register.public void addDatabaseConnectListener(WGDatabaseConnectListener listener)
listener
- public void removeDatabaseConnectListener(WGDatabaseConnectListener listener)
listener
- public void addContentEventListener(WGContentEventListener listener)
listener
- public void addWorkflowEventListener(WGWorkflowEventListener listener)
listener
- public void removeDatabaseEventListener(WGDatabaseEventListener listener)
public void removeContentEventListener(WGContentEventListener listener)
public void removeWorkflowEventListener(WGWorkflowEventListener listener)
public java.util.List fireWorkflowEvent(WGWorkflowEvent event) throws WGAPIException
event
- WGAPIException
public int openSession(java.lang.String user, java.lang.Object credentials) throws WGAPIException
user
- The username for the new session. Specify null for master
login.credentials
- The password to the username. Specify null for master login.WGAPIException
public int openAnonymousSession() throws WGAPIException
WGAPIException
public int openAnonymousSession(java.lang.String accessFilter) throws WGAPIException
accessFilter
- The filter idWGAPIException
public int openSession(java.lang.String user, java.lang.Object credentials, java.lang.String filter, javax.servlet.http.HttpServletRequest request) throws WGAPIException
user
- The username for the new session. Specify null for master
login.credentials
- The password to the username. Specify null for master login.filter
- A user access filter to reduce the user rightsWGAPIException
public int openSession(java.lang.String user, java.lang.Object credentials, java.lang.String filter) throws WGAPIException
WGAPIException
public int openSession(java.security.cert.X509Certificate cert, java.lang.String filter) throws WGAPIException
CertAuthCapableAuthModule
with enabled certificate authenticationcert
- The certificate used to login.filter
- A user access filter to reduce user rightsWGAPIException
public int openSession() throws WGAPIException
WGAPIException
public java.lang.String getType()
public java.lang.String getTypeName()
public java.util.List<? extends WGDesignDocument> getDesignObjects(int type) throws WGAPIException
type
- The type of design objects to retrieve. Use constants
WGDocument.TYPE_...WGAPIException
public WGContent getContentByName(java.lang.String strName, java.lang.String strLanguage) throws WGAPIException
strName
- Unique name of the contentstrLanguage
- Language of the contentWGAPIException
public WGStructEntry getStructEntryByName(java.lang.String strName) throws WGAPIException
strName
- Unique nameWGAPIException
public WGContent getContentByName(java.lang.String name) throws WGAPIException
name
- Unique name of the contentWGAPIException
public void setAttribute(java.lang.String name, java.lang.Object obj)
name
- The custom attribute nameobj
- The attribute value.public java.lang.Object removeAttribute(java.lang.String name)
name
- Name of the attribute to removepublic java.lang.Object getAttribute(java.lang.String name)
name
- Name of the attributepublic boolean hasAttribute(java.lang.String name)
name
- Attribute namepublic boolean getBooleanAttribute(java.lang.String name, boolean defaultValue)
name
- The name of the AttributedefaultValue
- The default value to return, if the attribute is not
interpretable as booleanpublic WGAbstractResultSet query(java.lang.String type, java.lang.String query, java.util.Map parameters) throws WGAPIException
type
- The type of query. Available types vary by database
implementation.query
- The query. Format depends on query type.parameters
- Additional parameters for the query. Use Constants
WGDatabase.QUERYOPTION_... as map keys.WGAPIException
public boolean hasFeature(java.lang.String featureName)
featureName
- The feature to query. Use Constants WGDatabase.FEATURE_...public java.util.List getRoles()
public void addBackendChangeListener(WGBackendChangeListener listener)
listener
- public void removeBackendChangeListener(WGBackendChangeListener listener)
listener
- public void performContentCreationCheck(WGStructEntry entry, WGLanguage language) throws WGAPIException, ResourceIsLockedException, WGAuthorisationException, WGIllegalStateException
entry
- The struct entry under which to create the content. If given null all struct entry data checks are bypassed.language
- The language in which to create itWGAPIException
- If the user may not create the document. The exception informs about the reason.ResourceIsLockedException
WGAuthorisationException
WGIllegalStateException
public WGContent createContent(WGStructEntry entry, WGLanguage language, java.lang.String title) throws WGAPIException
entry
- The struct entry for the new contentlanguage
- The language of the new contenttitle
- The title of the new contentWGAPIException
public WGContent createContent(WGArea area, java.lang.Object key, java.lang.String title) throws WGAPIException
area
- The area to create the content in.key
- The key of the new content.title
- The title of the new content.WGAPIException
public WGStructEntry createStructEntry(WGDocument parent, WGContentType contentType, java.lang.String title) throws WGAPIException
parent
- contentType
- title
- WGAPIException
public WGStructEntry createStructEntry(java.lang.Object key, WGDocument parent, WGContentType contentType, java.lang.String title) throws WGAPIException
key
- The struct key of the new entry. Can be specified when
database supports feature
WGDatabase.FEATURE_ACCEPTS_STRUCTKEYS. Can be left out with
null, when the database supports feature
WGDatabase.FEATURE_GENERATES_STRUCTKEYS.parent
- Parent object. Can be a WGArea object (new entry will be root)
or another WGStructEntry object (new entry will be child)contentType
- Content type for contents of this struct entrytitle
- Title of this struct entryWGAPIException
public void performStructCreationCheck(java.lang.Object key, WGDocument parent, WGContentType contentType) throws WGAPIException
key
- A struct key that is to be determined for the new struct entry. Give null if you want the WGAPI to generate the key.parent
- The parent of the new struct entry. May be an WGArea
or another WGStructEntry
.contentType
- The content type of the new struct entry.WGAPIException
- If the user may not create the document. The exception informs about the reason.public java.util.Date getLastChanged()
WGAPIException
public java.lang.Comparable getRevision()
Long
or Date
.
The revision here is the state that the database and all its caches currently safely represents. The actual revision on the backend may be newer.
and can be retrieved using getBackendRevision()
.
You can use getRevisionObject()
instead which provides a high-level object easier to compare to other revisions and to serialize/deserialize.
To get dates corresponding to the given revision use getRevisionDate(Comparable)
.
To directly retrieve concrete dates use getLastChanged()
instead.public java.lang.Comparable getBackendRevision() throws WGAPIException
WGAPIException
public WGDatabaseRevision getRevisionObject()
getRevision()
this returns the revision state of the database that is safely represented by all caches.public java.util.Date getRevisionDate(java.lang.Comparable lastModified) throws WGAPIException, WGWrongRevisionException
getRevision()
.
If the revision is of wrong datatype or is no revision known in this database the method throws a WGWrongRevisionExcception.lastModified
- The revision indicatorWGAPIException
WGWrongRevisionException
- if the given revision is no revision of the current databasepublic java.util.Map getCreationOptions()
public java.util.Map<java.lang.String,WGLanguage> getLanguages() throws WGAPIException
WGAPIException
public WGSessionContext getSessionContext()
public void close() throws WGAPIException
WGAPIException
public WGContent getDummyContent(java.lang.String language) throws WGAPIException
WGAPIException
public WGUserProfile getDummyProfile(java.lang.String name) throws WGAPIException
name
- Profile name that the dummy profile should returnWGAPIException
public java.lang.Object parseStructKey(java.lang.String key) throws WGAPIException
key
- WGAPIException
public WGContent getContentByKey(WGContentKey key) throws WGAPIException
key
- Key to retrieve content forWGAPIException
public WGContent getContentByKey(java.lang.String keyStr) throws WGAPIException
keyStr
- The content key in its string representationWGAPIException
public WGDocument getDocumentByDocumentKey(java.lang.String key) throws WGAPIException
getDocumentByKey(String)
insteadkey
- The document key for the document in its string representationWGAPIException
public WGDocument getDocumentByKey(WGDocumentKey documentKey) throws WGAPIException
documentKey
- The document key for the document.WGAPIException
public WGDocument getDocumentByKey(java.lang.String key) throws WGAPIException
key
- The document key for the document in its string representationWGAPIException
public WGStructEntry getParentEntry(WGStructEntry entry) throws WGAPIException
entry
- The entry, whose parent is searchedWGAPIException
public java.lang.Object getExtensionData(java.lang.String name) throws WGAPIException
getExtensionData
in interface WGExtensionDataContainer
name
- The name of the field.WGAPIException
public java.util.List<java.lang.String> getExtensionDataNames() throws WGAPIException
getExtensionDataNames
in interface WGExtensionDataContainer
WGAPIException
WGBackendException
public void writeExtensionData(java.lang.String name, java.lang.Object value) throws WGAPIException
writeExtensionData
in interface WGExtensionDataContainer
name
- Name of the fieldvalue
- The value to storeWGAPIException
public void removeExtensionData(java.lang.String name) throws WGAPIException
removeExtensionData
in interface WGExtensionDataContainer
name
- Name of the field to removeWGAPIException
public java.lang.String getDefaultLanguage() throws WGAPIException
WGAPIException
public void determineDefaultLanguage() throws WGAPIException
WGAPIException
public java.lang.String getServerName() throws WGAPIException
WGAPIException
public boolean isReady()
public WGDatabaseCore getCore()
public WGPersonalisationDatabaseCore getPersonalisationCore() throws WGNotSupportedException
WGNotSupportedException
WGNotSupportedException
- If the database is no personalisation databasepublic boolean isSessionOpen()
public java.lang.String getPath()
public WGContent getFirstReleasedContent(java.lang.String language, boolean onlyRoots) throws WGAPIException
language
- The language of the contentonlyRoots
- Specify true, if you want to get only root documentsWGAPIException
public WGContent getFirstReleasedContent(WGLanguageChooser chooser, boolean onlyRoots) throws WGAPIException
chooser
- A language chooser object determining what language versions may be usedonlyRoots
- Specify true, if you want to get only root documentsWGAPIException
public WGContent getFirstReleasedContent(java.lang.String language) throws WGAPIException
language
- WGAPIException
public WGUserProfile getUserProfile(java.lang.String name) throws WGAPIException
name
- WGAPIException
public WGUserProfile createUserProfile(java.lang.String userNameWish, int type, boolean forceNew) throws WGAPIException
userNameWish
- Name of the new user profile. May be null to let the
personalisation database generate a name.type
- Type of the user profile. Can be any integer chosen by the
personalisation implementation to differ profile types.forceNew
- Forces the creation of a new profile. If there is already an
existing profile with the given name then a new profile with
a different name is created and returned.WGAPIException
- instance of WGCreationException if a profile with this name
already exists or the profile creation fails otherwise
WGAPIExceptions on BackendErrorspublic WGUserProfile createUserProfile(java.lang.String userNameWish, int type) throws WGAPIException
userNameWish
- Name of the new user profile. May be null to let the
personalisation database generate a name.type
- Type of the user profile. Can be any integer chosen by the
personalisation implementation to differ profile types.WGAPIException
- instance of WGCreationException if a profile with this name
already exists or the profile creation fails otherwise
WGAPIExceptions on BackendErrorspublic boolean isContentRole()
public boolean isDesignRole()
public boolean isRepositoryRole()
public boolean isUserProfilesRole()
public boolean isEmpty() throws WGAPIException
WGAPIException
public boolean isDesignEmpty() throws WGAPIException
WGAPIException
public boolean isContentEmpty() throws WGAPIException
WGAPIException
public java.lang.String getMasterLoginName()
public WGWorkflowEngine getWorkflowEngine() throws WGAPIException
WGWorkflowException
WGBackendException
WGAPIException
public WGDatabase.WGDatabaseStatistics getStatistics()
public boolean isMemberOfUserList(java.util.List list) throws WGAPIException
list
- WGAPIException
public WGContent createContent(java.lang.String title) throws WGAPIException
title
- Title of the new content document.WGAPIException
public WGContent createContent() throws WGAPIException
WGAPIException
public java.util.List<WGContentType> getContentTypes() throws WGAPIException
WGAPIException
public WGContentType getContentType(java.lang.String name) throws WGAPIException
name
- The name of the content typeWGAPIException
public java.util.List<WGTMLModule> getTMLModules() throws WGAPIException
WGAPIException
public WGTMLModule getTMLModule(java.lang.String name, java.lang.String mediaKey) throws WGAPIException
name
- mediaKey
- WGAPIException
public WGLanguage getLanguage(java.lang.String name) throws WGAPIException
name
- The language nameWGAPIException
public WGLanguage getLanguageForLocale(java.util.Locale locale) throws WGAPIException
locale
- The locale to matchWGAPIException
public WGArea createArea(java.lang.String name) throws WGAPIException
name
- The Name of the new areaWGAPIException
public WGContentType createContentType(java.lang.String name) throws WGAPIException
name
- Name of the new content type.WGAPIException
public WGTMLModule createTMLModule(java.lang.String name, java.lang.String mediaKey) throws WGAPIException
name
- name of the new TML module.mediaKey
- Media key of the new TML module.WGAPIException
public boolean moveStructEntry(WGStructEntry entry, WGDocument newParent) throws WGAPIException
entry
- The entry to movenewParent
- The new parent of the entry. If it is an WGArea object the
struct entry will become a root document in this area. If it
is an WGStructEntry it will become a child entry of this
entry.WGAPIException
public void performStructMoveCheck(WGStructEntry entry, WGDocument newParent) throws WGIllegalArgumentException, WGAPIException, WGAuthorisationException, ResourceIsLockedException
entry
- The entry to movenewParent
- The new parent of the entry. May be an WGArea
or another WGStructEntry
.WGAPIException
- If the user may not move the document. The exception informs about the reason.WGIllegalArgumentException
WGAuthorisationException
ResourceIsLockedException
public WGCSSJSModule createCSSJSModule(java.lang.String name, java.lang.String type) throws WGAPIException
name
- Name of the new moduletype
- Type of the module. A constant WGCSSJSModule.CODETYPE_...WGAPIException
public void performDesignCreationCheck(int type, java.lang.String name, java.lang.String mediaKey) throws WGAPIException
type
- The type of design document. Use constants WGDocument.TYPE_...name
- The name of design documentmediaKey
- For WebTML modules specify media key, for script modules specify code type (Constants WGScriptModule.CODETYPE_...). For other types specify null.WGAPIException
- If the creation for the given data would failpublic java.util.List getCSSJSModules() throws WGAPIException
WGAPIException
public WGScriptModule getCSSJSModule(java.lang.String name) throws WGAPIException
name
- WGAPIException
public WGScriptModule getCSSJSModule(java.lang.String name, java.lang.String type) throws WGAPIException
name
- WGAPIException
public java.util.List<WGFileContainer> getFileContainers() throws WGAPIException
WGAPIException
public WGFileContainer getFileContainer(java.lang.String name) throws WGAPIException
name
- WGAPIException
public WGFileContainer createFileContainer(java.lang.String name) throws WGAPIException
name
- The name of the file container.WGAPIException
public WGLanguage createLanguage(java.lang.String name) throws WGAPIException
name
- The name (i.e. language code) of the new language.
languageWGAPIException
public WGLanguage createLanguage(java.lang.String name, java.lang.String title) throws WGClosedSessionException, WGAPIException, WGDuplicateKeyException, WGCreationException
name
- The name (i.e. language code) of the new language.WGAPIException
WGClosedSessionException
WGDuplicateKeyException
WGCreationException
public WGContent createDraftCopy(WGContent content) throws WGAPIException
content
- WGAPIException
public WGContent createDraftCopy(WGContent content, WGLanguage language) throws WGAPIException
content
- The content to copylanguage
- The language for the draft copy. Specify null to keep the
language of the original.WGAPIException
public boolean isCachingEnabled()
public void setCachingEnabled(boolean b)
public boolean beginTransaction() throws WGAPIException
startTransaction()
NOTE: This transaction functionality is for WGAPI internal use only! Use startTransaction()
for external use.
WGAPIException
public WGTransaction startTransaction() throws WGAPIException
WGTransaction.commit()
is called.
Calling WGTransaction.rollback()
will revert all changes done in the transaction.
If this is called while already in a transaction it returns a cascaded transaction. The commit of the cascaded transaction will be a no-op. Rolling back will roll back the real transaction.
If this is called on a database backend which does not support transaction it returns a fake transaction with no-op operations.WGAPIException
public boolean commitTransaction() throws WGAPIException
WGTransaction.commit()
NOTE: This transaction functionality is for WGAPI internal use only! Use startTransaction()
for external use.
WGAPIException
public boolean rollbackTransaction() throws WGAPIException
WGTransaction.rollback()
NOTE: This transaction functionality is for WGAPI internal use only! Use startTransaction()
for external use.
WGAPIException
public WGACL getACL()
public de.innovationgate.utils.UserHashMap getUserCache()
public de.innovationgate.utils.UserHashMapGroup getUserHashMapGroup()
public java.lang.Object getNativeObject() throws WGAPIException
WGBackendException
WGAPIException
public static boolean isDesignDocumentType(int docType)
docType
- public AuthenticationModule getAuthenticationModule()
RedirectionAuthModule
this method returns the real backend module. So this method should be used
to access the module if some special, non-standard, capabilities are to be usedpublic java.lang.String getMasterLoginPassword()
public int getMaxCores()
public org.apache.commons.collections.SortedBag getSessionStatistics()
public void setTitle(java.lang.String string)
string
- The title to setpublic java.util.List<WGUpdateLog> getUpdatedDocumentsSince(java.lang.Comparable cutoff) throws WGAPIException
cutoff
- The cutoff revision. Documents modified earlier will not be
included in the resultWGAPIException
public boolean hasContents(WGStructEntry entry) throws WGAPIException
entry
- The entry to testWGAPIException
public WGDocument getDocumentByDocumentKeyFromCache(java.lang.String documentKeyStr) throws WGAPIException
documentKeyStr
- The document key in its string representationWGAPIException
public WGDocument getDocumentByDocumentKeyFromCache(WGDocumentKey documentKey) throws WGAPIException
documentKey
- The document keyWGAPIException
public static boolean anyoneAllowed(java.util.List users, boolean emptyMeansYes)
users
- The list of user/group namesemptyMeansYes
- Determines if an empty field (size = 0; first element null or
empty string) should return truepublic static boolean anyoneAllowed(java.util.List users)
users
- The list of user/group namespublic java.util.Iterator<WGContent> getAllContent() throws WGAPIException
WGAPIException
public java.util.Iterator<WGContent> getAllContent(boolean includeArchived) throws WGAPIException
includeArchived
- Should archived documents been included? true/falseWGAPIException
public java.lang.String getDbReference()
public void setDbReference(java.lang.String dbReference)
public WGUserDetails defaultBuildUserDetails(AuthenticationSession authSession) throws WGAPIException
authSession
- The authentication session to create details forWGBackendException
WGAPIException
public boolean defaultIsMemberOfUserList(java.util.List userList) throws WGAPIException
WGUserDetails
to specify
detailed user information. This method is not intended for direct usage
outside of the WGAPI.userList
- A list of user/group/rolenames to determine membership for.WGAPIException
public static boolean defaultIsMemberOfUserList(java.util.List userListOrig, WGUserDetails userDetails)
userListOrig
- A list of user/group/rolenames to determine membership for.userDetails
- The user details representing the users authorisationspublic boolean isAllowDesignModification()
isDoctypeModifiable(int)
should
be used.public void setAllowDesignModification(boolean allowDesignUpdates)
setDoctypeModifiable(int, boolean)
for the
doctypes file container, script and tml module to false.public java.util.Set getAttributeNames()
public WGDesignProvider getDesignProvider()
public void setDesignProvider(WGDesignProvider designProvider) throws WGAPIException
designProvider
- The design provider to set.LockException
WGAPIException
public boolean certAuthEnabled()
public static void putDefaultOption(java.util.Map options, java.lang.String key, java.lang.Object value)
options
- the map to usekey
- the key to set to the mapvalue
- the value to write to the mappublic void lock(LockOwner owner) throws WGAPIException
Lockable
lock
in interface Lockable
WGAPIException
- - instance of LockWaitTimeoutException when the lock request timed out- instance of ParentIsLockedException when the lock cannot be obtained
because the parent object is already locked
- other API Exceptions on API errors
public void lock() throws WGAPIException
WGAPIException
public void unlock(LockOwner owner)
Lockable
public void unlock()
public int getLockStatus(LockOwner owner) throws WGAPIException
Lockable
getLockStatus
in interface Lockable
owner
- - LockOwner who wants to retrieve his lockstatus for this documentWGAPIException
public int getLockStatus() throws WGAPIException
WGAPIException
public Lockable getParentLockable()
Lockable
getParentLockable
in interface Lockable
public void designChanged(WGDesignChangeEvent event)
WGDesignChangeListener
designChanged
in interface WGDesignChangeListener
event
- Event informationpublic java.util.List queryUserProfileNames(java.lang.String type, java.lang.String query, java.util.Map params) throws WGAPIException
type
- The type of the queryquery
- Query to use for searching user profilesparams
- Parameters given to the queryWGQueryException
WGAPIException
public java.util.Iterator getAllUserProfileNames() throws WGAPIException
WGNotSupportedException
- If the database is not personalisation databaseWGAPIException
public java.util.List queryUserProfileNames(java.lang.String query) throws WGAPIException
query
- Query to use for searching user profilesWGQueryException
WGAPIException
public boolean isConnected()
public WGScriptModule getMetadataModule(java.lang.String name) throws WGAPIException
name
- The name of the metadata moduleWGAPIException
public WGCSSJSModule createMetadataModule(java.lang.String name) throws WGAPIException
name
- Name of the module to createLockException
WGCreationException
WGAuthorisationException
WGAPIException
public int getUserCacheLatency()
public void clearUserCaches()
public WGDatabase.NoItemBehaviour getNoItemBehaviour()
public boolean isReaderProfileCreation()
public java.util.List getAllContentKeys(boolean includeArchived) throws WGAPIException
includeArchived
- Specify true, to also retrieve content keys for archived
contentsWGContentKey
WGAPIException
public java.util.Date getLastCacheMaintenance()
public void beginUpdate() throws WGAPIException
WGAPIException
public boolean isDeletionCheck()
COPTION_DELETIONCHECK
public java.lang.Class getChildNodeType()
PageHierarchyNode
getChildNodeType
in interface PageHierarchyNode
public java.util.List getChildNodes() throws WGAPIException
PageHierarchyNode
getChildNodes
in interface PageHierarchyNode
WGAPIException
public de.innovationgate.utils.SkippingIterator<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.String getNodeKey()
PageHierarchyNode
getNodeKey
in interface PageHierarchyNode
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()
PageHierarchyNode
getParentNode
in interface PageHierarchyNode
public boolean isProjectMode()
COPTION_PROJECTMODE
public boolean onConnect(WGDatabase.DatabaseAction action)
action
- The action to execute.public boolean onConnect(WGDatabase.ConnectAction action)
onConnect(DatabaseAction)
public boolean isAutoApprove()
COPTION_AUTOAPPROVE
.public void setAutoApprove(boolean autoApprove)
public void setDoctypeModifiable(int type, boolean modifiable)
getDesignObject(int, String, String)
.type
- The doctype to set. Use WGDocument.TYPE_... constantsmodifiable
- Whether to set the doctype modifiable or unmodifiablepublic boolean isDoctypeModifiable(int type)
type
- The type to testpublic WGContent getAnyContentByName(java.lang.String name) throws WGAPIException
name
- The name to searchWGAPIException
public void setDefaultLanguage(java.lang.String defaultLanguage)
defaultLanguage
- The default languagepublic void addDesignChangeListener(WGDesignChangeListener changeListener)
changeListener
- public void removeDesignChangeListener(WGDesignChangeListener changeListener)
changeListener
- public WGScriptModule getScriptModule(java.lang.String name, java.lang.String codetype) throws WGAPIException
name
- codetype
- WGAPIException
public WGCSSJSModule getScriptModule(java.lang.String name) throws WGAPIException
name
- WGAPIException
public java.util.List<WGScriptModule> getScriptModules() throws WGAPIException
WGAPIException
public WGScriptModule createScriptModule(java.lang.String name, java.lang.String type) throws WGAPIException
createCSSJSModule(String, String)
but better named.name
- Name of the script moduletype
- Code type of the module. Use constants WGScriptModule.CODETYPE_...WGAPIException
public java.util.List getCurrentBackendOperations()
WGOperationKey
objectspublic java.util.Map getOperationKeys()
public java.util.List getRecentBackendOperations()
WGOperationKey
objectspublic void setAuthenticationModule(AuthenticationModule authenticationModule) throws WGIllegalArgumentException
authenticationModule
- The moduleWGIllegalArgumentException
public void authenticationDataChanged()
AuthenticationSourceListener
authenticationDataChanged
in interface AuthenticationSourceListener
public double getContentStoreVersion() throws WGAPIException
WGAPIException
public int getContentStorePatchLevel() throws WGAPIException
getContentStoreVersion()
, to indicate the feature set of the content store.
This is the patch level that is currently active on the connected database. If the backend patch level changed since the last reconnect this will not be reflected.WGAPIException
public void visit(WGPageVisitor visitor) throws WGAPIException
visitor
- WGAPIException
public WGDatabaseServer getServer()
public void clearContentData() throws WGAPIException
WGAPIException
public boolean isAnonymousAccessible() throws WGAPIException
WGBackendException
WGAPIException
public void enforceSchema(WGSchemaDefinition schemaDef) throws WGAPIException
schemaDef
- WGAPIException
public WGSchemaDefinition getSchemaDefinition()
public WGSchemaDefinition createSchemaDefinition() throws WGAPIException
WGAPIException
public java.lang.String toLowerCaseMeta(java.lang.String meta)
meta
- The value to conditionally lowercasepublic boolean isPageReadersEnabled()
public java.util.List<java.lang.String> getMandatoryReaders()
public boolean isBackendServiceSupported(java.lang.String serviceName) throws WGAPIException
serviceName
- Name of the serviceWGAPIException
public java.lang.Object callBackendService(java.lang.String serviceName, java.lang.Object[] params) throws WGAPIException
serviceName
- The service name. Use WGDatabase.BACKENDSERVICE_*params
- The matching parameters for the called serviceWGAPIException
public void releasePendingContents() throws WGAPIException
WGAPIException
public void enforceVersionCompliance(java.lang.String compliance, boolean enforceNoItemBehaviour)
compliance
- Compliance string from CSConfig.VERSIONCOMPLIANCE_*enforceNoItemBehaviour
- If the behaviour regarding nonexistent items for the compliance should be enforced. May be false if this was already set by a higher priority configuration.public Version getComplianceVersion()
enforceVersionCompliance(String, boolean)
public java.lang.String getUUID()
WGAPIException
public WGSequence getSequence(java.lang.String sequenceName) throws WGAPIException
sequenceName
- Name of the sequenceWGAPIException
public java.util.List<java.lang.String> getUsedSequenceNames() throws WGAPIException
WGAPIException
public java.lang.Comparable catchupBackendChanges() throws WGAPIException
WGAPIException
public void setFileAnnotators(java.util.List<WGFileAnnotator> annotators)
annotators
- The annotatorspublic java.util.List<WGFileAnnotator> getFileAnnotators()
public java.util.List getContentEventListeners()
public void annotateMetadata(java.io.File file, WGFileMetaData meta, java.util.List<WGFileAnnotator> additionalAnnotators) throws WGAPIException
file
- The file datameta
- The metadata object to annotateadditionalAnnotators
- Additional annotators to run.WGAPIException
public void maintenance(boolean fullMaintenance) throws WGException
WGException
public PageRightsFilter getPageRightsFilter()
public void setPageRightsFilter(PageRightsFilter pageRightsFilter) throws WGAPIException
WGAPIException
public void setFileConverter(WGFileConverter conv)
public WGFileConverter getFileConverter()
public void createPageSequence(WGStructEntry struct, boolean forceCreate) throws WGAPIException, java.lang.InstantiationException, java.lang.IllegalAccessException
WGAPIException
java.lang.InstantiationException
java.lang.IllegalAccessException