Homepage

org.talos.impl
Class CategoryContainerImpl

java.lang.Object
  extended by org.talos.impl.AbstractContainer<Category>
      extended by org.talos.impl.CategoryContainerImpl
All Implemented Interfaces:
CategoryContainer, Container<Category>

public class CategoryContainerImpl
extends AbstractContainer<Category>
implements CategoryContainer


Field Summary
 
Fields inherited from class org.talos.impl.AbstractContainer
elements
 
Constructor Summary
CategoryContainerImpl(Category clone, Repository repository)
           
CategoryContainerImpl(Collection<Category> elements, Repository repository)
           
 
Method Summary
 CategoryContainer addObjects(Collection<SecureObject> objNames)
          This method adds Object to the Categories that the container holds.
 CategoryContainer addObjects(String... objNames)
          This method adds Object to the Categories that the container holds.
 Bouncer andSubject(Collection<Subject> subjects)
          This method gives an instance of a Bouncer with all the Categories from this container and all Subjects.
 CategoryBouncer andSubject(String... subjectNames)
          This method gives an instance of a Bouncer with all the Categories from this container and all Subjects with the given names.
 Bouncer andSubjectOr(Collection<Subject> subjects)
          This method gives an instance of a Bouncer with all the Categories from this container and all Subjects.
 CategoryBouncer andSubjectOr(String... subjectNames)
          This method gives an instance of a Bouncer with all the Categories from this container and all Subjects with the given names.
 CategoryContainer cloneAs(String name)
          When this container contains a single element, you can use this method to create a new Category with the same contents as this one.
 Collection<SecureObject> listObjects()
          This method list all SecureObjects from the Category that the container holds.
protected  void remove(Category element)
          Removes an element from the storage permanently.
 CategoryContainer removeObjects(Collection<SecureObject> objNames)
          This method removes SecureObjects from the Category that the container holds.
 CategoryContainer removeObjects(String... objNames)
          This method removes SecureObjects from the Category that the container holds.
 
Methods inherited from class org.talos.impl.AbstractContainer
checkCloneAllowed, contains, containsAll, getElement, getFirstElement, isEmpty, list, remove, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.talos.Container
contains, containsAll, getElement, isEmpty, list, remove, size
 

Constructor Detail

CategoryContainerImpl

public CategoryContainerImpl(Collection<Category> elements,
                             Repository repository)

CategoryContainerImpl

public CategoryContainerImpl(Category clone,
                             Repository repository)
Method Detail

remove

protected void remove(Category element)
Description copied from class: AbstractContainer
Removes an element from the storage permanently.

Specified by:
remove in class AbstractContainer<Category>
Parameters:
element - the element that must be deleted

andSubject

public CategoryBouncer andSubject(String... subjectNames)
                           throws EntityNotFoundException
Description copied from interface: CategoryContainer
This method gives an instance of a Bouncer with all the Categories from this container and all Subjects with the given names.

Specified by:
andSubject in interface CategoryContainer
Parameters:
subjectNames - the names of the Subjects.
Returns:
an instance of a Bouncer
Throws:
EntityNotFoundException - if any given Subject is not found in Talos.

andSubjectOr

public CategoryBouncer andSubjectOr(String... subjectNames)
                             throws EntityNotFoundException
Description copied from interface: CategoryContainer
This method gives an instance of a Bouncer with all the Categories from this container and all Subjects with the given names.

Specified by:
andSubjectOr in interface CategoryContainer
Parameters:
subjectNames - the names of the Subjects.
Returns:
an instance of a Bouncer
Throws:
EntityNotFoundException - if any given Subject is not found in Talos.

addObjects

public CategoryContainer addObjects(String... objNames)
                             throws EntityNotFoundException
Description copied from interface: CategoryContainer
This method adds Object to the Categories that the container holds.

Specified by:
addObjects in interface CategoryContainer
Parameters:
objNames - the names of the SecureObjects to be added
Returns:
this instance
Throws:
EntityNotFoundException - if any of the given Objects is not found in Talos

addObjects

public CategoryContainer addObjects(Collection<SecureObject> objNames)
Description copied from interface: CategoryContainer
This method adds Object to the Categories that the container holds.

Specified by:
addObjects in interface CategoryContainer
Parameters:
objNames - a collection of the SecureObjects to be added
Returns:
this instance

cloneAs

public CategoryContainer cloneAs(String name)
Description copied from interface: CategoryContainer
When this container contains a single element, you can use this method to create a new Category with the same contents as this one. All objects and access rights that are mapped to the original category will be mapped to the new Category.

Specified by:
cloneAs in interface CategoryContainer
Parameters:
name - the name of the new Category.
Returns:
CategoryContainer new CategoryContainer with the new Category.

removeObjects

public CategoryContainer removeObjects(String... objNames)
                                throws EntityNotFoundException
Description copied from interface: CategoryContainer
This method removes SecureObjects from the Category that the container holds.

Specified by:
removeObjects in interface CategoryContainer
Parameters:
objNames - the name of the SecureObjects to be removed
Returns:
this instance
Throws:
EntityNotFoundException - if any of the given SimplePermissions is not found in Talos

removeObjects

public CategoryContainer removeObjects(Collection<SecureObject> objNames)
Description copied from interface: CategoryContainer
This method removes SecureObjects from the Category that the container holds.

Specified by:
removeObjects in interface CategoryContainer
Parameters:
objNames - a collection of the SecureObjects to be removed
Returns:
this instance

listObjects

public Collection<SecureObject> listObjects()
Description copied from interface: CategoryContainer
This method list all SecureObjects from the Category that the container holds.

Specified by:
listObjects in interface CategoryContainer
Returns:
Collection

andSubject

public Bouncer andSubject(Collection<Subject> subjects)
Description copied from interface: CategoryContainer
This method gives an instance of a Bouncer with all the Categories from this container and all Subjects.

Specified by:
andSubject in interface CategoryContainer
Parameters:
subjects - a collection of the Subjects.
Returns:
an instance of a Bouncer

andSubjectOr

public Bouncer andSubjectOr(Collection<Subject> subjects)
Description copied from interface: CategoryContainer
This method gives an instance of a Bouncer with all the Categories from this container and all Subjects.

Specified by:
andSubjectOr in interface CategoryContainer
Parameters:
subjects - a collection of the Subjects.
Returns:
an instance of a Bouncer

Homepage