ro.isdc.wro.model
Class WroModel

java.lang.Object
  extended by ro.isdc.wro.model.WroModel

public final class WroModel
extends Object

The resource model encapsulates the information about all existing groups.

Author:
Alex Objelean

Constructor Summary
WroModel()
           
 
Method Summary
 WroModel addGroup(Group group)
          Add a single group to the model.
 Group getGroupByName(String name)
           
 List<String> getGroupNames()
           
 Collection<Group> getGroups()
           
 void merge(WroModel importedModel)
          Merge this model with another model.
 WroModel setGroups(Collection<Group> groups)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WroModel

public WroModel()
Method Detail

getGroups

public final Collection<Group> getGroups()
Returns:
the readonly collection of groups.

getGroupNames

public final List<String> getGroupNames()
Returns:
a set of group names.

setGroups

public final WroModel setGroups(Collection<Group> groups)
Parameters:
groups - the groups to set

getGroupByName

public Group getGroupByName(String name)
Parameters:
name - of group to find.
Returns:
group with searched name.
Throws:
runtime - exception if group is not found.

merge

public void merge(WroModel importedModel)
Merge this model with another model. This is useful for supporting model imports.

Parameters:
importedModel - model to import.

addGroup

public WroModel addGroup(Group group)
Add a single group to the model.

Parameters:
group - a not null Group.

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2008-2011. All Rights Reserved.