Package com.axemble.vdoc.sdk.modules
Interface IPortalModule
- All Superinterfaces:
IBasePortalModule,IModule,Remote
- 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
IPortalModule portalModule = SDKFactory.MODULES.getPortalModule();
try
{
}
finally
{
// uninitialize the module
SDKFactory.MODULES.releaseModule(portalModule);
}
- See Also:
-
Method Summary
Modifier 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.IModule
beginTransaction, 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
-
getConfiguration
IConfiguration getConfiguration()Gets the global configuration.- Specified by:
getConfigurationin interfaceIBasePortalModule- Returns:
- a
IConfigurationobject.
-
verifyAuthentication
Verifies login / password parameters against JAAS.- Specified by:
verifyAuthenticationin interfaceIBasePortalModule- 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.
-
verifyToken
Verifies authentication token- Specified by:
verifyTokenin interfaceIBasePortalModule- Parameters:
token- the token to verify- Returns:
- null if the token is invalid or expired, the matching
IUserif the token is valid
-
killCurrentSession
Kills the current session.- Specified by:
killCurrentSessionin interfaceIBasePortalModule- Throws:
PortalModuleException- default module exception.
-
killSession
Kills a session.- Specified by:
killSessionin interfaceIBasePortalModule- Parameters:
session- the session to kill- Throws:
PortalModuleException- default module exception.
-
createNewSession
Creates a new session.- Specified by:
createNewSessionin interfaceIBasePortalModule- Parameters:
login- The login of the user to create the session.- Throws:
PortalModuleException- default module exception.
-
replaceCurrentSession
Replaces the current session.- Specified by:
replaceCurrentSessionin interfaceIBasePortalModule- Parameters:
login- The login of the user to replace the session with.- Throws:
PortalModuleException- default module exception.
-
addAuthenticationKey
void 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- Specified by:
addAuthenticationKeyin interfaceIBasePortalModule- Parameters:
key- the authentication keyuser- the user to connectexpirationDate- (the authentication key will be valid until this date)authorizedAddresses- (the user will be able to connect only from these ip addresses : null to allow any address)- Throws:
PortalModuleException- default module exception.
-
generateAuthenticationKey
String 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- Specified by:
generateAuthenticationKeyin interfaceIBasePortalModule- Parameters:
user- the user to connectexpirationDate- (the authentication key will be valid until this date)authorizedAddresses- (the user will be able to connect only from these ip addresses : null to allow any address)- Returns:
- the authentication key
- Throws:
PortalModuleException- default module exception.
-
getPortlet
Gets a portlet by its name.- Specified by:
getPortletin interfaceIBasePortalModule- Parameters:
context- The execution context.name- The name of theIPortletobject.- Returns:
- The
IPortletobject. - Throws:
PortalModuleException- default module exception.
-
getSecurityController
ISecurityController getSecurityController(ISecuritySupport securitySupport) throws PortalModuleException Gets a security controller on a specified object.- Specified by:
getSecurityControllerin interfaceIBasePortalModule- Parameters:
securitySupport- Any IElement that implements ISecuritySupport interface.- Returns:
- The
ISecurityControllerobject. - Throws:
PortalModuleException- default module exception.
-
getJMSController
Gets a JMS controller.- Specified by:
getJMSControllerin interfaceIBasePortalModule- Returns:
- the
IJMSControllerobject. - Throws:
PortalModuleException- default module exception.
-
getNotificationController
Get anINotificationController- Specified by:
getNotificationControllerin interfaceIBasePortalModule- Returns:
- the
INotificationControllerinstance - Throws:
PortalModuleException- default module exception
-
getAsyncJobQueueController
IAsyncJobQueueController getAsyncJobQueueController()Gets an AsyncJobQueue controller.- Specified by:
getAsyncJobQueueControllerin interfaceIBasePortalModule- Returns:
- the
IAsyncJobQueueControllerobject.
-
getHistoryEventController
IEventController getHistoryEventController()Gets a History Event controller.- Specified by:
getHistoryEventControllerin interfaceIBasePortalModule- Returns:
- the
IEventControllerobject.
-
verifyPassword
Allows to verify a password for a specified user login.- Specified by:
verifyPasswordin interfaceIBasePortalModule- Parameters:
login- The login of the user.password- The password to verify.- Returns:
- A
IUserobject.
-
verifyPassword
IUser verifyPassword(String login, String password, jakarta.servlet.http.HttpServletRequest request) Allows to verify a password for a specified user login.- Specified by:
verifyPasswordin interfaceIBasePortalModule- Parameters:
login- The login of the user.password- The password to verify.request- The http Request- Returns:
- A
IUserobject.
-
createMailingList
IMailingList createMailingList(IContext context, IOrganization organization, String name, String label, int type) throws PortalModuleException Creates a new mailing list.- Specified by:
createMailingListin interfaceIBasePortalModule- Parameters:
context- the execution context.organization- theIOrganizationof 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.
-
getMailingList
Gets a mailing list by its name.- Specified by:
getMailingListin interfaceIBasePortalModule- Parameters:
context- the execution context.name- the name of theIMailingListobject.type- the mailing list type- Returns:
- a
IMailingListobject - Throws:
PortalModuleException- default module exception.
-
getMailingLists
Gets all mailing lists.- Specified by:
getMailingListsin interfaceIBasePortalModule- Parameters:
context- the execution context.- Returns:
- a java.util.Collection of
IMailingListobjects. - Throws:
PortalModuleException- default module exception.
-
getMailingList
Deprecated.use getMailingList( IStorageKey key )Gets a mailing list object from its identifier.- Specified by:
getMailingListin interfaceIBasePortalModule- Parameters:
object- A object.- Returns:
- A
IMailingListobject. - Throws:
PortalModuleException- default module exception.
-
getMailingList
Gets a mailing list object from its identifier.- Specified by:
getMailingListin interfaceIBasePortalModule- Parameters:
key- The key of the mailing list.- Returns:
- A
IMailingListobject. - Throws:
PortalModuleException- default module exception.
-
send
Allows to send a message through the mail agent.- Specified by:
sendin interfaceIBasePortalModule- Parameters:
message- TheMimeMessageobject to send.- Throws:
PortalModuleException- default module exception.
-
getElementByProtocolURI
Gets anIElementobject which implementsIProtocolSupportinterface.- Specified by:
getElementByProtocolURIin interfaceIBasePortalModule- Parameters:
protocolURI- The protocol URI as a java.lang.String.- Returns:
- A
IProtocolSupportobject. - Throws:
ModuleException- default module exception.
-
getProtocolURI
Gets a protocolURI from aIProtocolSupportobject.- Specified by:
getProtocolURIin interfaceIBasePortalModule- Parameters:
protocolSupport- The object to convert into a protocolURI.- Returns:
- A
Stringshort protocolURI. - Throws:
ModuleException- default module exception.
-
getProtocolURI
Gets a protocolURI from aIProtocolSupportobject.- Specified by:
getProtocolURIin interfaceIBasePortalModule- 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.
-
getIndexController
Gets the controller of the specified index name.- Specified by:
getIndexControllerin interfaceIBasePortalModule- Parameters:
name- The name of the index.- Returns:
- A
IIndexControllerobject. - Throws:
PortalModuleException- default module exception.
-
validate
Validate value with validator's rules- Specified by:
validatein interfaceIBasePortalModule- Parameters:
value- value to validaterules- rules to apply for validation- Returns:
- true if the value is valid, false otherwise.
-
validate
Validate values with validator's rules- Specified by:
validatein interfaceIBasePortalModule- Parameters:
values- values to validaterules- rules to apply for validation- Returns:
- true if all the values are valid, false otherwise.
-
getValidatorErrorMessage
Get the validator's error message- Specified by:
getValidatorErrorMessagein interfaceIBasePortalModule- Parameters:
rule- The validator's namelanguage- The language- Returns:
- the validator's error message, null otherwise
-
executeTask
IReport executeTask(Class<?> extensionClass, Map<String, String> parameters) throws PortalModuleExceptionExecute a BaseTaskExtension- Specified by:
executeTaskin interfaceIBasePortalModule- Parameters:
extensionClass- class to executeparameters- parameters sent to the map- Returns:
- execution report
- Throws:
PortalModuleException- default module exception.
-
getConnectionDefinition
IConnectionDefinition<?> getConnectionDefinition(IContext context, String name) throws PortalModuleException Gets a connection from its name.- Specified by:
getConnectionDefinitionin interfaceIBasePortalModule- Parameters:
context- The execution context.name- The name of the external reference.- Returns:
- a
IConnectionDefinitionobject. - Throws:
PortalModuleException- default module exception.
-
getConnectionDefinitionsByTypeName
Collection<? extends IConnectionDefinition<?>> getConnectionDefinitionsByTypeName(IContext context, String type) throws PortalModuleException Gets a connection from its name.- Specified by:
getConnectionDefinitionsByTypeNamein interfaceIBasePortalModule- Parameters:
context- The execution context.type- The type of the external reference.- Returns:
- a
Collectionof IConnectionDefinition object. - Throws:
PortalModuleException- default module exception.
-
getConnectionDefinitionsByCategoryName
Collection<? extends IConnectionDefinition<?>> getConnectionDefinitionsByCategoryName(IContext context, String categoryName) throws PortalModuleException Gets a connection from its name.- Specified by:
getConnectionDefinitionsByCategoryNamein interfaceIBasePortalModule- Parameters:
context- The execution context.categoryName- The categoryName of the external reference.- Returns:
- a
Collectionof IConnectionDefinition object. - Throws:
PortalModuleException- default module exception.
-
getConnectionDefinitions
Collection<? extends IConnectionDefinition<?>> getConnectionDefinitions(IContext context) throws PortalModuleException Gets a collection of connections.- Specified by:
getConnectionDefinitionsin interfaceIBasePortalModule- Parameters:
context- The execution context.- Returns:
- a
Collectionof IConnectionDefinition object. - Throws:
PortalModuleException- default module exception.
-
createConnectionDefinition
IConnectionDefinition<?> createConnectionDefinition(IContext context, IOrganization organization, String name, String label, String categoryName) throws PortalModuleException Create a connection definition- Specified by:
createConnectionDefinitionin interfaceIBasePortalModule- Parameters:
context- The execution context.organization- theIOrganizationorganization of the connectionname- the name of the connectionlabel- The label of the connectioncategoryName- the type of the connection- Returns:
- the new connection definition
- Throws:
PortalModuleException- default module exception.
-