org.astrogrid.community.client.delegate
Class AdministrationDelegate

java.lang.Object
  extended byorg.astrogrid.community.client.delegate.AdministrationDelegate

public class AdministrationDelegate
extends java.lang.Object

The AdministrationDelegate is the gateway to the webservice, having mappped methods to the webservice methods. This particular class deals with administration piece of the community. Many webservice methods are requred for administration such as inserting permissions, resources, accounts, groups and others.

Author:
Kevin Benson This API is going to be replaced during iter 5, and will be deprecated in iter 6.

Constructor Summary
AdministrationDelegate()
          Public constructor deals with getting our service (link) to the webservice.
 
Method Summary
 org.astrogrid.community.common.policy.data.AccountData addAccount(java.lang.String name)
          Adds an account.
 org.astrogrid.community.common.policy.data.GroupData addGroup(java.lang.String ident)
          Add a group.
 boolean addGroupMember(java.lang.String account, java.lang.String group)
          Adds a user/account to a particular MULTI group.
 org.astrogrid.community.common.policy.data.PolicyPermission addPermission(java.lang.String resource, java.lang.String group, java.lang.String action)
          Creates a new permission in the database tying a resource to a group for a specefic action.
 org.astrogrid.community.common.policy.data.ResourceData addResource(java.lang.String name)
          Adds a resource.
 boolean delAccount(java.lang.String name)
          Deletes an account.
 boolean delGroup(java.lang.String ident)
          Delete a group.
 boolean delGroupMember(java.lang.String account, java.lang.String group)
          Deletes a user from a group.
 boolean delPermission(java.lang.String resource, java.lang.String group, java.lang.String action)
          Deletes a permission from teh database.
 org.astrogrid.community.common.policy.data.ResourceData delResource(java.lang.String name)
          Deletes a resource.
 org.astrogrid.community.common.policy.data.AccountData getAccount(java.lang.String name)
          Get an Account object which consists of a name, and description.
 java.util.ArrayList getAccountList()
          Deprecated. because getRemoteAccounts using the local url, would get the same results.
 org.astrogrid.community.common.policy.data.GroupData getGroup(java.lang.String ident)
          Get a group.
 java.util.ArrayList getGroupList()
          Deprecated.  
 java.util.ArrayList getGroupMembers(java.lang.String group)
          Get a community list.
 org.astrogrid.community.common.policy.data.ResourceData getResource(java.lang.String name)
          Returns a resource information.
 java.util.ArrayList getResourceList()
          Returna an array of ResourceData objects.
 org.astrogrid.community.common.policy.data.AccountData setAccount(org.astrogrid.community.common.policy.data.AccountData ad)
          Updates an account.
 org.astrogrid.community.common.policy.data.GroupData setGroup(org.astrogrid.community.common.policy.data.GroupData groupData)
          Update a group.
 org.astrogrid.community.common.policy.data.ResourceData setResource(org.astrogrid.community.common.policy.data.ResourceData ad)
          Update a resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdministrationDelegate

public AdministrationDelegate()
Public constructor deals with getting our service (link) to the webservice.

Method Detail

addPermission

public org.astrogrid.community.common.policy.data.PolicyPermission addPermission(java.lang.String resource,
                                                                                 java.lang.String group,
                                                                                 java.lang.String action)
                                                                          throws java.lang.Exception
Creates a new permission in the database tying a resource to a group for a specefic action.

Parameters:
resource -
group -
action -
Returns:
Throws:
java.lang.Exception

delPermission

public boolean delPermission(java.lang.String resource,
                             java.lang.String group,
                             java.lang.String action)
                      throws java.lang.Exception
Deletes a permission from teh database.

Parameters:
resource -
group -
action -
Returns:
Throws:
java.lang.Exception

addGroupMember

public boolean addGroupMember(java.lang.String account,
                              java.lang.String group)
                       throws java.lang.Exception
Adds a user/account to a particular MULTI group.

Parameters:
account -
group -
Returns:
Throws:
java.lang.Exception

delGroupMember

public boolean delGroupMember(java.lang.String account,
                              java.lang.String group)
                       throws java.lang.Exception
