at.ac.tuwien.infosys.sm4all.copal.api.security
Class Authorization

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.security.Authorization

public class Authorization
extends java.lang.Object

Representation of a single authorization request of a ContextEvent.

Author:
sanjin

Constructor Summary
Authorization(java.lang.String method, Attribute... attributes)
          Create instance of Authorization with specified name of AuthorizationMethod that should handle this Authorization and specified Attributes to authorize.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares this Authorization to the specified Object.
 Attribute[] getAttributes()
          Returns the additional Attributes for AuthorizationMethod .
 java.lang.String getMethod()
          Returns the name of AuthorizationMethod that should handle this Authorization.
 int hashCode()
          Returns hash code for this Authorization.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Authorization

public Authorization(java.lang.String method,
                     Attribute... attributes)
Create instance of Authorization with specified name of AuthorizationMethod that should handle this Authorization and specified Attributes to authorize.

Parameters:
method - the name of AuthorizationMethod that should handle this Authorization
attributes - the Attributes for AuthorizationMethod.
Throws:
java.lang.NullPointerException - if specified name of AuthorizationMethod or Attributes is null.
java.lang.IllegalArgumentException - if specified name of AuthorizationMethod is an empty or blank string or if specified array of Attributes is empty.
Method Detail

getMethod

public java.lang.String getMethod()
Returns the name of AuthorizationMethod that should handle this Authorization.

Returns:
the name of AuthorizationMethod that should handle this Authorization.

getAttributes

public Attribute[] getAttributes()
Returns the additional Attributes for AuthorizationMethod .

Returns:
the additional Attributes for AuthorizationMethod .

hashCode

public int hashCode()
Returns hash code for this Authorization. The hash code for an Authorization object is hash code of its getMethod().

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this Authorization.

equals

public boolean equals(java.lang.Object obj)
Compares this Authorization to the specified Object. The result is true if and only if the argument is not null and is an Authorization object that has same name of the AuthorizationMethod as this Authorization.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the Object to compare this Authorization against.
Returns:
true if Authorizations are equal; false otherwise.


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.