public class WGFakeContentStore extends WGFakeDatabase
COPTION_LANGUAGE, DBTYPE, FAKE_AREA, FAKE_CONTENTNAME, FAKE_CONTENTTYPE, FAKE_LANGUAGE, FAKE_STRUCTKEY, FAKE_TITLE, FAKE_TML
Constructor and Description |
---|
WGFakeContentStore() |
Modifier and Type | Method and Description |
---|---|
void |
beginUpdate()
Notifies the backend database that the session will update data from now on.
|
java.lang.Object |
callBackendService(java.lang.String serviceName,
java.lang.Object[] params)
Calls a backend service whose support is optional.
|
WGDocumentCore |
createUserProfile(java.lang.String name,
int type)
Called to create a new user profile.
|
int |
getContentStorePatchLevel()
Returns the patch level of the storage format of this WGA Content Store.
|
double |
getContentStoreVersion()
Returns the version of WGA Content Store that this backend represents.
|
boolean |
hasFeature(java.lang.String feature)
Returns information on specific features, that this database implements.
|
boolean |
isBackendServiceSupported(java.lang.String serviceName)
Returns if a backend service is supported
|
boolean |
isContentTypeUsed(WGContentType ct)
Tests if the given content type is still in usage, i.e. if there are struct entries referencing it
|
boolean |
isLanguageUsed(WGLanguage lang)
Tests if the given language is still in usage, i.e. if there are contents referencing it
|
WGUserAccess |
openSession(AuthenticationSession authSession,
java.lang.Object credentials,
boolean master)
Opens a session for the given user/thread.
|
beginTransaction, clearSessionCache, close, closeSession, commitTransaction, convertFileNameForAttaching, createContent, createCopy, createDesignDocument, createStructEntry, fastAccess, getACL, getAllContent, getAllContentKeys, getAllUserProfileNames, getChildEntries, getContentByKey, getContentByName, getContentCount, getCreated, getDedicatedWorkflowEngine, getDeletions, getDesignObject, getDesignObjects, getDummyContent, getExtensionData, getExtensionDataNames, getFakeLanguage, getIncomingRelations, getNativeObject, getParentEntry, getRevision, getRevisionDate, getRoles, getRootEntries, getServerName, getStructEntryByKey, getStructEntryByName, getTitle, getTypeName, getUpdateLogs, getUserProfile, isMemberOfUserList, moveStructEntry, open, parseStructKey, query, queryUserProfileNames, refresh, removeExtensionData, resultIsFalse, resultIsTrue, rollbackTransaction, setCurrentSession, writeExtensionData
public WGUserAccess openSession(AuthenticationSession authSession, java.lang.Object credentials, boolean master) throws WGAPIException
WGDatabaseCore
authSession
- The authentication session of the current user. If there is no authentication module configured this is of type BackendAuthSession
credentials
- The credentials that the user gave for authenticatingmaster
- States, that the used login is the master loginWGAPIException
public void beginUpdate() throws WGBackendException
WGDatabaseCore
WGBackendException
public boolean isContentTypeUsed(WGContentType ct) throws WGAPIException
WGDatabaseCore
ct
- The content type to testWGAPIException
public boolean isLanguageUsed(WGLanguage lang) throws WGAPIException
WGDatabaseCore
lang
- The language to testWGAPIException
public boolean isBackendServiceSupported(java.lang.String serviceName)
WGDatabaseCore
serviceName
- Name of the servicepublic java.lang.Object callBackendService(java.lang.String serviceName, java.lang.Object[] params) throws WGAPIException
WGDatabaseCore
serviceName
- The service name. Use WGDatabase.BACKENDSERVICE_*params
- The matching parameters for the called serviceWGAPIException
public boolean hasFeature(java.lang.String feature)
WGDatabaseCore
hasFeature
in interface WGDatabaseCore
hasFeature
in class WGFakeDatabase
feature
- The requested feature. The constants WGDatabase.FEATURE_... are used here.public double getContentStoreVersion() throws WGAPIException
WGDatabaseCore
getContentStoreVersion
in interface WGDatabaseCore
getContentStoreVersion
in class WGFakeDatabase
WGAPIException
public int getContentStorePatchLevel() throws WGAPIException
WGDatabaseCore
getContentStorePatchLevel
in interface WGDatabaseCore
getContentStorePatchLevel
in class WGFakeDatabase
WGAPIException
public WGDocumentCore createUserProfile(java.lang.String name, int type) throws WGAPIException
WGPersonalisationDatabaseCore
createUserProfile
in interface WGPersonalisationDatabaseCore
createUserProfile
in class WGFakeDatabase
name
- The name, that the caller wants for the new profile. If null, the implementation should create a name.type
- The type, that the caller wants to assign the profile. Possible values chosen by personalisation implementationWGAPIException