eu.xtreemos.xati.API
Class XRCAServer

java.lang.Object
  extended by eu.xtreemos.xati.API.XRCAServer

public class XRCAServer
extends java.lang.Object

Author:
gregor.pipan@xlab.si

Field Summary
static java.lang.String servicename
           
 
Constructor Summary
XRCAServer()
           
 
Method Summary
static java.lang.Integer applyForRegistration(ResourceDescriptorRecord __resource)
          Put the resource on the list of resources that can be registered, but need to wait for an authorised administrator to confirm the registration using the confirmRegistration call before the resource can have its certificates signed by the RCA.
static java.lang.Integer confirmRegistration(ResourceID __id)
          Confirm the registration of a resource that has previously been applied for the registration using applyForRegistration.
static java.util.ArrayList<ResourceDescriptorRecord> getPendingResources()
          Returns a list of resource descriptions describing the resources listed in the RCA DB as pending for registration.
static java.util.ArrayList<ResourceDescriptorRecord> getRegisteredResources()
          Returns a list of resource descriptions describing the resources listed in the RCA DB as registered.
static java.lang.Integer getResourceStatus(ResourceID __id)
          Retrieves the current status of the resource according to the RCA DB.
static java.lang.Integer notifyVOMembershipChange(ResourceID __id, java.lang.String __vo, java.lang.Boolean __addition)
          Lets manipulate with the resource's membership of a VO.
static ResourceDescriptorRecord unregisterResource(ResourceID __id)
          Remove the resource from the list of registered resources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servicename

public static java.lang.String servicename
Constructor Detail

XRCAServer

public XRCAServer()
Method Detail

getRegisteredResources

public static java.util.ArrayList<ResourceDescriptorRecord> getRegisteredResources()
                                                                            throws java.lang.Exception
Returns a list of resource descriptions describing the resources listed in the RCA DB as registered.

Returns:
A collection of resource descriptors of resources registered with the RCA.
Throws:
java.lang.Exception

getPendingResources

public static java.util.ArrayList<ResourceDescriptorRecord> getPendingResources()
                                                                         throws java.lang.Exception
Returns a list of resource descriptions describing the resources listed in the RCA DB as pending for registration.

Returns:
A collection of resource descriptors of resources applied for registration with the RCA.
Throws:
java.lang.Exception

applyForRegistration

public static java.lang.Integer applyForRegistration(ResourceDescriptorRecord __resource)
                                              throws java.lang.Exception
Put the resource on the list of resources that can be registered, but need to wait for an authorised administrator to confirm the registration using the confirmRegistration call before the resource can have its certificates signed by the RCA. If the resource is already on any of the lists, then their entry gets replaced with the new value, thus updating the application or the registration.

Parameters:
resource - The descriptor of the resource applying for the registration.
Returns:
0 if the call was successful.
Throws:
java.lang.Exception

confirmRegistration

public static java.lang.Integer confirmRegistration(ResourceID __id)
                                             throws java.lang.Exception
Confirm the registration of a resource that has previously been applied for the registration using applyForRegistration. After this call, the RCA will sign certificates for the registered resource (requestCertificate).

Parameters:
id - The id of the resource record signifying the resource to be confirmed for the registration.
Returns:
0 if the call was successful.
Throws:
java.lang.Exception

unregisterResource

public static ResourceDescriptorRecord unregisterResource(ResourceID __id)
                                                   throws java.lang.Exception
Remove the resource from the list of registered resources. Once the resource has been unregistered, it cannot have the machine certificates signed by the RCA.

Parameters:
id - The id of the resource record signifying the resource to be removed for the list of registered resources.
Returns:
0 if the call was successful.
Throws:
java.lang.Exception

getResourceStatus

public static java.lang.Integer getResourceStatus(ResourceID __id)
                                           throws java.lang.Exception
Retrieves the current status of the resource according to the RCA DB.

Parameters:
id - The identifier of the resource to check the status of.
Returns:
The status of the resource.
Throws:
java.lang.Exception

notifyVOMembershipChange

public static java.lang.Integer notifyVOMembershipChange(ResourceID __id,
                                                         java.lang.String __vo,
                                                         java.lang.Boolean __addition)
                                                  throws java.lang.Exception
Lets manipulate with the resource's membership of a VO. The method can set and unset the VO which the resource belongs to. The resource has to be on a registered resources list.

Parameters:
id - The identification of the resource we are setting the membership in a VO of.
vo - The VO to set the membership in.
addition - If true, the membership will be set, and if false, the VO will be removed from the list of VOs the resource is a member of.
Returns:
0 if the call was successful.
Throws:
ResourceNotRegisteredException - If the resource is not on the list of the registered resources.
java.lang.Exception