23.2 Resource Web Service Interface

This section provides details about the methods available with the Resource Web service. This programming interface presumes you’re using Java code generated by the WSSDK toolkit. The interface will be different if you’re using another Web Service toolkit.

23.2.1 IRemoteResource

This section provides reference information for each method associated with the IRemoteResource interface.

requestResourceGrant

Makes a grant resource request and returns a resource request correlation ID.

Syntax: Here is the method signature:

public String requestResourceGrant(String resourceTarget, String requester, String userTarget, String reasonForRequest,
        ResourceRequestParam[] requestParams, String correlationId)
            throws NrfServiceException, RemoteException;

The parameters are described below:

  • resourceTarget specifies the target resource DN.

  • requester supplies an identifier for the remote client application making the request to grant the resource.

  • userTarget specifies the DN for the being granted the resource.

  • reasonForRequest provides a reason for the request.

  • requestParams provides the parameter values for the request.

  • correlationId specifies a resource assignment request correlation ID; if the parameter is null, a correlation ID is generated.

The requester parameter is a client-supplied identifier for the agent making the request. For example, an identifier such as IRemote-MyApplicationName might be used to identify a request from MyApplicationName. The requestParams are the dynamic parameter values required by the resource to make a request. If no values are required, the parameter value can be null or an empty array. The correlationId allows a client to group request for the purpose of checking the staus. If the parameter value is null, the service generates a unique correlation id. The correlation id is returned to the caller.

requestResourceRevoke

Makes a revoke resource request and returns a resource request correlation ID.

The revoke invocation behavior mirrors the behavior for a grant opeation, except that a revoke request for the resource is posted on the server.

Syntax: Here is the method signature:

public String requestResourceRevoke(String resourceTarget, 
           String  requester, String userTarget, String reasonForRequest,
           ResourceRequestParam[] requestParams, String correlationId)
        throws NrfServiceException, RemoteException;

The parameters are described below:

  • resourceTarget specifies the target resource DN.

  • requester supplies an identifier for the remote client application making the request to revoke the resource.

  • userTarget specifies the DN for the being granted the resource.

  • reasonForRequest provides a reason for the request.

  • requestParams provides the parameter values for the request.

  • correlationId specifies a resource assignment request correlation ID; if the parameter is null, a correlation ID is generated.

getResourceRequestStatusByCorrelationId

Returns all resource request status items for a given correlation ID.

Syntax: Here is the method signature:

public ResourceAssignmentRequestStatus[]
           getResourceRequestStatusByCorrelationId 
                   (String correlationId, String locale)
               throws NrfServiceException, RemoteException;

The parameters are described below:

  • correlationId specifies a resource assignment request correlation ID.

  • locale supplies an iso639 language code to format localized string values; if the parameter is null, the language defaults to the servlet request locale.

This method returns all resource request status instances for the specified correlationId parameter value. For more information on the ResourceAssignmentRequestStatus class, see Section 23.2.3, ResourceAssignmentRequestStatus.

getResourceRequestsStatusForCurrentUser

Returns all resource request status items for the authenticated user.

Syntax: Here is the method signature:

 public ResourceAssignmentRequestStatus[]     
                  getResourceRequestStatusForCurrentUser(String locale)
               throws NrfServiceException, RemoteException;

The parameters are described below:

  • locale supplies an iso639 language code to format localized string values; if the parameter is null, the language defaults to the servlet request locale.

This method returns all resource request status instances for the specified correlationId parameter value. For more information on the ResourceAssignmentRequestStatus class, see Section 23.2.3, ResourceAssignmentRequestStatus.

getResourceRequestStatusByIdentity

Returns all resource assignment request status items for a particular user identity.

Syntax: Here is the method signature:

public ResourceAssignmentRequestStatus[]
           getResourceRequestStatusByIdentity(String identity, String locale)
        throws NrfServiceException, RemoteException;

The parameters are described below:

  • identity specifies the DN for a user.

  • locale supplies an iso639 language code to format localized string values; if the parameter is null, the language defaults to the servlet request locale.

This method returns all resource request status instances for the specified correlationId parameter value. For more information on the ResourceAssignmentRequestStatus class, see Section 23.2.3, ResourceAssignmentRequestStatus.

23.2.2 ResourceRequestParam

Supporting class that holds the name and value for a resource request parameter value.

ResourceRequestParam Constructors

The ResourceRequestParam class has two constructors.

Syntax 1: Here is the syntax for a constructor that takes no parameters:

public ResourceRequestParam() 
    {        
    }

Syntax 2: Here is the syntax for a constructor that takes two String parameters:

public ResourceRequestParam(String name, String value) 
    {   
        m_name = name;
        m_value = value;
    }

setName

Sets a parameter name.

Syntax: Here is the method signature:

public void setName(String name)

getName

Returns a parameter name.

Syntax: Here is the method signature:

public String getName()

setValue

Sets the value of a parameter.

Syntax: Here is the method signature:

public void setValue(String value)

getValue

Returns the value of a parameter.

Syntax: Here is the method signature:

public String getValue()

23.2.3 ResourceAssignmentRequestStatus

Supporting class that holds a resource request status item. The interface includes methods for getting and setting various request status properties. However, you will not need to call the methods for setting property values, since you are using this class to retrieve information about the request status. After calling the requestResourceGrant() or the requestResourceRevoke() methods, you can use the get methods to get the properties for each status object returned in the ResourceAssignmentRequestStatus array.

setEntityKey

Sets the entity key.

Syntax: Here is the method signature:

public void setEntityKey(String entityKey)

getEntityKey

Gets the entity key.

Syntax: Here is the method signature:

public String getEntityKey()

setReason

Sets the reason for the role assignment.

Syntax: Here is the method signature:

public void setReason(String reason)

getReason

Gets the reason for the role assignment.

Syntax: Here is the method signature:

public String getReason()

setStatusValue

Sets the status value for the request.

Syntax: Here is the method signature:

public void setStatusValue(int value)

setStatusDescription

Sets the status description for the request.

Syntax: Here is the method signature:

public void setStatusDescription(String description)

getStatusValue

Gets the status value for the request.

Syntax: Here is the method signature:

public int getStatusValue()

getStatusDescription

Gets the localized description for the request.

Syntax: Here is the method signature:

public String getStatusDescription()

setCorrelationId

Sets the correlation ID.

Syntax: Here is the method signature:

public void setCorrelationId(String correlationId)

getCorrelationId

Gets the correlation ID.

Syntax: Here is the method signature:

public String getCorrelationId()

setRequester

Sets the requester DN.

Syntax: Here is the method signature:

public void setRequester(String requester)

getRequester

Gets the requester DN.

Syntax: Here is the method signature:

public String getRequester()

setRequestDate

Sets the request date.

Syntax: Here is the method signature:

public void setRequestDate(Date requestDate)

getRequestDate

Gets the request date.

Syntax: Here is the method signature:

public Date getRequestDate()

setSource

Sets the source resource DN.

Syntax: Here is the method signature:

public void setSource(String source)

getSource

Gets the source resource DN.

Syntax: Here is the method signature:

public String getSource()

setTarget

Sets the DN for the target identity.

Syntax: Here is the method signature:

public void setTarget(String target)

getTarget

Gets the DN for the target identity.

Syntax: Here is the method signature:

public String getTarget()

setRequestParams

Sets the dynamic request parameters.

Syntax: Here is the method signature:

public void setRequestParams(ResourceRequestParam[] params)

getRequestParams

Gets the dynamic request parameters.

Syntax: Here is the method signature:

public ResourceRequestParam[] getRequestParams()