Package com.axemble.vdoc.sdk.modules
Interface IBasePortalModule
- All Known Subinterfaces:
- IPortalModule
- All Known Implementing Classes:
- PortalModuleImpl
The IPortalModule interface is the main entry point from where most of the methods to manipulate the full set of portal 
 objects are made available.
 
Code sample :
 
 // creation of a portal module object
 IBasePortalModule portalModule = Modules.getPortalModule();
 try
 {
 }
 finally
 {
  // uninitialize the module
        Modules.releaseModule(portalModule);
 }
 
- Since:
- 2.0
- Version:
- 1.0, 14/02/2009
- Author:
- vlygeros
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAuthenticationKey(String key, IUser user, Date expirationDate, String authorizedAddresses) Adds an authenticationKey for a user The ExternalAuthenticationLoginModule will be automatically connect the user if he uses the parameter _AuthenticationKeycreateConnectionDefinition(IContext context, IOrganization organization, String name, String label, String categoryName) Create a connection definitioncreateMailingList(IContext context, IOrganization organization, String name, String label, int type) Creates a new mailing list.voidcreateNewSession(String login) Creates a new session.executeTask(Class<?> extensionClass, Map<String, String> parameters) Execute a BaseTaskExtensiongenerateAuthenticationKey(IUser user, Date expirationDate, String authorizedAddresses) Generates and adds an authenticationKey for a user The ExternalAuthenticationLoginModule will be automatically connect the user if he uses the parameter _AuthenticationKeyGets an AsyncJobQueue controller.Gets the global configuration.getConnectionDefinition(IContext context, String name) Gets a connection from its name.Collection<? extends IConnectionDefinition<?>> getConnectionDefinitions(IContext context) Gets a collection of connections.Collection<? extends IConnectionDefinition<?>> getConnectionDefinitionsByCategoryName(IContext context, String categoryName) Gets a connection from its name.Collection<? extends IConnectionDefinition<?>> getConnectionDefinitionsByTypeName(IContext context, String type) Gets a connection from its name.getElementByProtocolURI(String protocolURI) Gets anIElementobject which implementsIProtocolSupportinterface.Gets a History Event controller.getIndexController(String name) Gets the controller of the specified index name.Gets a JMS controller.getMailingList(IContext context, String name, int type) Gets a mailing list by its name.Gets a mailing list object from its identifier.getMailingList(Object object) Deprecated.use getMailingList( IStorageKey key )Collection<? extends IMailingList> getMailingLists(IContext context) Gets all mailing lists.Get anINotificationControllergetPortlet(IContext context, String name) Gets a portlet by its name.getProtocolURI(IProtocolSupport protocolSupport) Gets a protocolURI from aIProtocolSupportobject.getProtocolURI(IProtocolSupport protocolSupport, boolean useNames) Gets a protocolURI from aIProtocolSupportobject.getSecurityController(ISecuritySupport securitySupport) Gets a security controller on a specified object.getValidatorErrorMessage(String rule, String language) Get the validator's error messagevoidKills the current session.voidkillSession(jakarta.servlet.http.HttpSession session) Kills a session.voidreplaceCurrentSession(String login) Replaces the current session.voidsend(jakarta.mail.internet.MimeMessage message) Allows to send a message through the mail agent.<T> booleanvalidate(Collection<T> values, String... rules) Validate values with validator's rules<T> booleanValidate value with validator's rulesbooleanverifyAuthentication(String login, String password) Verifies login / password parameters against JAAS.verifyPassword(String login, String password) Allows to verify a password for a specified user login.verifyPassword(String login, String password, jakarta.servlet.http.HttpServletRequest request) Allows to verify a password for a specified user login.verifyToken(String token) Verifies authentication tokenMethods inherited from interface com.axemble.vdoc.sdk.modules.IModulebeginTransaction, beginTransaction, commitTransaction, commitTransaction, convertId, findNativeClass, generateSystemName, getAnonymous, getAnonymousContext, getContext, getContext, getContextByLogin, getElementFromExternalElement, getExternalElement, getExternalElement, getLoggedOnUser, getLoggedOnUserContext, getLoggedOnUserLanguage, getProtocolPath, getProtocolPath, getProtocolURI, getProtocolURI, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getSysadmin, getSysadminContext, getTranslation, getTranslationForLanguage, getTranslationKey, initialize, isTransactionActive, rollbackTransaction, rollbackTransaction, setTransactionTimeout, unInitialize
- 
Method Details- 
getConfigurationIConfiguration getConfiguration()Gets the global configuration.- Returns:
- a IConfigurationobject.
 
