Class OpenProjectScriptService
- java.lang.Object
-
- com.xwiki.projectmanagement.openproject.script.OpenProjectScriptService
-
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component @Named("openproject") @Singleton public class OpenProjectScriptService extends Object implements org.xwiki.script.service.ScriptService- Since:
- 1.0
- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description OpenProjectScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerateStyling()Generate the styling for the configured instances.List<Map<String,String>>getConnectionOptions()Retrieves a list of available OpenProject connections.booleanisUserAuthorized(String instanceName)
-
-
-
Method Detail
-
getConnectionOptions
public List<Map<String,String>> getConnectionOptions() throws AuthenticationException
Retrieves a list of available OpenProject connections.- Returns:
- a list of
OpenProjectConnectioninstances; - Throws:
AuthenticationException
-
isUserAuthorized
public boolean isUserAuthorized(String instanceName)
- Parameters:
instanceName- the name of the Open Project instance configuration.- Returns:
- whether the user was authorized to the configured Open Project instance or not.
- Since:
- 1.0-rc-3
-
generateStyling
public void generateStyling() throws ProjectManagementExceptionGenerate the styling for the configured instances. Since this method will need to communicate with the configured instances and make http requests, it should be run in a separate thread.- Throws:
ProjectManagementException
-
-