Package org.oa4mp.server.api
Class ServiceEnvironmentImpl
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.util.AbstractEnvironment
-
- org.oa4mp.server.api.ServiceEnvironmentImpl
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable,Serializable,ServiceEnvironment
public class ServiceEnvironmentImpl extends edu.uiuc.ncsa.security.core.util.AbstractEnvironment implements ServiceEnvironment
The runtime environment for a service. This is a bridge between the configuration and the instances. Typically it is populated with providers (i.e.configured factories) which retrieves the instances as needed.Created by Jeff Gaynor
on 1/9/12 at 4:08 PM- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServiceEnvironmentImpl.MessagesProvider
-
Field Summary
Fields Modifier and Type Field Description protected javax.inject.Provider<AGIssuer>agipprotected javax.inject.Provider<ATIssuer>atipprotected javax.inject.Provider<ClientApprovalStore>caspprotected ClientApprovalStore<ClientApproval>clientApprovalStoreprotected ClientStoreclientStoreprotected javax.inject.Provider<ClientStore>cspprotected edu.uiuc.ncsa.security.util.mail.MailUtilmailUtilprotected javax.inject.Provider<PAIssuer>paipprotected javax.inject.Provider<PermissionsStore>pspprotected javax.inject.Provider<org.oa4mp.delegation.common.token.TokenForge>tfpprotected org.oa4mp.delegation.common.storage.TransactionStore<ServiceTransaction>transactionStoreprotected javax.inject.Provider<org.oa4mp.delegation.common.storage.TransactionStore>tsp
-
Constructor Summary
Constructors Constructor Description ServiceEnvironmentImpl(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger, javax.inject.Provider<org.oa4mp.delegation.common.storage.TransactionStore> tsp, javax.inject.Provider<ClientStore> csp, int maxAllowedNewClientRequests, javax.inject.Provider<ClientApprovalStore> casp, edu.uiuc.ncsa.security.util.mail.MailUtilProvider mup, ServiceEnvironmentImpl.MessagesProvider messagesProvider, javax.inject.Provider<AGIssuer> agip, javax.inject.Provider<ATIssuer> atip, javax.inject.Provider<PAIssuer> paip, javax.inject.Provider<org.oa4mp.delegation.common.token.TokenForge> tfp, HashMap<String,String> constants, AuthorizationServletConfig ac, edu.uiuc.ncsa.security.servlet.UsernameTransformer usernameTransformer, boolean isPingable, javax.inject.Provider<PermissionsStore> psp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdminClientStore<AdminClient>getAdminClientStore()Returns theAdminClientStore.AGIssuergetAgIssuer()TheAbstractIssuerthat createsAuthorizationGrants.ATIssuergetAtIssuer()TheAbstractIssuerthat createsAccessTokens.AuthorizationServletConfiggetAuthorizationServletConfig()ClientApprovalStoregetClientApprovalStore()returns the client approval store.AbstractCLIApprover.ClientApprovalThreadgetClientApprovalThread()ClientStoregetClientStore()Returns the currentClientStore.KeyPairgetKeyPair()Return a key pair for cert request generation, e.g. in limited proxy requests.edu.uiuc.ncsa.security.util.pkcs.KeyPairQueuegetKeyPairQueue()edu.uiuc.ncsa.security.util.mail.MailUtilgetMailUtil()Returns the mail utility which, when configured, will send notifications for requests.intgetMaxAllowedNewClientRequests()Map<String,String>getMessages()Messages which may be displayed to the user, e.g., when authentication fails.PAIssuergetPaIssuer()TheAbstractIssuerthat creates theProtectedAssets.PermissionsStore<Permission>getPermissionStore()URIgetServiceAddress()The address for this server.org.oa4mp.delegation.common.token.TokenForgegetTokenForge()The forge that creates delegation tokens for this service.org.oa4mp.delegation.common.storage.TransactionStore<ServiceTransaction>getTransactionStore()Returns the current transaction store.edu.uiuc.ncsa.security.servlet.UsernameTransformergetUsernameTransformer()Use the setter to customize the user name transformation.booleanhasAuthorizationServletConfig()booleanisPollingEnabled()List<edu.uiuc.ncsa.security.core.Store>listStores()List the current stores in this environment.voidsetClientApprovalThread(AbstractCLIApprover.ClientApprovalThread clientApprovalThread)voidsetServiceAddress(URI serviceAddress)voidsetUsernameTransformer(edu.uiuc.ncsa.security.servlet.UsernameTransformer usernameTransformer)-
Methods inherited from class edu.uiuc.ncsa.security.core.util.AbstractEnvironment
debug, error, getConstants, getMyLogger, info, isDebugOn, isPingable, setDebugOn, setPingable, warn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.uiuc.ncsa.security.core.Logable
debug, error, info, isDebugOn, setDebugOn, warn
-
Methods inherited from interface org.oa4mp.server.api.ServiceEnvironment
getConstants, isPingable
-
-
-
-
Field Detail
-
tsp
protected javax.inject.Provider<org.oa4mp.delegation.common.storage.TransactionStore> tsp
-
csp
protected javax.inject.Provider<ClientStore> csp
-
casp
protected javax.inject.Provider<ClientApprovalStore> casp
-
psp
protected javax.inject.Provider<PermissionsStore> psp
-
agip
protected javax.inject.Provider<AGIssuer> agip
-
atip
protected javax.inject.Provider<ATIssuer> atip
-
paip
protected javax.inject.Provider<PAIssuer> paip
-
tfp
protected javax.inject.Provider<org.oa4mp.delegation.common.token.TokenForge> tfp
-
mailUtil
protected edu.uiuc.ncsa.security.util.mail.MailUtil mailUtil
-
clientApprovalStore
protected ClientApprovalStore<ClientApproval> clientApprovalStore
-
clientStore
protected ClientStore clientStore
-
transactionStore
protected org.oa4mp.delegation.common.storage.TransactionStore<ServiceTransaction> transactionStore
-
-
Constructor Detail
-
ServiceEnvironmentImpl
public ServiceEnvironmentImpl(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger, javax.inject.Provider<org.oa4mp.delegation.common.storage.TransactionStore> tsp, javax.inject.Provider<ClientStore> csp, int maxAllowedNewClientRequests, javax.inject.Provider<ClientApprovalStore> casp, edu.uiuc.ncsa.security.util.mail.MailUtilProvider mup, ServiceEnvironmentImpl.MessagesProvider messagesProvider, javax.inject.Provider<AGIssuer> agip, javax.inject.Provider<ATIssuer> atip, javax.inject.Provider<PAIssuer> paip, javax.inject.Provider<org.oa4mp.delegation.common.token.TokenForge> tfp, HashMap<String,String> constants, AuthorizationServletConfig ac, edu.uiuc.ncsa.security.servlet.UsernameTransformer usernameTransformer, boolean isPingable, javax.inject.Provider<PermissionsStore> psp)
-
-
Method Detail
-
getKeyPairQueue
public edu.uiuc.ncsa.security.util.pkcs.KeyPairQueue getKeyPairQueue()
-
getKeyPair
public KeyPair getKeyPair()
Description copied from interface:ServiceEnvironmentReturn a key pair for cert request generation, e.g. in limited proxy requests.- Specified by:
getKeyPairin interfaceServiceEnvironment- Returns:
-
getAuthorizationServletConfig
public AuthorizationServletConfig getAuthorizationServletConfig()
- Specified by:
getAuthorizationServletConfigin interfaceServiceEnvironment
-
hasAuthorizationServletConfig
public boolean hasAuthorizationServletConfig()
- Specified by:
hasAuthorizationServletConfigin interfaceServiceEnvironment
-
getServiceAddress
public URI getServiceAddress()
Description copied from interface:ServiceEnvironmentThe address for this server. Since hosts can have any of several aliases, automatic determination from the servlet is usually a bad idea.- Specified by:
getServiceAddressin interfaceServiceEnvironment- Returns:
-
setServiceAddress
public void setServiceAddress(URI serviceAddress)
- Specified by:
setServiceAddressin interfaceServiceEnvironment
-
getAgIssuer
public AGIssuer getAgIssuer()
Description copied from interface:ServiceEnvironmentTheAbstractIssuerthat createsAuthorizationGrants.- Specified by:
getAgIssuerin interfaceServiceEnvironment- Returns:
-
getAtIssuer
public ATIssuer getAtIssuer()
Description copied from interface:ServiceEnvironmentTheAbstractIssuerthat createsAccessTokens.- Specified by:
getAtIssuerin interfaceServiceEnvironment- Returns:
-
getPaIssuer
public PAIssuer getPaIssuer()
Description copied from interface:ServiceEnvironmentTheAbstractIssuerthat creates theProtectedAssets.- Specified by:
getPaIssuerin interfaceServiceEnvironment- Returns:
-
getTokenForge
public org.oa4mp.delegation.common.token.TokenForge getTokenForge()
Description copied from interface:ServiceEnvironmentThe forge that creates delegation tokens for this service.- Specified by:
getTokenForgein interfaceServiceEnvironment- Returns:
-
getMessages
public Map<String,String> getMessages()
Description copied from interface:ServiceEnvironmentMessages which may be displayed to the user, e.g., when authentication fails.- Specified by:
getMessagesin interfaceServiceEnvironment- Returns:
-
getPermissionStore
public PermissionsStore<Permission> getPermissionStore()
- Specified by:
getPermissionStorein interfaceServiceEnvironment
-
getClientApprovalStore
public ClientApprovalStore getClientApprovalStore()
Description copied from interface:ServiceEnvironmentreturns the client approval store.- Specified by:
getClientApprovalStorein interfaceServiceEnvironment- Returns:
-
getClientStore
public ClientStore getClientStore()
Description copied from interface:ServiceEnvironmentReturns the currentClientStore.- Specified by:
getClientStorein interfaceServiceEnvironment- Returns:
-
getMailUtil
public edu.uiuc.ncsa.security.util.mail.MailUtil getMailUtil()
Description copied from interface:ServiceEnvironmentReturns the mail utility which, when configured, will send notifications for requests.- Specified by:
getMailUtilin interfaceServiceEnvironment- Returns:
-
getTransactionStore
public org.oa4mp.delegation.common.storage.TransactionStore<ServiceTransaction> getTransactionStore()
Description copied from interface:ServiceEnvironmentReturns the current transaction store.- Specified by:
getTransactionStorein interfaceServiceEnvironment- Returns:
-
isPollingEnabled
public boolean isPollingEnabled()
-
getClientApprovalThread
public AbstractCLIApprover.ClientApprovalThread getClientApprovalThread()
-
setClientApprovalThread
public void setClientApprovalThread(AbstractCLIApprover.ClientApprovalThread clientApprovalThread)
-
getMaxAllowedNewClientRequests
public int getMaxAllowedNewClientRequests()
- Specified by:
getMaxAllowedNewClientRequestsin interfaceServiceEnvironment
-
getUsernameTransformer
public edu.uiuc.ncsa.security.servlet.UsernameTransformer getUsernameTransformer()
Use the setter to customize the user name transformation.- Specified by:
getUsernameTransformerin interfaceServiceEnvironment- Returns:
-
setUsernameTransformer
public void setUsernameTransformer(edu.uiuc.ncsa.security.servlet.UsernameTransformer usernameTransformer)
- Specified by:
setUsernameTransformerin interfaceServiceEnvironment
-
getAdminClientStore
public AdminClientStore<AdminClient> getAdminClientStore()
Description copied from interface:ServiceEnvironmentReturns theAdminClientStore.- Specified by:
getAdminClientStorein interfaceServiceEnvironment- Returns:
-
listStores
public List<edu.uiuc.ncsa.security.core.Store> listStores()
Description copied from interface:ServiceEnvironmentList the current stores in this environment. Used at bootstrapping for various types of introspection.- Specified by:
listStoresin interfaceServiceEnvironment- Returns:
-
-