Deletes a user from a group.

Parameters:
account -
group -
Returns:
Throws:
java.lang.Exception

addAccount

public org.astrogrid.community.common.policy.data.AccountData addAccount(java.lang.String name)
                                                                  throws java.lang.Exception
Adds an account.

Parameters:
name -
Returns:
Throws:
java.lang.Exception

delAccount

public boolean delAccount(java.lang.String name)
                   throws java.lang.Exception
Deletes an account.

Parameters:
name -
Returns:
Throws:
java.lang.Exception

getAccount

public org.astrogrid.community.common.policy.data.AccountData getAccount(java.lang.String name)
                                                                  throws java.lang.Exception
Get an Account object which consists of a name, and description.

Parameters:
name -
Returns:
Throws:
java.lang.Exception
See Also:
org.astrogrid.community.policy.data.AccountData

getAccountList

public java.util.ArrayList getAccountList()
                                   throws java.lang.Exception
Deprecated. because getRemoteAccounts using the local url, would get the same results.

Gets a local account list.

Returns:
Throws:
java.lang.Exception

setAccount

public org.astrogrid.community.common.policy.data.AccountData setAccount(org.astrogrid.community.common.policy.data.AccountData ad)
                                                                  throws java.lang.Exception
Updates an account.

Parameters:
ad -
Returns:
Throws:
java.lang.Exception

addResource

public org.astrogrid.community.common.policy.data.ResourceData addResource(java.lang.String name)
                                                                    throws java.lang.Exception
Adds a resource.

Parameters:
name -
Returns:
Throws:
java.lang.Exception

delResource

public org.astrogrid.community.common.policy.data.ResourceData delResource(java.lang.String name)
                                                                    throws java.lang.Exception
Deletes a resource.

Parameters:
name -
Returns:
Throws:
java.lang.Exception

getResource

public org.astrogrid.community.common.policy.data.ResourceData getResource(java.lang.String name)
                                                                    throws java.lang.Exception
Returns a resource information.

Parameters:
name -
Returns:
Throws:
java.lang.Exception
See Also:
org.astrogrid.community.policy.data.ResourceData

getResourceList

public java.util.ArrayList getResourceList()
                                    throws java.lang.Exception
Returna an array of ResourceData objects.

Returns:
Throws:
java.lang.Exception

setResource

public org.astrogrid.community.common.policy.data.ResourceData setResource(org.astrogrid.community.common.policy.data.ResourceData ad)
                                                                    throws java.lang.Exception
Update a resource.

Parameters:
ad -
Returns:
Throws:
java.lang.Exception

getGroupList

public java.util.ArrayList getGroupList()
                                 throws java.lang.Exception
Deprecated.  

Get a group list.

Returns:
Throws:
java.lang.Exception

delGroup

public boolean delGroup(java.lang.String ident)
                 throws java.lang.Exception
Delete a group.

Parameters:
ident -
Returns:
Throws:
java.lang.Exception

addGroup

public org.astrogrid.community.common.policy.data.GroupData addGroup(java.lang.String ident)
                                                              throws java.lang.Exception
Add a group.

Parameters:
ident -
Returns:
Throws:
java.lang.Exception

getGroup

public org.astrogrid.community.common.policy.data.GroupData getGroup(java.lang.String ident)
                                                              throws java.lang.Exception
Get a group.

Parameters:
ident -
Returns:
Throws:
java.lang.Exception

setGroup

public org.astrogrid.community.common.policy.data.GroupData setGroup(org.astrogrid.community.common.policy.data.GroupData groupData)
                                                              throws java.lang.Exception
Update a group.

Parameters:
groupData -
Returns:
Throws:
java.lang.Exception

getGroupMembers

public java.util.ArrayList getGroupMembers(java.lang.String group)
                                    throws java.lang.Exception
Get a community list.

Returns:
Throws:
java.lang.Exception - public ArrayList getCommunityList() throws Exception { return createArrayList(service.getCommunityList()); }


Copyright © 2002-2007 AstroGrid. All Rights Reserved.