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.
 boolean equals(Object obj)
          
 Group getGroupByName(String name)
          Deprecated. use WroModelInspector.getGroupByName(String)
 List<String> getGroupNames()
          Deprecated. use WroModelInspector.getGroupNames()
 Collection<String> getGroupNamesContainingResource(String resourceUri)
          Deprecated. use WroModelInspector.getGroupNamesContainingResource(String)
 Collection<Group> getGroups()
           
 int hashCode()
          
 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, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WroModel

public WroModel()
Method Detail

getGroups

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

getGroupNames

@Deprecated
public final List<String> getGroupNames()
Deprecated. use WroModelInspector.getGroupNames()

Returns:
a set of group names.

setGroups

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

getGroupNamesContainingResource

@Deprecated
public Collection<String> getGroupNamesContainingResource(String resourceUri)
Deprecated. use WroModelInspector.getGroupNamesContainingResource(String)

Parameters:
resource - the Resource to search in all available groups.
Returns:
t collection of group names containing provided resource. If the resource is not availalbe, an empty collection will be returned.

getGroupByName

@Deprecated
public Group getGroupByName(String name)
Deprecated. use WroModelInspector.getGroupByName(String)

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.

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2008-2013. All Rights Reserved.