at.ac.tuwien.infosys.sm4all.copal.api.event
Class Authorizations

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.event.Authorizations

public class Authorizations
extends Object

Representation of a list of Authorizations.

Author:
sanjin

Constructor Summary
Authorizations()
           
 
Method Summary
 void add(Authorization authorization)
          Adds specified Authorization.
 boolean contains(String method)
          Returns if an Authorization that has specified name of AuthorizationMethod is currently present in this list.
 Authorization get(String method)
          Returns the Authorization that has specified name of AuthorizationMethod.
 Authorization[] getAll()
          Returns all currently added Authorizations.
 boolean isNotEmpty()
          Returns if there is any added Authorization.
 void remove(String method)
          Removes an Authorization that has specified name of AuthorizationMethod.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Authorizations

public Authorizations()
Method Detail

add

public void add(Authorization authorization)
Adds specified Authorization. If there is already an Authorization with same name of the AuthorizationMethod as specified Authorization, their attributes will be merged with attributes from specified Authorization potentially overwriting ones in already added Authorization.

Parameters:
authorization - the Authorization.

remove

public void remove(String method)
Removes an Authorization that has specified name of AuthorizationMethod.

Parameters:
method - the name of AuthorizationMethod.

get

public Authorization get(String method)
Returns the Authorization that has specified name of AuthorizationMethod. If this list does not have Authorization with specified name AuthorizationMethod, null will be returned.

Parameters:
method - the name of AuthorizationMethod.
Returns:
the Authorization or null if there is no such Authorization.

getAll

public Authorization[] getAll()
Returns all currently added Authorizations.

Returns:
all currently added Authorizations.

contains

public boolean contains(String method)
Returns if an Authorization that has specified name of AuthorizationMethod is currently present in this list. If the Authorization was never added (or was added and consequently removed), false will be returned; otherwise true will be returned.

Parameters:
method - the name of AuthorizationMethod.
Returns:
if an Authorization that has specified name of AuthorizationMethod is currently present in this list.

isNotEmpty

public boolean isNotEmpty()
Returns if there is any added Authorization.

Returns:
if there is any added Authorization.


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