- 
verifyAuthenticationVerifies login / password parameters against JAAS.- Parameters:
- login- The login of the user to verify.
- password- The password of the user to verify.
- Returns:
- true if the parameters are valid, false otherwise.
 
- 
verifyTokenVerifies authentication token- Parameters:
- token- the token to verify
- Returns:
- null if the token is invalid or expired, the matching IUserif the token is valid
 
- 
killCurrentSessionKills the current session.- Throws:
- PortalModuleException- default module exception.
 
- 
killSessionKills a session.- Parameters:
- session- the session to kill
- Throws:
- PortalModuleException- default module exception.
 
- 
createNewSessionCreates a new session.- Parameters:
- login- The login of the user to create the session.
- Throws:
- PortalModuleException- default module exception.
 
- 
replaceCurrentSessionReplaces the current session.- Parameters:
- login- The login of the user to replace the session with.
- Throws:
- PortalModuleException- default module exception.
 
- 
addAuthenticationKeyvoid addAuthenticationKey(String key, IUser user, Date expirationDate, String authorizedAddresses) throws PortalModuleException Adds an authenticationKey for a user The ExternalAuthenticationLoginModule will be automatically connect the user if he uses the parameter _AuthenticationKey- Parameters:
- key-
- user-
- expirationDate-
- authorizedAddresses- (the user will be able to connect only from these ip addresses : null to allow any address)
- Throws:
- PortalModuleException
 
- 
generateAuthenticationKeyString generateAuthenticationKey(IUser user, Date expirationDate, String authorizedAddresses) throws PortalModuleException Generates and adds an authenticationKey for a user The ExternalAuthenticationLoginModule will be automatically connect the user if he uses the parameter _AuthenticationKey- Parameters:
- user-
- expirationDate-
- authorizedAddresses- (the user will be able to connect only from these ip addresses : null to allow any address)
- Returns:
- the authentication key
- Throws:
- PortalModuleException
 
- 
getPortletGets a portlet by its name.- Parameters:
- context- The execution context.
- name- The name of the- IPortletobject.
- Returns:
- The IPortletobject.
- Throws:
- PortalModuleException- default module exception.
 
- 
getSecurityControllerISecurityController getSecurityController(ISecuritySupport securitySupport) throws PortalModuleException Gets a security controller on a specified object.- Parameters:
- securitySupport- Any IElement that implements ISecuritySupport interface.
- Returns:
- The ISecurityControllerobject.
- Throws:
- PortalModuleException- default module exception.
 
- 
getJMSControllerGets a JMS controller.- Returns:
- the IJMSControllerobject.
- Throws:
- PortalModuleException- default module exception.
 
- 
getNotificationControllerGet anINotificationController- Returns:
- the INotificationControllerinstance
- Throws:
- PortalModuleException- default module exception
 
- 
getAsyncJobQueueControllerIAsyncJobQueueController getAsyncJobQueueController()Gets an AsyncJobQueue controller.- Returns:
- the IAsyncJobQueueControllerobject.
 
- 
getHistoryEventControllerIEventController getHistoryEventController()Gets a History Event controller.- Returns:
- the IEventControllerobject.
 
- 
verifyPasswordAllows to verify a password for a specified user login.- Parameters:
- login- The login of the user.
- password- The password to verify.
- Returns:
- A IUserobject.
 
- 
verifyPasswordIUser verifyPassword(String login, String password, jakarta.servlet.http.HttpServletRequest request) Allows to verify a password for a specified user login.- Parameters:
- login- The login of the user.
- password- The password to verify.
- request- The http Request
- Returns:
- A IUserobject.
 
- 
createMailingListIMailingList createMailingList(IContext context, IOrganization organization, String name, String label, int type) throws PortalModuleException Creates a new mailing list.- Parameters:
- context- the execution context.
- organization- the- IOrganizationof the mailing list.
- name- the system name of the mailing list.
- label- the label of the mailing list.
- type- the type of the mailing list.
- Returns:
- a IMailingListobject.
- Throws:
- PortalModuleException- default module exception.
 
- 
getMailingListGets a mailing list by its name.- Parameters:
- context- the execution context.
- name- the name of the- IMailingListobject.
- type- the mailing list type
- Returns:
- a IMailingListobject
- Throws:
- PortalModuleException- default module exception.
 
- 
getMailingListsGets all mailing lists.- Parameters:
- context- the execution context.
- Returns:
- a java.util.Collection of IMailingListobjects.
- Throws:
- PortalModuleException- default module exception.
 
