org.eaglei.datatools.jena
Class FooRepositorySecurityProvider
java.lang.Object
org.eaglei.services.repository.AbstractRepositoryProvider
org.eaglei.datatools.jena.FooRepositorySecurityProvider
- All Implemented Interfaces:
- DatatoolsSecurityProvider
public class FooRepositorySecurityProvider
- extends org.eaglei.services.repository.AbstractRepositoryProvider
- implements DatatoolsSecurityProvider
Class for handling authentication and login calls to the repository.
- Author:
- Jason Barreto
| Nested classes/interfaces inherited from class org.eaglei.services.repository.AbstractRepositoryProvider |
org.eaglei.services.repository.AbstractRepositoryProvider.RestCommands |
| Fields inherited from class org.eaglei.services.repository.AbstractRepositoryProvider |
DEFAULT_REPOSITORY_URI, DEFAULT_REPOSITORY_URL, FORMAT_VALUE, isDebugEnabled, LABEL_QUERY_FAILED, WORKFLOW_TRANSITION_ALLOWED, WORKFLOW_TRANSITION_FROM, WORKFLOW_TRANSITION_FROM_LABEL, WORKFLOW_TRANSITION_LABEL, WORKFLOW_TRANSITION_SUBJECT, WORKFLOW_TRANSITION_TO, WORKFLOW_TRANSITION_TO_LABEL |
|
Method Summary |
DatatoolsConfiguration |
getConfiguration(java.lang.String propFile)
Loads the DataTools configuration from a property file and returns it
as a DatatoolsConfiguration object. |
org.apache.commons.httpclient.HttpClient |
getHttpClient(org.eaglei.security.Session session)
|
org.eaglei.security.Session |
getSession(java.lang.String sessionId)
|
java.util.List<Workspace> |
getWorkspaces(org.eaglei.security.Session session)
|
boolean |
isOnline()
|
boolean |
isValid(java.lang.String sessionId,
boolean shouldThrow)
|
java.util.List<WorkFlowTransition> |
listWorkFlowTransitions(org.eaglei.security.Session session,
org.eaglei.model.EIEntity workspaceEntity)
|
User |
login(java.lang.String userName,
java.lang.String password)
|
User |
login(java.lang.String DEFAULT_REPOSITORY_URI,
java.lang.String userName,
java.lang.String password)
|
void |
logout(org.eaglei.security.Session session)
|
void |
setDefaultRepositoryURI(java.lang.String repoURI)
Sets the base URI used to define URLs going to the repository. |
void |
setDefaultRepositoryURL(java.lang.String repoURL)
Sets the base URL used to define URLs going to the repository. |
User |
whoami(org.eaglei.security.Session session)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FooRepositorySecurityProvider
public FooRepositorySecurityProvider(org.eaglei.services.repository.SecurityProvider generalSecurityProvider)
login
public User login(java.lang.String userName,
java.lang.String password)
throws org.eaglei.services.repository.RepositoryProviderException
- Specified by:
login in interface DatatoolsSecurityProvider
- Throws:
org.eaglei.services.repository.RepositoryProviderException
login
public User login(java.lang.String DEFAULT_REPOSITORY_URI,
java.lang.String userName,
java.lang.String password)
throws org.eaglei.services.repository.RepositoryProviderException
- Throws:
org.eaglei.services.repository.RepositoryProviderException
logout
public void logout(org.eaglei.security.Session session)
throws org.eaglei.services.repository.RepositoryProviderException
- Specified by:
logout in interface DatatoolsSecurityProvider
- Throws:
org.eaglei.services.repository.RepositoryProviderException
isOnline
public boolean isOnline()
- Specified by:
isOnline in interface DatatoolsSecurityProvider
getWorkspaces
public java.util.List<Workspace> getWorkspaces(org.eaglei.security.Session session)
throws org.eaglei.services.repository.RepositoryProviderException
- Specified by:
getWorkspaces in interface DatatoolsSecurityProvider
- Throws:
org.eaglei.services.repository.RepositoryProviderException
getConfiguration
public DatatoolsConfiguration getConfiguration(java.lang.String propFile)
throws org.eaglei.services.repository.RepositoryProviderException
- Loads the DataTools configuration from a property file and returns it
as a DatatoolsConfiguration object. The property file location can either be passed
in or is determined by querying for a system property. If the property does not
exist then a default configuration is used.
- Parameters:
propFile - The path to the desired property file. If null is passed in then the
system properties are queried.
- Returns:
- A DatatoolsConfiguration object representing the configuration present
in the property file.
- Throws:
org.eaglei.services.repository.RepositoryProviderException - If loading of the configuration file fails.
setDefaultRepositoryURL
public void setDefaultRepositoryURL(java.lang.String repoURL)
- Sets the base URL used to define URLs going to the repository.
- Parameters:
repoURL - A string representing the url for the repository.
setDefaultRepositoryURI
public void setDefaultRepositoryURI(java.lang.String repoURI)
- Sets the base URI used to define URLs going to the repository.
- Parameters:
repoURI - A string representing the uri for the repository.
listWorkFlowTransitions
public java.util.List<WorkFlowTransition> listWorkFlowTransitions(org.eaglei.security.Session session,
org.eaglei.model.EIEntity workspaceEntity)
throws org.eaglei.services.repository.RepositoryProviderException
- Specified by:
listWorkFlowTransitions in interface DatatoolsSecurityProvider
- Throws:
org.eaglei.services.repository.RepositoryProviderException
whoami
public User whoami(org.eaglei.security.Session session)
throws org.eaglei.services.repository.RepositoryProviderException
- Specified by:
whoami in interface DatatoolsSecurityProvider
- Throws:
org.eaglei.services.repository.RepositoryProviderException
isValid
public boolean isValid(java.lang.String sessionId,
boolean shouldThrow)
throws org.eaglei.services.repository.RepositoryProviderException
- Throws:
org.eaglei.services.repository.RepositoryProviderException
getSession
public org.eaglei.security.Session getSession(java.lang.String sessionId)
getHttpClient
public org.apache.commons.httpclient.HttpClient getHttpClient(org.eaglei.security.Session session)
Copyright © 2009-2011 Eagle-I. All Rights Reserved.