org.astrogrid.community.client.security.service
Class SecurityServiceCoreDelegate

java.lang.Object
  extended byorg.astrogrid.community.client.service.CommunityServiceCoreDelegate
      extended byorg.astrogrid.community.client.security.service.SecurityServiceCoreDelegate
All Implemented Interfaces:
org.astrogrid.community.common.service.CommunityService, CommunityServiceDelegate, java.rmi.Remote, org.astrogrid.community.common.security.service.SecurityService, SecurityServiceDelegate
Direct Known Subclasses:
SecurityServiceMockDelegate, SecurityServiceSoapDelegate

public class SecurityServiceCoreDelegate
extends CommunityServiceCoreDelegate
implements org.astrogrid.community.common.security.service.SecurityService, SecurityServiceDelegate

The core delegate code for our SecurityService service. This acts as a wrapper for a SecurityService service, and handles any RemoteExceptions internally.


Constructor Summary
SecurityServiceCoreDelegate()
          Public constructor.
 
Method Summary
 org.astrogrid.community.common.security.data.SecurityToken checkPassword(java.lang.String account, java.lang.String pass)
          Check an Account password.
 org.astrogrid.community.common.security.data.SecurityToken checkToken(org.astrogrid.community.common.security.data.SecurityToken token)
          Validate a SecurityToken.
protected  org.astrogrid.community.common.security.service.SecurityService getSecurityService()
          Get a reference to our SecurityService service.
protected  void setSecurityService(org.astrogrid.community.common.security.service.SecurityService service)
          Set our our SecurityService service.
 java.lang.Object[] splitToken(org.astrogrid.community.common.security.data.SecurityToken token, int count)
          Split a SecurityToken.
 
Methods inherited from class org.astrogrid.community.client.service.CommunityServiceCoreDelegate
getCommunityService, getServiceStatus, identifierException, policyException, resourceException, securityException, serviceException, setCommunityService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.astrogrid.community.common.service.CommunityService
getServiceStatus
 
Methods inherited from interface org.astrogrid.community.client.service.CommunityServiceDelegate
getServiceStatus
 

Constructor Detail

SecurityServiceCoreDelegate

public SecurityServiceCoreDelegate()
Public constructor.

Method Detail

getSecurityService

protected org.astrogrid.community.common.security.service.SecurityService getSecurityService()
Get a reference to our SecurityService service.


setSecurityService

protected void setSecurityService(org.astrogrid.community.common.security.service.SecurityService service)
Set our our SecurityService service.


checkPassword

public org.astrogrid.community.common.security.data.SecurityToken checkPassword(java.lang.String account,
                                                                                java.lang.String pass)
                                                                         throws org.astrogrid.community.common.exception.CommunityServiceException,
                                                                                org.astrogrid.community.common.exception.CommunitySecurityException,
                                                                                org.astrogrid.community.common.exception.CommunityIdentifierException
Check an Account password.

Specified by:
checkPassword in interface org.astrogrid.community.common.security.service.SecurityService
Parameters:
account - The account ident.
Returns:
A valid SecurityToken if the ident and password are valid.
Throws:
org.astrogrid.community.common.exception.CommunitySecurityException - If the security check fails.
org.astrogrid.community.common.exception.CommunityServiceException - If there is an internal error in service.
org.astrogrid.community.common.exception.CommunityIdentifierException - If the account identifier is invalid.

checkToken

public org.astrogrid.community.common.security.data.SecurityToken checkToken(org.astrogrid.community.common.security.data.SecurityToken token)
                                                                      throws org.astrogrid.community.common.exception.CommunityServiceException,
                                                                             org.astrogrid.community.common.exception.CommunitySecurityException,
                                                                             org.astrogrid.community.common.exception.CommunityIdentifierException
Validate a SecurityToken. Validates a token, and creates a new tokens issued to the same account.

Specified by:
checkToken in interface org.astrogrid.community.common.security.service.SecurityService
Parameters:
token - The token to validate.
Returns:
A new SecurityToken if the original was valid.
Throws:
org.astrogrid.community.common.exception.CommunitySecurityException - If the security check fails.
org.astrogrid.community.common.exception.CommunityServiceException - If there is an internal error in service.
org.astrogrid.community.common.exception.CommunityIdentifierException - If the token is invalid.
To Do:
This should make the original token invalid IF it has been used.

splitToken

public java.lang.Object[] splitToken(org.astrogrid.community.common.security.data.SecurityToken token,
                                     int count)
                              throws org.astrogrid.community.common.exception.CommunityServiceException,
                                     org.astrogrid.community.common.exception.CommunitySecurityException,
                                     org.astrogrid.community.common.exception.CommunityIdentifierException
Split a SecurityToken. Validates a token, and then creates a new set of tokens issued to the same account.

Specified by:
splitToken in interface org.astrogrid.community.common.security.service.SecurityService
Throws:
org.astrogrid.community.common.exception.CommunitySecurityException - If the security check fails.
org.astrogrid.community.common.exception.CommunityServiceException - If there is an internal error in service.
org.astrogrid.community.common.exception.CommunityIdentifierException - If the token is invalid.
To Do:
This should make the original token invalid, This should make the original token invalid IF it has been used.


Copyright © 2002-2007 AstroGrid. All Rights Reserved.