Class ServiceEnvironmentImpl
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.util.AbstractEnvironment
-
- org.oa4mp.server.api.MyProxyServiceEnvironment
-
- org.oa4mp.server.api.ServiceEnvironmentImpl
-
- All Implemented Interfaces:
ServiceEnvironment
,edu.uiuc.ncsa.security.core.Logable
- Direct Known Subclasses:
OA2SE
public class ServiceEnvironmentImpl extends MyProxyServiceEnvironment 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServiceEnvironmentImpl.MessagesProvider
-
Field Summary
Fields Modifier and Type Field Description protected javax.inject.Provider<AGIssuer>
agip
protected javax.inject.Provider<ATIssuer>
atip
protected javax.inject.Provider<ClientApprovalStore>
casp
protected ClientApprovalStore<ClientApproval>
clientApprovalStore
protected ClientStore
clientStore
protected javax.inject.Provider<ClientStore>
csp
protected edu.uiuc.ncsa.security.util.mail.MailUtil
mailUtil
protected javax.inject.Provider<PAIssuer>
paip
protected javax.inject.Provider<PermissionsStore>
psp
protected javax.inject.Provider<TokenForge>
tfp
protected TransactionStore<ServiceTransaction>
transactionStore
protected javax.inject.Provider<TransactionStore>
tsp
-
Fields inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.MyProxyServiceEnvironment
myProxyServices
-
-
Constructor Summary
Constructors Constructor Description ServiceEnvironmentImpl(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger, List<MyProxyFacadeProvider> mfp, javax.inject.Provider<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<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
.AGIssuer
getAgIssuer()
TheAbstractIssuer
that createsedu.uiuc.ncsa.security.delegation.token.AuthorizationGrant
s.ATIssuer
getAtIssuer()
TheAbstractIssuer
that createsedu.uiuc.ncsa.security.delegation.token.AccessToken
s.AuthorizationServletConfig
getAuthorizationServletConfig()
ClientApprovalStore
getClientApprovalStore()
returns the client approval store.AbstractCLIApprover.ClientApprovalThread
getClientApprovalThread()
ClientStore
getClientStore()
Returns the currentClientStore
.KeyPair
getKeyPair()
Return a key pair for cert request generation, e.g.edu.uiuc.ncsa.security.util.pkcs.KeyPairQueue
getKeyPairQueue()
edu.uiuc.ncsa.security.util.mail.MailUtil
getMailUtil()
Returns the mail utility which, when configured, will send notifications for requests.int
getMaxAllowedNewClientRequests()
Map<String,String>
getMessages()
Messages which may be displayed to the user, e.g., when authentication fails.PAIssuer
getPaIssuer()
TheAbstractIssuer
that creates theedu.uiuc.ncsa.security.delegation.token.ProtectedAsset
s.PermissionsStore<Permission>
getPermissionStore()
URI
getServiceAddress()
The address for this server.TokenForge
getTokenForge()
The forge that creates delegation tokens for this service.TransactionStore<ServiceTransaction>
getTransactionStore()
Returns the current transaction store.edu.uiuc.ncsa.security.servlet.UsernameTransformer
getUsernameTransformer()
Use the setter to customize the user name transformation.boolean
isPollingEnabled()
List<edu.uiuc.ncsa.security.core.Store>
listStores()
List the current stores in this environment.void
setClientApprovalThread(AbstractCLIApprover.ClientApprovalThread clientApprovalThread)
void
setServiceAddress(URI serviceAddress)
void
setUsernameTransformer(edu.uiuc.ncsa.security.servlet.UsernameTransformer usernameTransformer)
-
Methods inherited from class edu.uiuc.ncsa.myproxy.oa4mp.server.MyProxyServiceEnvironment
getMyProxyServices
-
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 edu.uiuc.ncsa.myproxy.oa4mp.server.ServiceEnvironment
getConstants, getMyProxyServices, isPingable
-
-
-
-
Field Detail
-
tsp
protected javax.inject.Provider<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<TokenForge> tfp
-
mailUtil
protected edu.uiuc.ncsa.security.util.mail.MailUtil mailUtil
-
clientApprovalStore
protected ClientApprovalStore<ClientApproval> clientApprovalStore
-
clientStore
protected ClientStore clientStore
-
transactionStore
protected TransactionStore<ServiceTransaction> transactionStore
-
-
Constructor Detail
-
ServiceEnvironmentImpl
public ServiceEnvironmentImpl(edu.uiuc.ncsa.security.core.util.MyLoggingFacade logger, List<MyProxyFacadeProvider> mfp, javax.inject.Provider<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<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:ServiceEnvironment
Return a key pair for cert request generation, e.g. in limited proxy requests.- Specified by:
getKeyPair
in interfaceServiceEnvironment
- Returns:
-
getAuthorizationServletConfig
public AuthorizationServletConfig getAuthorizationServletConfig()
- Specified by:
getAuthorizationServletConfig
in interfaceServiceEnvironment
-
getServiceAddress
public URI getServiceAddress()
Description copied from interface:ServiceEnvironment
The address for this server. Since hosts can have any of several aliases, automatic determination from the servlet is usually a bad idea.- Specified by:
getServiceAddress
in interfaceServiceEnvironment
- Returns:
-
setServiceAddress
public void setServiceAddress(URI serviceAddress)
- Specified by:
setServiceAddress
in interfaceServiceEnvironment
-
getAgIssuer
public AGIssuer getAgIssuer()
Description copied from interface:ServiceEnvironment
TheAbstractIssuer
that createsedu.uiuc.ncsa.security.delegation.token.AuthorizationGrant
s.- Specified by:
getAgIssuer
in interfaceServiceEnvironment
- Returns:
-
getAtIssuer
public ATIssuer getAtIssuer()
Description copied from interface:ServiceEnvironment
TheAbstractIssuer
that createsedu.uiuc.ncsa.security.delegation.token.AccessToken
s.- Specified by:
getAtIssuer
in interfaceServiceEnvironment
- Returns:
-
getPaIssuer
public PAIssuer getPaIssuer()
Description copied from interface:ServiceEnvironment
TheAbstractIssuer
that creates theedu.uiuc.ncsa.security.delegation.token.ProtectedAsset
s.- Specified by:
getPaIssuer
in interfaceServiceEnvironment
- Returns:
-
getTokenForge
public TokenForge getTokenForge()
Description copied from interface:ServiceEnvironment
The forge that creates delegation tokens for this service.- Specified by:
getTokenForge
in interfaceServiceEnvironment
- Returns:
-
getMessages
public Map<String,String> getMessages()
Description copied from interface:ServiceEnvironment
Messages which may be displayed to the user, e.g., when authentication fails.- Specified by:
getMessages
in interfaceServiceEnvironment
- Returns:
-
getPermissionStore
public PermissionsStore<Permission> getPermissionStore()
-
getClientApprovalStore
public ClientApprovalStore getClientApprovalStore()
Description copied from interface:ServiceEnvironment
returns the client approval store.- Specified by:
getClientApprovalStore
in interfaceServiceEnvironment
- Returns:
-
getClientStore
public ClientStore getClientStore()
Description copied from interface:ServiceEnvironment
Returns the currentClientStore
.- Specified by:
getClientStore
in interfaceServiceEnvironment
- Returns:
-
getMailUtil
public edu.uiuc.ncsa.security.util.mail.MailUtil getMailUtil()
Description copied from interface:ServiceEnvironment
Returns the mail utility which, when configured, will send notifications for requests.- Specified by:
getMailUtil
in interfaceServiceEnvironment
- Returns:
-
getTransactionStore
public TransactionStore<ServiceTransaction> getTransactionStore()
Description copied from interface:ServiceEnvironment
Returns the current transaction store.- Specified by:
getTransactionStore
in interfaceServiceEnvironment
- Returns:
-
isPollingEnabled
public boolean isPollingEnabled()
-
getClientApprovalThread
public AbstractCLIApprover.ClientApprovalThread getClientApprovalThread()
-
setClientApprovalThread
public void setClientApprovalThread(AbstractCLIApprover.ClientApprovalThread clientApprovalThread)
-
getMaxAllowedNewClientRequests
public int getMaxAllowedNewClientRequests()
- Specified by:
getMaxAllowedNewClientRequests
in interfaceServiceEnvironment
-
getUsernameTransformer
public edu.uiuc.ncsa.security.servlet.UsernameTransformer getUsernameTransformer()
Use the setter to customize the user name transformation.- Specified by:
getUsernameTransformer
in interfaceServiceEnvironment
- Returns:
-
setUsernameTransformer
public void setUsernameTransformer(edu.uiuc.ncsa.security.servlet.UsernameTransformer usernameTransformer)
- Specified by:
setUsernameTransformer
in interfaceServiceEnvironment
-
getAdminClientStore
public AdminClientStore<AdminClient> getAdminClientStore()
Description copied from interface:ServiceEnvironment
Returns theAdminClientStore
.- Specified by:
getAdminClientStore
in interfaceServiceEnvironment
- Returns:
-
listStores
public List<edu.uiuc.ncsa.security.core.Store> listStores()
Description copied from interface:ServiceEnvironment
List the current stores in this environment. Used at bootstrapping for various types of introspection.- Specified by:
listStores
in interfaceServiceEnvironment
- Returns:
-
-