org.squashtest.csp.tm.domain.project
Class GenericLibrary<NODE extends LibraryNode>

java.lang.Object
  extended by org.squashtest.csp.tm.domain.project.GenericLibrary<NODE>
Type Parameters:
NODE - The type of nodes this library contains.
All Implemented Interfaces:
Library<NODE>, NodeContainer<NODE>, ProjectResource, SelfClassAware
Direct Known Subclasses:
CampaignLibrary, RequirementLibrary, TestCaseLibrary

public abstract class GenericLibrary<NODE extends LibraryNode>
extends Object
implements Library<NODE>, ProjectResource

Abstract superclass of Library implementations based on generics.

Author:
Gregory Fouquet

Constructor Summary
GenericLibrary()
           
 
Method Summary
 void addContent(NODE contentToAdd)
          Adds new content to this folder.
 void addRootContent(NODE node)
          Adds new content to the root of library.
abstract  Set<NODE> getRootContent()
           
 boolean isContentNameAvailable(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.squashtest.csp.tm.domain.library.Library
getId, hasContent, removeRootContent
 
Methods inherited from interface org.squashtest.csp.tm.domain.project.ProjectResource
getProject, notifyAssociatedWithProject
 
Methods inherited from interface org.squashtest.csp.tm.domain.SelfClassAware
getClassName, getClassSimpleName
 

Constructor Detail

GenericLibrary

public GenericLibrary()
Method Detail

isContentNameAvailable

public boolean isContentNameAvailable(String name)
Specified by:
isContentNameAvailable in interface NodeContainer<NODE extends LibraryNode>

getRootContent

public abstract Set<NODE> getRootContent()
Specified by:
getRootContent in interface Library<NODE extends LibraryNode>

addRootContent

public void addRootContent(NODE node)
Description copied from interface: Library
Adds new content to the root of library. Content must not be null, content must not have the same name as another content.

Specified by:
addRootContent in interface Library<NODE extends LibraryNode>

addContent

public void addContent(NODE contentToAdd)
                throws DuplicateNameException,
                       org.apache.commons.lang.NullArgumentException
Description copied from interface: NodeContainer
Adds new content to this folder. Should refuse to add null content, should refuse to add content with duplicate name.

Specified by:
addContent in interface NodeContainer<NODE extends LibraryNode>
Throws:
DuplicateNameException
org.apache.commons.lang.NullArgumentException


Copyright © 2010-2012 Squashtest TM, Squashtest.org. All Rights Reserved.