de.espirit.firstspirit.agency
Interface LegacyModuleAgent


public interface LegacyModuleAgent

Legacy api just to provide useful and necessary methods. This agent will be replaced in a future release of FirstSpirit.

Since:
4.2.431
See Also:
SpecialistsBroker.requireSpecialist(SpecialistType)

Field Summary
static SpecialistType<LegacyModuleAgent> TYPE
          The agent's techincal type to be used to request the agent from a SpecialistsBroker.
 
Method Summary
 String getGlobalWebAppUrl(String webAppId)
          Returns the absolute url to the specified global web-app.
 String getGlobalWebAppUrl(String webAppId, boolean createTicket)
          Returns the absolute url to the specified global web-app (with or w/o a FS SSO ticket).
 FileSystem<?> getProjectAppConfig(String moduleName, String projectAppName, long projectId)
          Returns an access to the project-app configuration directory; read-write-access if the user is project admin, read-only-access if the user is project user, otherwise a SecurityException will be thrown.
 Properties getProjectAppConfigProperties(String propertiesFileName, String moduleName, String projectAppName, long projectId)
          Helper method to obtain properties from the project app configuration specified by given modulename, projectAppName and project id.
 String getProjectWebAppUrl(WebEnvironment.WebScope scope, long projectId, boolean createTicket)
          Returns the absolute url to the specified project-local web-app (with or w/o a FS SSO ticket).
 

Field Detail

TYPE

static final SpecialistType<LegacyModuleAgent> TYPE
The agent's techincal type to be used to request the agent from a SpecialistsBroker.

Since:
4.2.431
See Also:
SpecialistsBroker.requireSpecialist(de.espirit.firstspirit.agency.SpecialistType), SpecialistsBroker.requestSpecialist(de.espirit.firstspirit.agency.SpecialistType)
Method Detail

getGlobalWebAppUrl

@NotNull
String getGlobalWebAppUrl(String webAppId)
                          throws IllegalArgumentException
Returns the absolute url to the specified global web-app.

Parameters:
webAppId - global web-app id.
Returns:
absolute url to the specified web-app.
Throws:
IllegalArgumentException - if the web-app id is unknown.
Since:
4.2.431

getGlobalWebAppUrl

@NotNull
String getGlobalWebAppUrl(String webAppId,
                                  boolean createTicket)
                          throws IllegalArgumentException
Returns the absolute url to the specified global web-app (with or w/o a FS SSO ticket).

Parameters:
webAppId - global web-app id.
createTicket - true to add a valid FS SSO ticket to the url.
Returns:
absolute url to the specified web-app.
Throws:
IllegalArgumentException - if the web-app id is unknown.
Since:
4.2.431

getProjectWebAppUrl

@NotNull
String getProjectWebAppUrl(WebEnvironment.WebScope scope,
                                   long projectId,
                                   boolean createTicket)
Returns the absolute url to the specified project-local web-app (with or w/o a FS SSO ticket).

Parameters:
scope - web-scope (supported are: PREVIEW, WEBEDIT, STAGING).
projectId - project id.
createTicket - true to add a valid FS SSO ticket to the url.
Returns:
absolute url to the specified web-app.
Throws:
IllegalArgumentException - if the web-scope is not supported.
SecurityException - if the user has no access to the project specified by given projectId
Since:
4.2.431

getProjectAppConfig

@NotNull
FileSystem<?> getProjectAppConfig(String moduleName,
                                          String projectAppName,
                                          long projectId)
Returns an access to the project-app configuration directory; read-write-access if the user is project admin, read-only-access if the user is project user, otherwise a SecurityException will be thrown.

Parameters:
moduleName - module name.
projectAppName - name of the project-app component.
projectId - project id.
Returns:
access to the project-app configuration directory.
Throws:
SecurityException - if the current user has no project access.
Since:
4.2.431

getProjectAppConfigProperties

@NotNull
Properties getProjectAppConfigProperties(String propertiesFileName,
                                                 String moduleName,
                                                 String projectAppName,
                                                 long projectId)
                                         throws IOException
Helper method to obtain properties from the project app configuration specified by given modulename, projectAppName and project id. This method expects a properties file stored in the project app config with the given propertiesFileName.

Parameters:
propertiesFileName - properties file name
moduleName - module name.
projectAppName - name of the project-app component.
projectId - project id.
Returns:
access to the project-app configuration directory.
Throws:
SecurityException - if the current user has no project access.
IOException - if access to the config file failed
Since:
4.2.431


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480