org.globus.delegation.service
Class DelegationResource
java.lang.Object
org.globus.delegation.service.DelegationResource
- All Implemented Interfaces:
- PersistenceCallback, RemoveCallback, Resource, ResourceIdentifier, ResourceLifetime, SecureResource
- public class DelegationResource
- extends java.lang.Object
- implements Resource, ResourceIdentifier, ResourceLifetime, SecureResource, RemoveCallback, PersistenceCallback
|
Method Summary |
private void |
addListener(DelegationListener listener)
|
void |
addRefreshListener(DelegationListener listener)
|
void |
addRefreshListener(DelegationListener listener,
javax.security.auth.Subject subject)
|
private void |
authorize()
|
private void |
authorize(java.lang.String callerDN)
|
private void |
authorize(javax.security.auth.Subject subject)
|
void |
create(org.apache.ws.security.message.token.BinarySecurity _token,
java.lang.String _callerDN,
java.lang.String _localName,
java.lang.String _resourceDescPath,
java.lang.String id)
|
private java.security.cert.X509Certificate[] |
getCertificateChain(org.apache.ws.security.message.token.BinarySecurity token)
|
org.globus.gsi.GlobusCredential |
getCredential()
|
org.globus.gsi.GlobusCredential |
getCredential(javax.security.auth.Subject subject)
|
java.util.Calendar |
getCurrentTime()
|
java.lang.Object |
getID()
|
private java.io.File |
getKeyAsFile(java.lang.Object key)
|
protected FilePersistenceHelper |
getPersistenceHelper()
|
ResourceSecurityDescriptor |
getSecurityDescriptor()
|
java.util.Calendar |
getTerminationTime()
|
private void |
initialize()
|
void |
load(ResourceKey key)
Loads and sets up the resource - credential, expiration time,
listeners and security descriptor. |
private void |
notifyCredentialDelete()
|
private void |
notifyListeners()
|
void |
remove()
|
void |
removeRefreshListener(java.lang.String listenerId)
|
private void |
setExpirationTime()
|
private void |
setResourceDescriptor()
|
void |
setTerminationTime(java.util.Calendar _terminationTime)
|
private void |
setToken(org.apache.ws.security.message.token.BinarySecurity token)
|
void |
store()
Persists the credential, callerDN, localName, resourceDescPath,
termination time and listeners |
void |
storeToken(org.apache.ws.security.message.token.BinarySecurity token)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
desc
private ResourceSecurityDescriptor desc
i18n
private static org.globus.util.I18n i18n
logger
static org.apache.commons.logging.Log logger
persistenceHelper
private FilePersistenceHelper persistenceHelper
credential
private org.globus.gsi.GlobusCredential credential
callerDN
private java.lang.String callerDN
localName
private java.lang.String localName
resourceDescPath
private java.lang.String resourceDescPath
terminationTime
private java.util.Calendar terminationTime
listeners
private java.util.HashMap listeners
resourceId
private java.lang.String resourceId
DelegationResource
public DelegationResource()
create
public void create(org.apache.ws.security.message.token.BinarySecurity _token,
java.lang.String _callerDN,
java.lang.String _localName,
java.lang.String _resourceDescPath,
java.lang.String id)
throws DelegationException
- Throws:
DelegationException
initialize
private void initialize()
throws DelegationException
- Throws:
DelegationException
getID
public java.lang.Object getID()
- Specified by:
getID in interface ResourceIdentifier
storeToken
public void storeToken(org.apache.ws.security.message.token.BinarySecurity token)
throws DelegationException
- Throws:
DelegationException
setToken
private void setToken(org.apache.ws.security.message.token.BinarySecurity token)
throws DelegationException
- Throws:
DelegationException
getCredential
public org.globus.gsi.GlobusCredential getCredential()
throws DelegationException
- Throws:
DelegationException
getCredential
public org.globus.gsi.GlobusCredential getCredential(javax.security.auth.Subject subject)
throws DelegationException
- Throws:
DelegationException
addRefreshListener
public void addRefreshListener(DelegationListener listener)
throws DelegationException
- Throws:
DelegationException
addRefreshListener
public void addRefreshListener(DelegationListener listener,
javax.security.auth.Subject subject)
throws DelegationException
- Throws:
DelegationException
addListener
private void addListener(DelegationListener listener)
throws DelegationException
- Throws:
DelegationException
removeRefreshListener
public void removeRefreshListener(java.lang.String listenerId)
setTerminationTime
public void setTerminationTime(java.util.Calendar _terminationTime)
- Specified by:
setTerminationTime in interface ResourceLifetime
getTerminationTime
public java.util.Calendar getTerminationTime()
- Specified by:
getTerminationTime in interface ResourceLifetime
getCurrentTime
public java.util.Calendar getCurrentTime()
- Specified by:
getCurrentTime in interface ResourceLifetime
getCertificateChain
private java.security.cert.X509Certificate[] getCertificateChain(org.apache.ws.security.message.token.BinarySecurity token)
throws DelegationException
- Throws:
DelegationException
setExpirationTime
private void setExpirationTime()
notifyListeners
private void notifyListeners()
throws DelegationException
- Throws:
DelegationException
getSecurityDescriptor
public ResourceSecurityDescriptor getSecurityDescriptor()
- Specified by:
getSecurityDescriptor in interface SecureResource
setResourceDescriptor
private void setResourceDescriptor()
throws DelegationException
- Throws:
DelegationException
authorize
private void authorize(javax.security.auth.Subject subject)
throws DelegationException
- Throws:
DelegationException
authorize
private void authorize()
throws DelegationException
- Throws:
DelegationException
authorize
private void authorize(java.lang.String callerDN)
throws DelegationException
- Throws:
DelegationException
load
public void load(ResourceKey key)
throws ResourceException,
NoSuchResourceException,
InvalidResourceKeyException
- Loads and sets up the resource - credential, expiration time,
listeners and security descriptor.
- Specified by:
load in interface PersistenceCallback
- Throws:
ResourceException
NoSuchResourceException
InvalidResourceKeyException
store
public void store()
throws ResourceException
- Persists the credential, callerDN, localName, resourceDescPath,
termination time and listeners
- Specified by:
store in interface PersistenceCallback
- Throws:
ResourceException
getPersistenceHelper
protected FilePersistenceHelper getPersistenceHelper()
getKeyAsFile
private java.io.File getKeyAsFile(java.lang.Object key)
throws InvalidResourceKeyException
- Throws:
InvalidResourceKeyException
notifyCredentialDelete
private void notifyCredentialDelete()
remove
public void remove()
throws ResourceException
- Specified by:
remove in interface RemoveCallback
- Throws:
ResourceException