- 
getMailingListDeprecated.use getMailingList( IStorageKey key )Gets a mailing list object from its identifier.- Parameters:
- object- A object.
- Returns:
- A IMailingListobject.
- Throws:
- PortalModuleException- default module exception.
 
- 
getMailingListGets a mailing list object from its identifier.- Parameters:
- key- The key of the mailing list.
- Returns:
- A IMailingListobject.
- Throws:
- PortalModuleException- default module exception.
 
- 
sendAllows to send a message through the mail agent.- Parameters:
- message- The- MimeMessageobject to send.
- Throws:
- PortalModuleException- default module exception.
 
- 
getElementByProtocolURIGets anIElementobject which implementsIProtocolSupportinterface.- Parameters:
- protocolURI- The protocol URI as a java.lang.String.
- Returns:
- A IProtocolSupportobject.
- Throws:
- ModuleException- default module exception.
 
- 
getProtocolURIGets a protocolURI from aIProtocolSupportobject.- Parameters:
- protocolSupport- The object to convert into a protocolURI.
- Returns:
- A Stringshort protocolURI.
- Throws:
- ModuleException- default module exception.
 
- 
getProtocolURIGets a protocolURI from aIProtocolSupportobject.- Parameters:
- protocolSupport- The object to convert into a protocolURI.
- useNames- use short URI (with id) or long URI (with system names)
- Returns:
- A StringprotocolURI.
- Throws:
- ModuleException- default module exception.
 
- 
getIndexControllerGets the controller of the specified index name.- Parameters:
- name- The name of the index.
- Returns:
- A IIndexControllerobject.
- Throws:
- PortalModuleException- default module exception.
 
- 
validateValidate value with validator's rules- Parameters:
- value- value to validate
- rules- rules to apply for validation
- Returns:
- true if the value is valid, false otherwise.
 
- 
validateValidate values with validator's rules- Parameters:
- values- values to validate
- rules- rules to apply for validation
- Returns:
- true if all the values are valid, false otherwise.
 
- 
getValidatorErrorMessageGet the validator's error message- Parameters:
- rule- The validator's name
- language- The language
- Returns:
- the validator's error message, null otherwise
 
- 
executeTaskIReport executeTask(Class<?> extensionClass, Map<String, String> parameters) throws PortalModuleExceptionExecute a BaseTaskExtension- Parameters:
- extensionClass- class to execute
- parameters- parameters sent to the map
- Returns:
- execution report
- Throws:
- PortalModuleException
 
- 
getConnectionDefinitionIConnectionDefinition<?> getConnectionDefinition(IContext context, String name) throws PortalModuleException Gets a connection from its name.- Parameters:
- context- The execution context.
- name- The name of the external reference.
- Returns:
- a IConnectionDefinitionobject.
- Throws:
- PortalModuleException- default module exception.
 
- 
getConnectionDefinitionsByTypeNameCollection<? extends IConnectionDefinition<?>> getConnectionDefinitionsByTypeName(IContext context, String type) throws PortalModuleException Gets a connection from its name.- Parameters:
- context- The execution context.
- type- The type of the external reference.
- Returns:
- a Collectionof IConnectionDefinition object.
- Throws:
- PortalModuleException- default module exception.
 
- 
getConnectionDefinitionsByCategoryNameCollection<? extends IConnectionDefinition<?>> getConnectionDefinitionsByCategoryName(IContext context, String categoryName) throws PortalModuleException Gets a connection from its name.- Parameters:
- context- The execution context.
- categoryName- The categoryName of the external reference.
- Returns:
- a Collectionof IConnectionDefinition object.
- Throws:
- PortalModuleException- default module exception.
 
- 
getConnectionDefinitionsCollection<? extends IConnectionDefinition<?>> getConnectionDefinitions(IContext context) throws PortalModuleException Gets a collection of connections.- Parameters:
- context- The execution context.
- Returns:
- a Collectionof IConnectionDefinition object.
- Throws:
- PortalModuleException- default module exception.
 
- 
createConnectionDefinitionIConnectionDefinition<?> createConnectionDefinition(IContext context, IOrganization organization, String name, String label, String categoryName) throws PortalModuleException Create a connection definition- Parameters:
- context- The execution context.
- organization- the- IOrganizationorganization of the connection
- name- the name of the connection
- label- The label of the connection
- categoryName- the type of the connection
- Returns:
- the new connection definition
- Throws:
- PortalModuleException- default module exception.
 
 
-