Class PortalModule

All Implemented Interfaces:
IModule, Remote
Direct Known Subclasses:
EzsSiteModule, PortalLibraryModule, PortalModuleImpl.JDOPortalModule

public abstract class PortalModule extends AbstractTranslaterModule implements IModule
Author:
vlygeros
  • Field Details

    • currentContext

      protected IContext currentContext
    • report

      protected IReport report
  • Constructor Details

    • PortalModule

      public PortalModule()
  • Method Details

    • getPersistenceManager

      public abstract javax.jdo.PersistenceManager getPersistenceManager()
    • 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.
    • 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.
    • 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)
      Retrieve a context by user's key
      Parameters:
      key - the user's key
      Returns:
      the user's IContext
    • 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.
    • getUser

      public IUser getUser(IStorageKey key)
      Retrieve user by key
      Parameters:
      key - the user's key
      Returns:
      the user matching the key
    • getUser

      public IUser getUser(String id) throws WorkflowModuleException
      Retrieve user by id
      Parameters:
      id - the user's id string
      Returns:
      the user matching the id
      Throws:
      WorkflowModuleException - a potential WorkflowModuleException
    • 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.
    • 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.
    • refreshUser

      public com.axemble.directory.jdo.beans.User refreshUser(IUser user)
      Retrieve a refreshed user
      Parameters:
      user - the user
      Returns:
      the fresh user
    • getUserByLogin

      public IUser getUserByLogin(String login)
      Retrieve a user by login
      Parameters:
      login - the user's login
      Returns:
      the user matching login
    • 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.
    • getCurrentContext

      public final IContext getCurrentContext()
      Returns:
      the currentContext
    • 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 - Any form of the object.
      Returns:
      a IStorageKey object.
    • 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.
    • getLanguage

      public String getLanguage()
    • 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.
    • 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.
    • generateSystemName

      public String generateSystemName(String label)
      Description copied from interface: IModule
      Generate a valid system name for this module and this label.
      Specified by:
      generateSystemName in interface IModule
      Parameters:
      label - label to normalize
      Returns:
      normalized value