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:
org.squashtest.csp.core.domain.Identified, AttachmentHolder, Library<NODE>, NodeContainer<NODE>, ProjectResource<GenericProject>, SelfClassAware
Direct Known Subclasses:
CampaignLibrary, RequirementLibrary, TestCaseLibrary

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

Abstract superclass of Library implementations based on generics.

Author:
Gregory Fouquet

Constructor Summary
GenericLibrary()
           
 
Method Summary
 void addContent(NODE node)
          Adds new content to this container.
 List<String> getContentNames()
           
 Library<?> getLibrary()
           
 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.project.ProjectResource
getProject, notifyAssociatedWithProject
 
Methods inherited from interface org.squashtest.csp.tm.domain.SelfClassAware
getClassName, getClassSimpleName
 
Methods inherited from interface org.squashtest.csp.tm.domain.library.NodeContainer
getContent, hasContent, removeContent
 
Methods inherited from interface org.squashtest.csp.core.domain.Identified
getId
 
Methods inherited from interface org.squashtest.csp.tm.domain.attachment.AttachmentHolder
getAttachmentList
 

Constructor Detail

GenericLibrary

public GenericLibrary()
Method Detail

isContentNameAvailable

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

addContent

public void addContent(@NotNull
                       NODE node)
                throws UnsupportedOperationException
Description copied from interface: NodeContainer
Adds new content to this container. Should refuse to add null content, should refuse to add content with duplicate name.

Specified by:
addContent in interface NodeContainer<NODE extends LibraryNode>
Throws:
UnsupportedOperationException - when trying to add a node to a project template.

getLibrary

public Library<?> getLibrary()
Specified by:
getLibrary in interface ProjectResource<GenericProject>

getContentNames

public List<String> getContentNames()
Specified by:
getContentNames in interface NodeContainer<NODE extends LibraryNode>


Copyright © 2010-2012 Henix, henix.fr. All Rights Reserved.