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.IBasePortalModule
getConfigurationMethods 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, unInitialize
-
Field Details
-
uriConverters
-
nativeClasses
-
-
Constructor Details
-
PortalModuleImpl
Deprecated.Use com.axemble.vdoc.sdk.Modules.getPortalModule() instead.
-
-
Method Details
-
getConverter
-
getElementByProtocolURI
Description copied from interface:IBasePortalModuleGets anIElementobject which implementsIProtocolSupportinterface.- Specified by:
getElementByProtocolURIin interfaceIBasePortalModule- 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:IBasePortalModuleGets 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
public String getProtocolURI(IProtocolSupport protocolSupport, boolean useNames) throws ModuleException Description copied from interface:IBasePortalModuleGets 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.
-
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:IBasePortalModuleCreates a new session.- Specified by:
createNewSessionin interfaceIBasePortalModule- Parameters:
login- The login of the user to create the session.- Throws:
PortalModuleException- default module exception.
-
killCurrentSession
Description copied from interface:IBasePortalModuleKills the current session.- Specified by:
killCurrentSessionin interfaceIBasePortalModule- Throws:
PortalModuleException- default module exception.
-
killSession
Description copied from interface:IBasePortalModuleKills a session.- Specified by:
killSessionin interfaceIBasePortalModule- Parameters:
session- the session to kill- Throws:
PortalModuleException- default module exception.
-
replaceCurrentSession
Description copied from interface:IBasePortalModuleReplaces 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
public void addAuthenticationKey(String key, IUser user, Date expirationDate, String authorizedAddress) throws PortalModuleException Description copied from interface:IBasePortalModuleAdds 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-user-expirationDate-authorizedAddress- (the user will be able to connect only from these ip addresses : null to allow any address)- Throws:
PortalModuleException
-
generateAuthenticationKey
public String generateAuthenticationKey(IUser user, Date expirationDate, String authorizedAddress) throws PortalModuleException Description copied from interface:IBasePortalModuleGenerates 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-expirationDate-authorizedAddress- (the user will be able to connect only from these ip addresses : null to allow any address)- Returns:
- the authentication key
- Throws:
PortalModuleException
-
getPortlet
Description copied from interface:IBasePortalModuleGets 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
public ISecurityController getSecurityController(ISecuritySupport securitySupport) throws PortalModuleException Description copied from interface:IBasePortalModuleGets 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
Description copied from interface:IBasePortalModuleGets a JMS controller.- Specified by:
getJMSControllerin interfaceIBasePortalModule- Returns:
- the
IJMSControllerobject. - Throws:
PortalModuleException- default module exception.
-
getNotificationController
Description copied from interface:IBasePortalModuleGet anINotificationController- Specified by:
getNotificationControllerin interfaceIBasePortalModule- Returns:
- the
INotificationControllerinstance - Throws:
PortalModuleException- default module exception
-
getAsyncJobQueueController
Description copied from interface:IBasePortalModuleGets an AsyncJobQueue controller.- Specified by:
getAsyncJobQueueControllerin interfaceIBasePortalModule- Returns:
- the
IAsyncJobQueueControllerobject.
-
getHistoryEventController
Description copied from interface:IBasePortalModuleGets a History Event controller.- Specified by:
getHistoryEventControllerin interfaceIBasePortalModule- Returns:
- the
IEventControllerobject.
-
verifyAuthentication
Description copied from interface:IBasePortalModuleVerifies 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.
-
verifyPassword
Description copied from interface:IBasePortalModuleAllows 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
public IUser verifyPassword(String login, String password, jakarta.servlet.http.HttpServletRequest request) Description copied from interface:IBasePortalModuleAllows 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.
-
getMailingList
public IMailingList getMailingList(IContext context, String name, int type) throws PortalModuleException Description copied from interface:IBasePortalModuleGets 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.
-
createMailingList
public IMailingList createMailingList(IContext context, IOrganization organization, String name, String label, int type) throws PortalModuleException Description copied from interface:IBasePortalModuleCreates 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.
-
getMailingLists
public Collection<? extends IMailingList> getMailingLists(IContext context) throws PortalModuleException Description copied from interface:IBasePortalModuleGets 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
Description copied from interface:IBasePortalModuleGets a mailing list object from its identifier.- Specified by:
getMailingListin interfaceIBasePortalModule- Parameters:
object- A object.- Returns:
- A
IMailingListobject. - Throws:
PortalModuleException- default module exception.
-
getMailingList
Description copied from interface:IBasePortalModuleGets 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
Description copied from interface:IBasePortalModuleAllows to send a message through the mail agent.- Specified by:
sendin interfaceIBasePortalModule- Parameters:
message- TheMimeMessageobject to send.- Throws:
PortalModuleException- default module exception.
-
getIndexController
Description copied from interface:IBasePortalModuleGets 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
Description copied from interface:IBasePortalModuleValidate 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
Description copied from interface:IBasePortalModuleValidate 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
Description copied from interface:IBasePortalModuleGet 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
public IReport executeTask(Class<?> extensionClass, Map<String, String> parameters) throws PortalModuleExceptionDescription copied from interface:IBasePortalModuleExecute a BaseTaskExtension- Specified by:
executeTaskin interfaceIBasePortalModule- Parameters:
extensionClass- class to executeparameters- parameters sent to the map- Returns:
- execution report
- Throws:
PortalModuleException
-
createConnectionDefinition
public IConnectionDefinition<?> createConnectionDefinition(IContext context, IOrganization organization, String name, String label, String categoryName) Description copied from interface:IBasePortalModuleCreate 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
-
getConnectionDefinition
public IConnectionDefinition<?> getConnectionDefinition(IContext context, String name) throws PortalModuleException Description copied from interface:IBasePortalModuleGets 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.
-
getConnectionDefinitions
public Collection<? extends IConnectionDefinition<?>> getConnectionDefinitions(IContext context) throws PortalModuleException Description copied from interface:IBasePortalModuleGets a collection of connections.- Specified by:
getConnectionDefinitionsin interfaceIBasePortalModule- Parameters:
context- The execution context.- Returns:
- a
Collectionof IConnectionDefinition object. - Throws:
PortalModuleException- default module exception.
-
verifyToken
Description copied from interface:IBasePortalModuleVerifies 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
-
getConnectionDefinitionsByTypeName
public Collection<? extends IConnectionDefinition<?>> getConnectionDefinitionsByTypeName(IContext context, String type) throws PortalModuleException Description copied from interface:IBasePortalModuleGets 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
public Collection<? extends IConnectionDefinition<?>> getConnectionDefinitionsByCategoryName(IContext context, String categoryName) throws PortalModuleException Description copied from interface:IBasePortalModuleGets 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.
-
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
-