Package com.axemble.vdoc.sdk.impl
Class PortalModuleImpl
java.lang.Object
com.axemble.vdoc.sdk.impl.AbstractTranslaterModule
com.axemble.vdoc.sdk.impl.CoreModule
com.axemble.vdoc.sdk.impl.PortalModuleImpl
- All Implemented Interfaces:
IBasePortalModule,IModule,IPortalModule,Serializable,Remote
- Author:
- vlygeros
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic classModule fake pour gérer la sécurité sur les portlets basés sur un pm A éviter au maximum car le pm n'est libéré que par le finalize ! -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static HashMapprotected static Map<String, PortalModuleImpl.IURIConverter> Fields inherited from class com.axemble.vdoc.sdk.impl.CoreModule
LOGGER, properties -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Use com.axemble.vdoc.sdk.Modules.getPortalModule() instead. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAuthenticationKey(String key, IUser user, Date expirationDate, String authorizedAddress) 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 BaseTaskExtensionfindNativeClass(Class interfaceClass) Allows to retrieve the inner native class.generateAuthenticationKey(IUser user, Date expirationDate, String authorizedAddress) Generates and adds an authenticationKey for a user The ExternalAuthenticationLoginModule will be automatically connect the user if he uses the parameter _AuthenticationKeygenerateSystemName(String label) Generate a valid system name for this module and this label.Gets an AsyncJobQueue controller.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.protected static PortalModuleImpl.IURIConvertergetConverter(String key) 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) Gets a mailing list object from its identifier.Collection<? extends IMailingList> getMailingLists(IContext context) Gets all mailing lists.protected static ClassgetNativeClass(Class interfaceClass) 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 class com.axemble.vdoc.sdk.impl.CoreModule
beginTransaction, beginTransaction, commitTransaction, commitTransaction, convertId, createAttachment, createAttachment, createAttachment, createAttachment, createProfile, getAnonymous, getAnonymousContext, getComponentsFactory, getConfiguration, getContext, getContext, getContext, getContextByLogin, getDefinitionsFactory, getElementFromExternalElement, getExternalElement, getExternalElement, getLanguage, getLoggedOnUser, getLoggedOnUserContext, getLoggedOnUserLanguage, getProfile, getProfile, getProfiles, getProtocolPath, getProtocolPath, getProtocolURI, getProtocolURI, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, getSysadmin, getSysadminContext, getUser, getUser, getUserByLogin, initialize, isTransactionActive, rollbackTransaction, rollbackTransaction, setTransactionTimeout, unInitializeMethods inherited from class com.axemble.vdoc.sdk.impl.AbstractTranslaterModule
getTranslation, getTranslationForLanguage, getTranslationKeyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.axemble.vdoc.sdk.modules.IModule
beginTransaction, beginTransaction, commitTransaction, commitTransaction, convertId, 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, unInitializeMethods inherited from interface com.axemble.vdoc.sdk.modules.IPortalModule
getConfiguration
-
Field Details
-
uriConverters
-
nativeClasses
-
-
Constructor Details
-
PortalModuleImpl
Deprecated.Use com.axemble.vdoc.sdk.Modules.getPortalModule() instead.
-
-
Method Details
-
getConverter
-
getElementByProtocolURI
Description copied from interface:IPortalModuleGets anIElementobject which implementsIProtocolSupportinterface.- Specified by:
getElementByProtocolURIin interfaceIBasePortalModule- Specified by:
getElementByProtocolURIin interfaceIPortalModule- Overrides:
getElementByProtocolURIin classCoreModule- Parameters:
protocolURI- The protocol URI as a java.lang.String.- Returns:
- A
IProtocolSupportobject. - Throws:
ModuleException- default module exception.
-
getProtocolURI
Description copied from interface:IPortalModuleGets a protocolURI from aIProtocolSupportobject.- Specified by:
getProtocolURIin interfaceIBasePortalModule- Specified by:
getProtocolURIin interfaceIPortalModule- Parameters:
protocolSupport- The object to convert into a protocolURI.- Returns:
- A
Stringshort protocolURI. - Throws:
ModuleException- default module exception.
-
getProtocolURI
public String getProtocolURI(IProtocolSupport protocolSupport, boolean useNames) throws ModuleException Description copied from interface:IPortalModuleGets a protocolURI from aIProtocolSupportobject.- Specified by:
getProtocolURIin interfaceIBasePortalModule- Specified by:
getProtocolURIin interfaceIPortalModule- 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.
-
getNativeClass
-
findNativeClass
Description copied from interface:IModuleAllows to retrieve the inner native class.- Specified by:
findNativeClassin interfaceIModule- Overrides:
findNativeClassin classCoreModule- Parameters:
interfaceClass- A class type.- Returns:
- The inner native class.
-
createNewSession
Description copied from interface:IPortalModuleCreates a new session.- Specified by:
createNewSessionin interfaceIBasePortalModule- Specified by:
createNewSessionin interfaceIPortalModule- Parameters:
login- The login of the user to create the session.- Throws:
PortalModuleException- default module exception.
-
killCurrentSession
Description copied from interface:IPortalModuleKills the current session.- Specified by:
killCurrentSessionin interfaceIBasePortalModule- Specified by:
killCurrentSessionin interfaceIPortalModule- Throws:
PortalModuleException- default module exception.
-
killSession
Description copied from interface:IPortalModuleKills a session.- Specified by:
killSessionin interfaceIBasePortalModule- Specified by:
killSessionin interfaceIPortalModule- Parameters:
session- the session to kill- Throws:
PortalModuleException- default module exception.
-
replaceCurrentSession
Description copied from interface:IPortalModuleReplaces the current session.- Specified by:
replaceCurrentSessionin interfaceIBasePortalModule- Specified by:
replaceCurrentSessionin interfaceIPortalModule- Parameters:
login- The login of the user to replace the session with.- Throws:
PortalModuleException- default module exception.
-
addAuthenticationKey
public void addAuthenticationKey(String key, IUser user, Date expirationDate, String authorizedAddress) throws PortalModuleException Description copied from interface:IPortalModuleAdds an authenticationKey for a user The ExternalAuthenticationLoginModule will be automatically connect the user if he uses the parameter _AuthenticationKey- Specified by:
addAuthenticationKeyin interfaceIBasePortalModule- Specified by:
addAuthenticationKeyin interfaceIPortalModule- Parameters:
key- the authentication keyuser- the user to connectexpirationDate- (the authentication key will be valid until this date)authorizedAddress- (the user will be able to connect only from these ip addresses : null to allow any address)- Throws:
PortalModuleException- default module exception.
-
generateAuthenticationKey
public String generateAuthenticationKey(IUser user, Date expirationDate, String authorizedAddress) throws PortalModuleException Description copied from interface:IPortalModuleGenerates 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- Specified by:
generateAuthenticationKeyin interfaceIPortalModule- Parameters:
user- the user to connectexpirationDate- (the authentication key will be valid until this date)authorizedAddress- (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
Description copied from interface:IPortalModuleGets a portlet by its name.- Specified by:
getPortletin interfaceIBasePortalModule- Specified by:
getPortletin interfaceIPortalModule- Parameters:
context- The execution context.name- The name of theIPortletobject.- Returns:
- The
IPortletobject. - Throws:
PortalModuleException- default module exception.
-
getSecurityController
public ISecurityController getSecurityController(ISecuritySupport securitySupport) throws PortalModuleException Description copied from interface:IPortalModuleGets a security controller on a specified object.- Specified by:
getSecurityControllerin interfaceIBasePortalModule- Specified by:
getSecurityControllerin interfaceIPortalModule- Parameters:
securitySupport- Any IElement that implements ISecuritySupport interface.- Returns:
- The
ISecurityControllerobject. - Throws:
PortalModuleException- default module exception.
-
getJMSController
Description copied from interface:IPortalModuleGets a JMS controller.- Specified by:
getJMSControllerin interfaceIBasePortalModule- Specified by:
getJMSControllerin interfaceIPortalModule- Returns:
- the
IJMSControllerobject. - Throws:
PortalModuleException- default module exception.
-
getNotificationController
Description copied from interface:IPortalModuleGet anINotificationController- Specified by:
getNotificationControllerin interfaceIBasePortalModule- Specified by:
getNotificationControllerin interfaceIPortalModule- Returns:
- the
INotificationControllerinstance - Throws:
PortalModuleException- default module exception
-
getAsyncJobQueueController
Description copied from interface:IPortalModuleGets an AsyncJobQueue controller.- Specified by:
getAsyncJobQueueControllerin interfaceIBasePortalModule- Specified by:
getAsyncJobQueueControllerin interfaceIPortalModule- Returns:
- the
IAsyncJobQueueControllerobject.
-
getHistoryEventController
Description copied from interface:IPortalModuleGets a History Event controller.- Specified by:
getHistoryEventControllerin interfaceIBasePortalModule- Specified by:
getHistoryEventControllerin interfaceIPortalModule- Returns:
- the
IEventControllerobject.
-
verifyAuthentication
Description copied from interface:IPortalModuleVerifies login / password parameters against JAAS.- Specified by:
verifyAuthenticationin interfaceIBasePortalModule- Specified by:
verifyAuthenticationin interfaceIPortalModule- 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.
-
verifyPassword
Description copied from interface:IPortalModuleAllows to verify a password for a specified user login.- Specified by:
verifyPasswordin interfaceIBasePortalModule- Specified by:
verifyPasswordin interfaceIPortalModule- Parameters:
login- The login of the user.password- The password to verify.- Returns:
- A
IUserobject.
-
verifyPassword
public IUser verifyPassword(String login, String password, jakarta.servlet.http.HttpServletRequest request) Description copied from interface:IPortalModuleAllows to verify a password for a specified user login.- Specified by:
verifyPasswordin interfaceIBasePortalModule- Specified by:
verifyPasswordin interfaceIPortalModule- Parameters:
login- The login of the user.password- The password to verify.request- The http Request- Returns:
- A
IUserobject.
-
getMailingList
public IMailingList getMailingList(IContext context, String name, int type) throws PortalModuleException Description copied from interface:IPortalModuleGets a mailing list by its name.- Specified by:
getMailingListin interfaceIBasePortalModule- Specified by:
getMailingListin interfaceIPortalModule- Parameters:
context- the execution context.name- the name of theIMailingListobject.type- the mailing list type- Returns:
- a
IMailingListobject - Throws:
PortalModuleException- default module exception.
-
createMailingList
public IMailingList createMailingList(IContext context, IOrganization organization, String name, String label, int type) throws PortalModuleException Description copied from interface:IPortalModuleCreates a new mailing list.- Specified by:
createMailingListin interfaceIBasePortalModule- Specified by:
createMailingListin interfaceIPortalModule- 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.
-
getMailingLists
public Collection<? extends IMailingList> getMailingLists(IContext context) throws PortalModuleException Description copied from interface:IPortalModuleGets all mailing lists.- Specified by:
getMailingListsin interfaceIBasePortalModule- Specified by:
getMailingListsin interfaceIPortalModule- Parameters:
context- the execution context.- Returns:
- a java.util.Collection of
IMailingListobjects. - Throws:
PortalModuleException- default module exception.
-
getMailingList
Description copied from interface:IPortalModuleGets a mailing list object from its identifier.- Specified by:
getMailingListin interfaceIBasePortalModule- Specified by:
getMailingListin interfaceIPortalModule- Parameters:
object- A object.- Returns:
- A
IMailingListobject. - Throws:
PortalModuleException- default module exception.
-
getMailingList
Description copied from interface:IPortalModuleGets a mailing list object from its identifier.- Specified by:
getMailingListin interfaceIBasePortalModule- Specified by:
getMailingListin interfaceIPortalModule- Parameters:
key- The key of the mailing list.- Returns:
- A
IMailingListobject. - Throws:
PortalModuleException- default module exception.
-
send
Description copied from interface:IPortalModuleAllows to send a message through the mail agent.- Specified by:
sendin interfaceIBasePortalModule- Specified by:
sendin interfaceIPortalModule- Parameters:
message- TheMimeMessageobject to send.- Throws:
PortalModuleException- default module exception.
-
getIndexController
Description copied from interface:IPortalModuleGets the controller of the specified index name.- Specified by:
getIndexControllerin interfaceIBasePortalModule- Specified by:
getIndexControllerin interfaceIPortalModule- Parameters:
name- The name of the index.- Returns:
- A
IIndexControllerobject. - Throws:
PortalModuleException- default module exception.
-
validate
Description copied from interface:IPortalModuleValidate value with validator's rules- Specified by:
validatein interfaceIBasePortalModule- Specified by:
validatein interfaceIPortalModule- Parameters:
value- value to validaterules- rules to apply for validation- Returns:
- true if the value is valid, false otherwise.
-
validate
Description copied from interface:IPortalModuleValidate values with validator's rules- Specified by:
validatein interfaceIBasePortalModule- Specified by:
validatein interfaceIPortalModule- Parameters:
values- values to validaterules- rules to apply for validation- Returns:
- true if all the values are valid, false otherwise.
-
getValidatorErrorMessage
Description copied from interface:IPortalModuleGet the validator's error message- Specified by:
getValidatorErrorMessagein interfaceIBasePortalModule- Specified by:
getValidatorErrorMessagein interfaceIPortalModule- Parameters:
rule- The validator's namelanguage- The language- Returns:
- the validator's error message, null otherwise
-
executeTask
public IReport executeTask(Class<?> extensionClass, Map<String, String> parameters) throws PortalModuleExceptionDescription copied from interface:IPortalModuleExecute a BaseTaskExtension- Specified by:
executeTaskin interfaceIBasePortalModule- Specified by:
executeTaskin interfaceIPortalModule- Parameters:
extensionClass- class to executeparameters- parameters sent to the map- Returns:
- execution report
- Throws:
PortalModuleException- default module exception.
-
createConnectionDefinition
public IConnectionDefinition<?> createConnectionDefinition(IContext context, IOrganization organization, String name, String label, String categoryName) Description copied from interface:IPortalModuleCreate a connection definition- Specified by:
createConnectionDefinitionin interfaceIBasePortalModule- Specified by:
createConnectionDefinitionin interfaceIPortalModule- 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
-
getConnectionDefinition
public IConnectionDefinition<?> getConnectionDefinition(IContext context, String name) throws PortalModuleException Description copied from interface:IPortalModuleGets a connection from its name.- Specified by:
getConnectionDefinitionin interfaceIBasePortalModule- Specified by:
getConnectionDefinitionin interfaceIPortalModule- Parameters:
context- The execution context.name- The name of the external reference.- Returns:
- a
IConnectionDefinitionobject. - Throws:
PortalModuleException- default module exception.
-
getConnectionDefinitions
public Collection<? extends IConnectionDefinition<?>> getConnectionDefinitions(IContext context) throws PortalModuleException Description copied from interface:IPortalModuleGets a collection of connections.- Specified by:
getConnectionDefinitionsin interfaceIBasePortalModule- Specified by:
getConnectionDefinitionsin interfaceIPortalModule- Parameters:
context- The execution context.- Returns:
- a
Collectionof IConnectionDefinition object. - Throws:
PortalModuleException- default module exception.
-
verifyToken
Description copied from interface:IPortalModuleVerifies authentication token- Specified by:
verifyTokenin interfaceIBasePortalModule- Specified by:
verifyTokenin interfaceIPortalModule- Parameters:
token- the token to verify- Returns:
- null if the token is invalid or expired, the matching
IUserif the token is valid
-
getConnectionDefinitionsByTypeName
public Collection<? extends IConnectionDefinition<?>> getConnectionDefinitionsByTypeName(IContext context, String type) throws PortalModuleException Description copied from interface:IPortalModuleGets a connection from its name.- Specified by:
getConnectionDefinitionsByTypeNamein interfaceIBasePortalModule- Specified by:
getConnectionDefinitionsByTypeNamein interfaceIPortalModule- Parameters:
context- The execution context.type- The type of the external reference.- Returns:
- a
Collectionof IConnectionDefinition object. - Throws:
PortalModuleException- default module exception.
-
getConnectionDefinitionsByCategoryName
public Collection<? extends IConnectionDefinition<?>> getConnectionDefinitionsByCategoryName(IContext context, String categoryName) throws PortalModuleException Description copied from interface:IPortalModuleGets a connection from its name.- Specified by:
getConnectionDefinitionsByCategoryNamein interfaceIBasePortalModule- Specified by:
getConnectionDefinitionsByCategoryNamein interfaceIPortalModule- Parameters:
context- The execution context.categoryName- The categoryName of the external reference.- Returns:
- a
Collectionof IConnectionDefinition object. - Throws:
PortalModuleException- default module exception.
-
generateSystemName
Description copied from interface:IModuleGenerate a valid system name for this module and this label.- Specified by:
generateSystemNamein interfaceIModule- Parameters:
label- label to normalize- Returns:
- normalized value
-