Class CoreModule

All Implemented Interfaces:
IModule, Serializable, Remote
Direct Known Subclasses:
DirectoryModuleImpl, IndexationModuleImpl, PortalModuleImpl, ProjectModuleImpl, WorkflowModuleImpl

public abstract class CoreModule extends AbstractTranslaterModule implements IModule, Serializable
Author:
vlygeros
See Also:
  • Field Details

    • LOGGER

      public static final com.axemble.vdp.utils.Logger LOGGER
    • properties

      protected Properties properties
  • Constructor Details

    • CoreModule

      public CoreModule()
  • Method Details

    • initialize

      public void initialize(Properties properties)
      Description copied from interface: IModule
      Initializes the module.
      Specified by:
      initialize in interface IModule
      Parameters:
      properties - The custom properties.
    • unInitialize

      public void unInitialize()
      Description copied from interface: IModule
      Releases the module.
      Specified by:
      unInitialize in interface IModule
    • getLoggedOnUser

      public IUser getLoggedOnUser()
      Description copied from interface: IModule
      Retrieves the current logged on user.
      Specified by:
      getLoggedOnUser in interface IModule
      Returns:
      a IUser object.
    • getContext

      public IContext getContext(IUser user)
      Description copied from interface: IModule
      Gets a context form a IUser object.
      Specified by:
      getContext in interface IModule
      Parameters:
      user - a IUser object.
      Returns:
      A IContext object.
    • getContext

      public IContext getContext(IStorageKey key)
    • getContext

      public IContext getContext(String externalId)
      Description copied from interface: IModule
      Gets a context from the external identifier.
      Specified by:
      getContext in interface IModule
      Parameters:
      externalId - The external identifier.
      Returns:
      A IContext object.
    • getContextByLogin

      public IContext getContextByLogin(String login)
      Description copied from interface: IModule
      Gets a context from the user's login.
      Specified by:
      getContextByLogin in interface IModule
      Parameters:
      login - The user's login.
      Returns:
      A IContext object.
    • getLoggedOnUserContext

      public IContext getLoggedOnUserContext()
      Description copied from interface: IModule
      Retrieves the context of the logged on user
      Specified by:
      getLoggedOnUserContext in interface IModule
      Returns:
      a IContext object.
    • getLoggedOnUserLanguage

      public String getLoggedOnUserLanguage()
      Description copied from interface: IModule
      Retrieves the logged on user language or default to server default
      Specified by:
      getLoggedOnUserLanguage in interface IModule
      Returns:
      user friendly language.
    • getAnonymous

      public IUser getAnonymous()
      Description copied from interface: IModule
      Gets the anonymous user.
      Specified by:
      getAnonymous in interface IModule
      Returns:
      A IUser object.
    • getAnonymousContext

      public IContext getAnonymousContext()
      Description copied from interface: IModule
      Gets the context of anonymous.
      Specified by:
      getAnonymousContext in interface IModule
      Returns:
      A IContext object.
    • getSysadmin

      public IUser getSysadmin()
      Description copied from interface: IModule
      Gets the sysadmin user.
      Specified by:
      getSysadmin in interface IModule
      Returns:
      A IUser object.
    • getSysadminContext

      public IContext getSysadminContext()
      Description copied from interface: IModule
      Gets the context of sysadmin.
      Specified by:
      getSysadminContext in interface IModule
      Returns:
      A IContext object.
    • getUserByLogin

      public IUser getUserByLogin(String login)
    • getUser

      public IUser getUser(IStorageKey key)
    • getUser

      public IUser getUser(String id) throws WorkflowModuleException
      Throws:
      WorkflowModuleException
    • convertId

      public IStorageKey convertId(Object object)
      Description copied from interface: IModule
      Allows to convert any object to its IStorageKey object.
      Specified by:
      convertId in interface IModule
      Parameters:
      object -
      Returns:
      a IStorageKey object.
    • getLanguage

      public String getLanguage()
    • getConfiguration

      public IConfiguration getConfiguration()
    • beginTransaction

      public IReport beginTransaction()
      Description copied from interface: IModule
      Starts a new transaction or use the current one.
      Specified by:
      beginTransaction in interface IModule
      Returns:
      The report object.
    • commitTransaction

      public void commitTransaction()
      Description copied from interface: IModule
      Commits the current transaction.
      Specified by:
      commitTransaction in interface IModule
    • rollbackTransaction

      public void rollbackTransaction()
      Description copied from interface: IModule
      Roll back the current transaction.
      Specified by:
      rollbackTransaction in interface IModule
    • beginTransaction

      public IReport beginTransaction(Object currentObject)
      Description copied from interface: IModule
      Starts a new transaction if required.
      Specified by:
      beginTransaction in interface IModule
      Parameters:
      currentObject - The synchronized object. Not used anymore.
      Returns:
      The report object.
    • setTransactionTimeout

      public void setTransactionTimeout(int transactionTimeout) throws ModuleException
      Description copied from interface: IModule
      Allows the set the transaction timeout.
      Specified by:
      setTransactionTimeout in interface IModule
      Parameters:
      transactionTimeout - The transaction timeout in milliseconds.
      Throws:
      ModuleException - The default exception.
    • commitTransaction

      public void commitTransaction(Object currentObject)
      Commit a transaction
      Specified by:
      commitTransaction in interface IModule
      Parameters:
      currentObject - The synchronized object. Not used anymore.
    • rollbackTransaction

      public void rollbackTransaction(Object currentObject)
      Roll back a transaction
      Specified by:
      rollbackTransaction in interface IModule
      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 interface IModule
      Returns:
      true if a transaction has been started, false otherwise.
    • getStaticString

      public String getStaticString(String entryID, String arg1)
      Description copied from interface: IModule
      Retrieves a java.lang.String from the string resources XML files using one argument.
      Specified by:
      getStaticString in interface IModule
      Parameters:
      entryID - The key.
      arg1 - The argument (%1) contained in the resource string.
      Returns:
      The resource string.
    • getStaticString

      public String getStaticString(String entryID, String arg1, String arg2)
      Description copied from interface: IModule
      Retrieves a java.lang.String from the string resources XML files using two arguments.
      Specified by:
      getStaticString in interface IModule
      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

      public String getStaticString(String entryID, String arg1, String arg2, String arg3)
      Description copied from interface: IModule
      Retrieves a java.lang.String from the string resources XML files using three arguments.
      Specified by:
      getStaticString in interface IModule
      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

      public String getStaticString(String entryID, 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 four arguments.
      Specified by:
      getStaticString in interface IModule
      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

      public String getStaticString(IDynamicLocalizationsWrapper localizationsWrapper)
      Description copied from interface: IModule
      Retrieves a java.lang.String form the localizationsWrapper.
      Specified by:
      getStaticString in interface IModule
      Parameters:
      localizationsWrapper - IDynamicLocalizationsWrapper object
      Returns:
      The translated string.
    • getStaticString

      public String getStaticString(String entryID)
      Description copied from interface: IModule
      Retrieves a java.lang.String form the string resources XML files.
      Specified by:
      getStaticString in interface IModule
      Parameters:
      entryID - The key.
      Returns:
      The resource string.
    • getProtocolURI

      public String getProtocolURI(Object object) throws ModuleException
      Description copied from interface: IModule
      Retrieves the protocol URI of an object.
      Specified by:
      getProtocolURI in interface IModule
      Parameters:
      object - The object to retrieve the protocol URI from.
      Returns:
      A java.lang.String value.
      Throws:
      ModuleException - The default exception.
    • getProtocolURI

      public String getProtocolURI(Object object, boolean useLabels) throws ModuleException
      Description copied from interface: IModule
      Retrieves the protocol URI of an object by using names or not.
      Specified by:
      getProtocolURI in interface IModule
      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

      public String getProtocolPath(Object object) throws ModuleException
      Description copied from interface: IModule
      Retrieves the protocol path of an object.
      Specified by:
      getProtocolPath in interface IModule
      Parameters:
      object - The object to retrieve the protocol path from.
      Returns:
      A java.lang.String value.
      Throws:
      ModuleException - The default exception.
    • getProtocolPath

      public String getProtocolPath(Object object, String language) throws ModuleException
      Description copied from interface: IModule
      Retrieves the protocol path of an object by specifying the language.
      Specified by:
      getProtocolPath in interface IModule
      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

      public IProtocolSupport getElementByProtocolURI(String protocolURI) throws ModuleException
      Throws:
      ModuleException
    • getStaticString

      public String getStaticString(String entryID, Locale locale)
      Description copied from interface: IModule
      Retrieves a java.lang.String from the string resources XML files and specifying the local.
      Specified by:
      getStaticString in interface IModule
      Parameters:
      entryID - The key.
      locale - The Locale to use.
      Returns:
      The resource string.
    • getStaticString

      public String getStaticString(String entryID, Locale locale, String arg1)
      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 interface IModule
      Parameters:
      entryID - The key.
      locale - The Locale to use.
      arg1 - The argument (%1) contained in the resource string.
      Returns:
      The resource string.
    • getStaticString

      public String getStaticString(String entryID, Locale locale, String arg1, String arg2)
      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 interface IModule
      Parameters:
      entryID - The key.
      locale - The Locale 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

      public String getStaticString(String entryID, Locale locale, String arg1, String arg2, String arg3)
      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 interface IModule
      Parameters:
      entryID - The key.
      locale - The Locale 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 interface IModule
      Parameters:
      entryID - The key.
      locale - The Locale 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

      public Class<?> findNativeClass(Class<?> interfaceClass)
      Description copied from interface: IModule
      Allows to retrieve the inner native class.
      Specified by:
      findNativeClass in interface IModule
      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

      public IProfile getProfile(IStorageKey key) throws ModuleException
      Throws:
      ModuleException
    • createAttachment

      public IAttachment createAttachment(IContext context, String fileName, InputStream input)
    • createAttachment

      public IAttachment createAttachment(IContext context, File file)
    • createAttachment

      public IAttachment createAttachment(IContext context, File file, boolean canBeRemoved)
    • createAttachment

      public IAttachment createAttachment(IContext context, String fileName, byte[] bytes)
    • getExternalElement

      public ExternalElement getExternalElement(Object object) throws ModuleException
      Description copied from interface: IModule
      Retrieves the externalElement of an object
      Specified by:
      getExternalElement in interface IModule
      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

      public ExternalElement getExternalElement(Object object, String language) throws ModuleException
      Description copied from interface: IModule
      Retrieves the externalElement of an object by specifying the language.
      Specified by:
      getExternalElement in interface IModule
      Parameters:
      object - The object to retrieve the external element from
      language - The requested language.
      Returns:
      A com.axemble.vdoc.sdk.structs.ExternalElement value.
      Throws:
      ModuleException - The default exception.
    • getElementFromExternalElement

      public Object getElementFromExternalElement(ExternalElement externalElement) throws ModuleException
      Description copied from interface: IModule
      Retrieves the object of externalElement
      Specified by:
      getElementFromExternalElement in interface IModule
      Parameters:
      externalElement - The externalElement to retrieve the object from
      Returns:
      A java.lang.Object value.
      Throws:
      ModuleException - The default exception.