Package com.axemble.vdoc.sdk.impl
Class CoreModule
java.lang.Object
com.axemble.vdoc.sdk.impl.AbstractTranslaterModule
com.axemble.vdoc.sdk.impl.CoreModule
- All Implemented Interfaces:
IModule
,Serializable
,Remote
- Direct Known Subclasses:
DirectoryModuleImpl
,IndexationModuleImpl
,PortalModuleImpl
,ProjectModuleImpl
,WorkflowModuleImpl
- Author:
- vlygeros
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionStarts a new transaction or use the current one.beginTransaction
(Object currentObject) Starts a new transaction if required.void
Commits the current transaction.void
commitTransaction
(Object currentObject) Commit a transactionAllows to convert any object to itsIStorageKey
object.createAttachment
(IContext context, File file) createAttachment
(IContext context, File file, boolean canBeRemoved) createAttachment
(IContext context, String fileName, byte[] bytes) createAttachment
(IContext context, String fileName, InputStream input) createProfile
(IContext context, IProtocolSupport link, String name) Class
<?> findNativeClass
(Class<?> interfaceClass) Allows to retrieve the inner native class.Gets the anonymous user.Gets the context of anonymous.com.axemble.vdoc.sdk.interfaces.ui.components.IComponentsFactory
getContext
(IStorageKey key) getContext
(IUser user) Gets a context form aIUser
object.getContext
(String externalId) Gets a context from the external identifier.getContextByLogin
(String login) Gets a context from the user's login.com.axemble.vdoc.sdk.interfaces.ui.definitions.IDefinitionsFactory
getElementByProtocolURI
(String protocolURI) getElementFromExternalElement
(ExternalElement externalElement) Retrieves the object of externalElementgetExternalElement
(Object object) Retrieves the externalElement of an objectgetExternalElement
(Object object, String language) Retrieves the externalElement of an object by specifying the language.Retrieves the current logged on user.Retrieves the context of the logged on userRetrieves the logged on user language or default to server defaultgetProfile
(IContext context, IProtocolSupport link, String name) getProfile
(IStorageKey key) Collection
<? extends IProfile> getProfiles
(IContext context, IProtocolSupport link) getProtocolPath
(Object object) Retrieves the protocol path of an object.getProtocolPath
(Object object, String language) Retrieves the protocol path of an object by specifying the language.getProtocolURI
(Object object) Retrieves the protocol URI of an object.getProtocolURI
(Object object, boolean useLabels) Retrieves the protocol URI of an object by using names or not.getStaticString
(IDynamicLocalizationsWrapper localizationsWrapper) Retrieves a java.lang.String form the localizationsWrapper.getStaticString
(String entryID) Retrieves a java.lang.String form the string resources XML files.getStaticString
(String entryID, String arg1) Retrieves a java.lang.String from the string resources XML files using one argument.getStaticString
(String entryID, String arg1, String arg2) Retrieves a java.lang.String from the string resources XML files using two arguments.getStaticString
(String entryID, String arg1, String arg2, String arg3) Retrieves a java.lang.String from the string resources XML files using three arguments.Retrieves a java.lang.String from the string resources XML files using four arguments.getStaticString
(String entryID, Locale locale) Retrieves a java.lang.String from the string resources XML files and specifying the local.getStaticString
(String entryID, Locale locale, String arg1) Retrieves a java.lang.String from the string resources XML files using one argument and specifying the local.getStaticString
(String entryID, Locale locale, String arg1, String arg2) Retrieves a java.lang.String from the string resources XML files using two arguments and specifying the local.Retrieves a java.lang.String from the string resources XML files using three arguments and specifying the local.Retrieves a java.lang.String from the string resources XML files using fourth arguments and specifying the local.Gets the sysadmin user.Gets the context of sysadmin.getUser
(IStorageKey key) getUserByLogin
(String login) void
initialize
(Properties properties) Initializes the module.boolean
Checks if there is a current transaction.void
Roll back the current transaction.void
rollbackTransaction
(Object currentObject) Roll back a transactionvoid
setTransactionTimeout
(int transactionTimeout) Allows the set the transaction timeout.void
Releases the module.Methods inherited from class com.axemble.vdoc.sdk.impl.AbstractTranslaterModule
getTranslation, getTranslationForLanguage, getTranslationKey
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.axemble.vdoc.sdk.modules.IModule
generateSystemName, getTranslation, getTranslationForLanguage, getTranslationKey
-
Field Details
-
LOGGER
public static final com.axemble.vdp.utils.Logger LOGGER -
properties
-
-
Constructor Details
-
CoreModule
public CoreModule()
-
-
Method Details
-
initialize
Description copied from interface:IModule
Initializes the module.- Specified by:
initialize
in interfaceIModule
- Parameters:
properties
- The custom properties.
-
unInitialize
public void unInitialize()Description copied from interface:IModule
Releases the module.- Specified by:
unInitialize
in interfaceIModule
-
getLoggedOnUser
Description copied from interface:IModule
Retrieves the current logged on user.- Specified by:
getLoggedOnUser
in interfaceIModule
- Returns:
- a
IUser
object.
-
getContext
Description copied from interface:IModule
Gets a context form aIUser
object.- Specified by:
getContext
in interfaceIModule
- Parameters:
user
- aIUser
object.- Returns:
- A
IContext
object.
-
getContext
-
getContext
Description copied from interface:IModule
Gets a context from the external identifier.- Specified by:
getContext
in interfaceIModule
- Parameters:
externalId
- The external identifier.- Returns:
- A
IContext
object.
-
getContextByLogin
Description copied from interface:IModule
Gets a context from the user's login.- Specified by:
getContextByLogin
in interfaceIModule
- Parameters:
login
- The user's login.- Returns:
- A
IContext
object.
-
getLoggedOnUserContext
Description copied from interface:IModule
Retrieves the context of the logged on user- Specified by:
getLoggedOnUserContext
in interfaceIModule
- Returns:
- a
IContext
object.
-
getLoggedOnUserLanguage
Description copied from interface:IModule
Retrieves the logged on user language or default to server default- Specified by:
getLoggedOnUserLanguage
in interfaceIModule
- Returns:
- user friendly language.
-
getAnonymous
Description copied from interface:IModule
Gets the anonymous user.- Specified by:
getAnonymous
in interfaceIModule
- Returns:
- A
IUser
object.
-
getAnonymousContext
Description copied from interface:IModule
Gets the context of anonymous.- Specified by:
getAnonymousContext
in interfaceIModule
- Returns:
- A
IContext
object.
-
getSysadmin
Description copied from interface:IModule
Gets the sysadmin user.- Specified by:
getSysadmin
in interfaceIModule
- Returns:
- A
IUser
object.
-
getSysadminContext
Description copied from interface:IModule
Gets the context of sysadmin.- Specified by:
getSysadminContext
in interfaceIModule
- Returns:
- A
IContext
object.
-
getUserByLogin
-
getUser
-
getUser
- Throws:
WorkflowModuleException
-
convertId
Description copied from interface:IModule
Allows to convert any object to itsIStorageKey
object.- Specified by:
convertId
in interfaceIModule
- Parameters:
object
-- Returns:
- a
IStorageKey
object.
-
getLanguage
-
getConfiguration
-
beginTransaction
Description copied from interface:IModule
Starts a new transaction or use the current one.- Specified by:
beginTransaction
in interfaceIModule
- Returns:
- The report object.
-
commitTransaction
public void commitTransaction()Description copied from interface:IModule
Commits the current transaction.- Specified by:
commitTransaction
in interfaceIModule
-
rollbackTransaction
public void rollbackTransaction()Description copied from interface:IModule
Roll back the current transaction.- Specified by:
rollbackTransaction
in interfaceIModule
-
beginTransaction
Description copied from interface:IModule
Starts a new transaction if required.- Specified by:
beginTransaction
in interfaceIModule
- Parameters:
currentObject
- The synchronized object. Not used anymore.- Returns:
- The report object.
-
setTransactionTimeout
Description copied from interface:IModule
Allows the set the transaction timeout.- Specified by:
setTransactionTimeout
in interfaceIModule
- Parameters:
transactionTimeout
- The transaction timeout in milliseconds.- Throws:
ModuleException
- The default exception.
-
commitTransaction
Commit a transaction- Specified by:
commitTransaction
in interfaceIModule
- Parameters:
currentObject
- The synchronized object. Not used anymore.
-
rollbackTransaction
Roll back a transaction- Specified by:
rollbackTransaction
in interfaceIModule
- Parameters:
currentObject
- The synchronized object. Not used anymore.
-
isTransactionActive
public boolean isTransactionActive()Description copied from interface:IModule
Checks if there is a current transaction.- Specified by:
isTransactionActive
in interfaceIModule
- Returns:
- true if a transaction has been started, false otherwise.
-
getStaticString
Description copied from interface:IModule
Retrieves a java.lang.String from the string resources XML files using one argument.- Specified by:
getStaticString
in interfaceIModule
- Parameters:
entryID
- The key.arg1
- The argument (%1) contained in the resource string.- Returns:
- The resource string.
-
getStaticString
Description copied from interface:IModule
Retrieves a java.lang.String from the string resources XML files using two arguments.- Specified by:
getStaticString
in interfaceIModule
- Parameters:
entryID
- The key.arg1
- The first argument (%1) contained in the resource string.arg2
- The second argument (%1) contained in the resource string.- Returns:
- The resource string.
-
getStaticString
Description copied from interface:IModule
Retrieves a java.lang.String from the string resources XML files using three arguments.- Specified by:
getStaticString
in interfaceIModule
- Parameters:
entryID
- The key.arg1
- The first argument (%1) contained in the resource string.arg2
- The second argument (%1) contained in the resource string.arg3
- The third argument (%1) contained in the resource string.- Returns:
- The resource string.
-
getStaticString
Description copied from interface:IModule
Retrieves a java.lang.String from the string resources XML files using four arguments.- Specified by:
getStaticString
in interfaceIModule
- Parameters:
entryID
- The key.arg1
- The first argument (%1) contained in the resource string.arg2
- The second argument (%1) contained in the resource string.arg3
- The third argument (%1) contained in the resource string.arg4
- The fourth argument (%1) contained in the resource string.- Returns:
- The resource string.
-
getStaticString
Description copied from interface:IModule
Retrieves a java.lang.String form the localizationsWrapper.- Specified by:
getStaticString
in interfaceIModule
- Parameters:
localizationsWrapper
- IDynamicLocalizationsWrapper object- Returns:
- The translated string.
-
getStaticString
Description copied from interface:IModule
Retrieves a java.lang.String form the string resources XML files.- Specified by:
getStaticString
in interfaceIModule
- Parameters:
entryID
- The key.- Returns:
- The resource string.
-
getProtocolURI
Description copied from interface:IModule
Retrieves the protocol URI of an object.- Specified by:
getProtocolURI
in interfaceIModule
- Parameters:
object
- The object to retrieve the protocol URI from.- Returns:
- A java.lang.String value.
- Throws:
ModuleException
- The default exception.
-
getProtocolURI
Description copied from interface:IModule
Retrieves the protocol URI of an object by using names or not.- Specified by:
getProtocolURI
in interfaceIModule
- Parameters:
object
- The object to retrieve the protocol URI from.useLabels
- Uses names or not.- Returns:
- A java.lang.String value.
- Throws:
ModuleException
- The default exception.
-
getProtocolPath
Description copied from interface:IModule
Retrieves the protocol path of an object.- Specified by:
getProtocolPath
in interfaceIModule
- Parameters:
object
- The object to retrieve the protocol path from.- Returns:
- A java.lang.String value.
- Throws:
ModuleException
- The default exception.
-
getProtocolPath
Description copied from interface:IModule
Retrieves the protocol path of an object by specifying the language.- Specified by:
getProtocolPath
in interfaceIModule
- Parameters:
object
- The object to retrieve the protocol path from.language
- The requested language.- Returns:
- A java.lang.String value.
- Throws:
ModuleException
- The default exception.
-
getElementByProtocolURI
- Throws:
ModuleException
-
getStaticString
Description copied from interface:IModule
Retrieves a java.lang.String from the string resources XML files and specifying the local.- Specified by:
getStaticString
in interfaceIModule
- Parameters:
entryID
- The key.locale
- TheLocale
to use.- Returns:
- The resource string.
-
getStaticString
Description copied from interface:IModule
Retrieves a java.lang.String from the string resources XML files using one argument and specifying the local.- Specified by:
getStaticString
in interfaceIModule
- Parameters:
entryID
- The key.locale
- TheLocale
to use.arg1
- The argument (%1) contained in the resource string.- Returns:
- The resource string.
-
getStaticString
Description copied from interface:IModule
Retrieves a java.lang.String from the string resources XML files using two arguments and specifying the local.- Specified by:
getStaticString
in interfaceIModule
- Parameters:
entryID
- The key.locale
- TheLocale
to use.arg1
- The first argument (%1) contained in the resource string.arg2
- The second argument (%1) contained in the resource string.- Returns:
- The resource string.
-
getStaticString
Description copied from interface:IModule
Retrieves a java.lang.String from the string resources XML files using three arguments and specifying the local.- Specified by:
getStaticString
in interfaceIModule
- Parameters:
entryID
- The key.locale
- TheLocale
to use.arg1
- The first argument (%1) contained in the resource string.arg2
- The second argument (%1) contained in the resource string.arg3
- The third argument (%1) contained in the resource string.- Returns:
- The resource string.
-
getStaticString
public String getStaticString(String entryID, Locale locale, String arg1, String arg2, String arg3, String arg4) Description copied from interface:IModule
Retrieves a java.lang.String from the string resources XML files using fourth arguments and specifying the local.- Specified by:
getStaticString
in interfaceIModule
- Parameters:
entryID
- The key.locale
- TheLocale
to use.arg1
- The first argument (%1) contained in the resource string.arg2
- The second argument (%1) contained in the resource string.arg3
- The third argument (%1) contained in the resource string.arg4
- The third argument (%1) contained in the resource string.- Returns:
- The resource string.
-
findNativeClass
Description copied from interface:IModule
Allows to retrieve the inner native class.- Specified by:
findNativeClass
in interfaceIModule
- Parameters:
interfaceClass
- A class type.- Returns:
- The inner native class.
-
getComponentsFactory
public com.axemble.vdoc.sdk.interfaces.ui.components.IComponentsFactory getComponentsFactory() -
getDefinitionsFactory
public com.axemble.vdoc.sdk.interfaces.ui.definitions.IDefinitionsFactory getDefinitionsFactory() -
createProfile
public IProfile createProfile(IContext context, IProtocolSupport link, String name) throws ModuleException - Throws:
ModuleException
-
getProfile
public IProfile getProfile(IContext context, IProtocolSupport link, String name) throws ModuleException - Throws:
ModuleException
-
getProfiles
public Collection<? extends IProfile> getProfiles(IContext context, IProtocolSupport link) throws ModuleException - Throws:
ModuleException
-
getProfile
- Throws:
ModuleException
-
createAttachment
-
createAttachment
-
createAttachment
-
createAttachment
-
getExternalElement
Description copied from interface:IModule
Retrieves the externalElement of an object- Specified by:
getExternalElement
in interfaceIModule
- Parameters:
object
- The object to retrieve the external element from- Returns:
- A com.axemble.vdoc.sdk.structs.ExternalElement value.
- Throws:
ModuleException
- The default exception.
-
getExternalElement
Description copied from interface:IModule
Retrieves the externalElement of an object by specifying the language.- Specified by:
getExternalElement
in interfaceIModule
- Parameters:
object
- The object to retrieve the external element fromlanguage
- The requested language.- Returns:
- A com.axemble.vdoc.sdk.structs.ExternalElement value.
- Throws:
ModuleException
- The default exception.
-
getElementFromExternalElement
Description copied from interface:IModule
Retrieves the object of externalElement- Specified by:
getElementFromExternalElement
in interfaceIModule
- Parameters:
externalElement
- The externalElement to retrieve the object from- Returns:
- A java.lang.Object value.
- Throws:
ModuleException
- The default exception.
-