org.opentox.toxotis.util.aa.policy
Interface IPolicyRule

All Known Implementing Classes:
PolicyRule

public interface IPolicyRule

Interface for Policy Rules.

Author:
Pantelis Sopasakis, Charalampos Chomenides

Method Summary
 String getName()
          Name of the rule.
 String getServiceName()
          Name of the service.
 String getTargetUri()
          URI of the resource for which the rule is written.
 boolean isAllowDelete()
          Whether the DELETE method is allowed
 boolean isAllowGet()
          Whether the GET method is allowed
 boolean isAllowPost()
          Whether the POST method is allowed
 boolean isAllowPut()
          Whether the PUT method is allowed
 IPolicyRule setAllowances(boolean get, boolean post, boolean put, boolean delete)
          A method to easily set which HTTP methods are allowed and which not.
 IPolicyRule setAllowDelete(boolean allowDelete)
          Set the access regime for the DELETE method.
 IPolicyRule setAllowGet(boolean allowGet)
          Set the access regime for the GET method.
 IPolicyRule setAllowPost(boolean allowPost)
          Set the access regime for the POST method.
 IPolicyRule setAllowPut(boolean allowPut)
          Set the access regime for the PUT method.
 IPolicyRule setName(String name)
          Specify the name of the rule.
 IPolicyRule setServiceName(String serviceName)
          Setter method for the service name.
 IPolicyRule setTargetUri(String targetUri)
          Setter method for the URI of the target resource.
 

Method Detail

getName

String getName()
Name of the rule.

Returns:
Name of the policy rule as String.

getServiceName

String getServiceName()
Name of the service.

Returns:
Service name as String.

getTargetUri

String getTargetUri()
URI of the resource for which the rule is written.

Returns:
The URI of the target resource as a String.

isAllowDelete

boolean isAllowDelete()
Whether the DELETE method is allowed

Returns:
true if a DELETE is allowed and false otherwise.

isAllowGet

boolean isAllowGet()
Whether the GET method is allowed

Returns:
true if a GET is allowed and false otherwise.

isAllowPost

boolean isAllowPost()
Whether the POST method is allowed

Returns:
true if a POST is allowed and false otherwise.

isAllowPut

boolean isAllowPut()
Whether the PUT method is allowed

Returns:
true if a PUT is allowed and false otherwise.

setAllowDelete

IPolicyRule setAllowDelete(boolean allowDelete)
Set the access regime for the DELETE method.

Parameters:
allowDelete - Whether the DELETE method is allowed
Returns:
The current modifiable policy rule object with updated rule for the DELETE method.

setAllowGet

IPolicyRule setAllowGet(boolean allowGet)
Set the access regime for the GET method.

Parameters:
allowDelete - Whether the GET method is allowed
Returns:
The current modifiable policy rule object with updated rule for the GET method.

setAllowPost

IPolicyRule setAllowPost(boolean allowPost)
Set the access regime for the POST method.

Parameters:
allowDelete - Whether the POST method is allowed
Returns:
The current modifiable policy rule object with updated rule for the POST method.

setAllowPut

IPolicyRule setAllowPut(boolean allowPut)
Set the access regime for the PUT method.

Parameters:
allowDelete - Whether the PUT method is allowed
Returns:
The current modifiable policy rule object with updated rule for the PUT method.

setAllowances

IPolicyRule setAllowances(boolean get,
                          boolean post,
                          boolean put,
                          boolean delete)
A method to easily set which HTTP methods are allowed and which not.

Parameters:
get - Whether GET is allowed.
post - Whether POST is allowed.
put - Whether PUT is allowed.
delete - Whether DELETE is allowed.
Returns:
The current modifiable policy rule object with updated rules per method.

setName

IPolicyRule setName(String name)
Specify the name of the rule.

Parameters:
name - Name of the rule as a String.
Returns:
The current modifiable policy rule object with updated name.

setServiceName

IPolicyRule setServiceName(String serviceName)
Setter method for the service name.

Parameters:
serviceName - The service name as a String.
Returns:
The current modifiable policy rule object with updated service name.

setTargetUri

IPolicyRule setTargetUri(String targetUri)
Setter method for the URI of the target resource.

Parameters:
targetUri - The URI of the resource for which the rule is written.
Returns:
The current modifiable policy rule object with updated target URI.


Copyright © 2011-2012 OpenTox. All Rights Reserved.