Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.1

E36938-01


com.oracle.sft.api
Interface RestAuthorizeData


public interface RestAuthorizeData

Data used to authorize the operation calling a REST API. Different data are needed for authorizing different REST API.


Method Summary
 String getCommunicationId()
           Get communication id.
 String getOperationStarer()
           Get the starter participant of an operation.
 String getOriginator()
          Get the "originator" part of a communication.
 List<String> getParticipants()
          Get all participants of a communication.
 String getReason()
          Get the reason of authorization result.
 boolean isUserInRole(String role)
          Returns a boolean indicating whether the authenticated user is included in the specified logical "role".
 void setReason(String reason)
          If there is reason of authorization result that need to be specified, set it so that caller can use it.

 

Method Detail

getCommunicationId

String getCommunicationId()

Get communication id. The communication may be conversation, conference, IM conversation, IM conference or others.

In different scenario, the id has different meaning. For example, when creating a conversation (HTTP method is POST/PUT), the id is the name of a conversation that REST API invoker want to create. When getting a conversation (HTTP method is GET), the id is the name of a existing conversation which REST QPI invoker want to know.

Returns:
id of the communication

getOperationStarer

String getOperationStarer()

Get the starter participant of an operation. For example, sending a message from Bob, then Bob is the operation starter.

Returns:
the name of starter participant.

getParticipants

List<String> getParticipants()
Get all participants of a communication. Here are some examples. When creating a conference, all given participants including the originator are in the returned list. When updating a conference, all expected participants including the originator are in the returned list. When sending a message from Bob in an IM conversation, the returned list contains both Bob and the other participant.
Returns:
the name list of all participants of the communication.

getOriginator

String getOriginator()
Get the "originator" part of a communication. Note: some communication, such as IM conference, has not originator role. So do not use this method for these communication.
Returns:
the name of "to" part.

isUserInRole

boolean isUserInRole(String role)
Returns a boolean indicating whether the authenticated user is included in the specified logical "role". Roles and role membership can be defined using deployment descriptors. If the user has not been authenticated, the method returns false.
Parameters:
role - - a String specifying the name of the role
Returns:
a boolean indicating whether the user making this request belongs to a given role; false if the user has not been authenticated

setReason

void setReason(String reason)
If there is reason of authorization result that need to be specified, set it so that caller can use it.
Parameters:
reason -

getReason

String getReason()
Get the reason of authorization result.
Returns:
the reason, null if there is not any.

Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.1

E36938-01


Copyright © 2012 Oracle Corporation. All Rights Reserved.