org.squashtest.tm.domain.library
Interface NodeContainer<NODE extends TreeNode>

Type Parameters:
NODE - Type of contained node
All Superinterfaces:
Identified
All Known Subinterfaces:
Folder<NODE>, Library<NODE>
All Known Implementing Classes:
Campaign, CampaignFolder, CampaignLibrary, GenericLibrary, Iteration, Requirement, RequirementFolder, RequirementLibrary, TestCaseFolder, TestCaseLibrary

public interface NodeContainer<NODE extends TreeNode>
extends Identified

Interface for an object which contains tree node objects.

Author:
Gregory Fouquet

Method Summary
 void accept(NodeContainerVisitor visitor)
           
 void addContent(NODE node)
          Adds new content to this container.
 Set<NODE> getContent()
           
 List<String> getContentNames()
           
 Collection<NODE> getOrderedContent()
          Will return the ordered (if order there is) content nodes.
 GenericProject getProject()
          A node container can be a library.
 boolean hasContent()
           
 boolean isContentNameAvailable(String name)
           
 void removeContent(NODE contentToRemove)
           
 
Methods inherited from interface org.squashtest.tm.domain.Identified
getId
 

Method Detail

addContent

void addContent(NODE node)
                throws DuplicateNameException,
                       org.apache.commons.lang.NullArgumentException
Adds new content to this container. Should refuse to add null content, should refuse to add content with duplicate name.

Parameters:
node -
Throws:
DuplicateNameException
org.apache.commons.lang.NullArgumentException

isContentNameAvailable

boolean isContentNameAvailable(String name)

getContent

Set<NODE> getContent()

getOrderedContent

Collection<NODE> getOrderedContent()
Will return the ordered (if order there is) content nodes.

Returns:

hasContent

boolean hasContent()

removeContent

void removeContent(NODE contentToRemove)
                   throws org.apache.commons.lang.NullArgumentException
Throws:
org.apache.commons.lang.NullArgumentException

getContentNames

List<String> getContentNames()

getProject

GenericProject getProject()
A node container can be a library. That can be bound to a project template.

Returns:

accept

void accept(NodeContainerVisitor visitor)


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