org.opennms.acl.domain
Class Authority

java.lang.Object
  extended by org.opennms.acl.domain.Authority
All Implemented Interfaces:
Serializable

public class Authority
extends Object
implements Serializable

This entity class represent s an Authority (permission/authority/group/category/other...)

Since:
jdk 1.5.0
Version:
$Id: $
Author:
Massimiliano Dessì (desmax74@yahoo.it)
See Also:
Serialized Form

Constructor Summary
Authority(AuthorityDTO authority, AuthorityService authorityService, AclItemService aclItemService)
          Constructor used by AuthorityFactory
 
Method Summary
 List<?> getAllItems()
          Return a list of all items manageable by authorities
 List<AuthorityDTO> getAuthorities(Pager pager)
          Return a paginated list of anemic authorities
 AuthorityView getAuthorityView()
          Return a read only Autority
 String getDescription()
          Return the human readable description of this Authority
 List<?> getFreeItems()
          getFreeItems
 Integer getId()
          Authority unique identifier
 List<?> getItems()
          Return a list of all items managed by this Authority
 String getName()
          Return the name of the Authority
 boolean hasItems()
          hasItems
 boolean remove()
          Remove this Autority
 void save()
          Save the internal state of the Authority
 void setNewItems(List<?> items)
          Overwrite the items assigned to this Autority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Authority

public Authority(AuthorityDTO authority,
                 AuthorityService authorityService,
                 AclItemService aclItemService)
Constructor used by AuthorityFactory

Parameters:
authority -
authorityService -
authorityService - a AuthorityService object.
aclItemService - a AclItemService object.
Method Detail

getAuthorities

public List<AuthorityDTO> getAuthorities(Pager pager)
Return a paginated list of anemic authorities

Parameters:
pager - a Pager object.
Returns:
a List object.

getAuthorityView

public AuthorityView getAuthorityView()
Return a read only Autority

Returns:
authority

hasItems

public boolean hasItems()

hasItems

Returns:
hasItems

save

public void save()
Save the internal state of the Authority


setNewItems

public void setNewItems(List<?> items)
Overwrite the items assigned to this Autority

Parameters:
items - a List object.

remove

public boolean remove()
Remove this Autority

Returns:
a boolean.

getDescription

public String getDescription()
Return the human readable description of this Authority

Returns:
description

getId

public Integer getId()
Authority unique identifier

Returns:
authority's identifier

getAllItems

public List<?> getAllItems()
Return a list of all items manageable by authorities

Returns:
all items

getFreeItems

public List<?> getFreeItems()

getFreeItems

Returns:
a List object.

getItems

public List<?> getItems()
Return a list of all items managed by this Authority

Returns:
authority items

getName

public String getName()
Return the name of the Authority

Returns:
name


Copyright © 2011. All Rights Reserved.