Package com.sas.services.information
Class RepositoryGroup
java.lang.Object
com.sas.services.information.RepositoryGroup
- All Implemented Interfaces:
ConsumedResourceInterface,Serializable,Cloneable
public class RepositoryGroup
extends Object
implements Cloneable, ConsumedResourceInterface, Serializable
Repository group.
- Since:
- 1.1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.RepositoryGroup(String name) Constructor with name.RepositoryGroup(String name, String description) Constructor with name.RepositoryGroup(String uid, String name, String description, List<String> group) Create a new group with the name a List of repository names.RepositoryGroup(String name, List<String> group) Create a new group with the name a List of repository names. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRepository(String name) Add a repository definition name to the list for this group.Objectclone()Clones this RepositoryGroup.copyTo(String name) Make a writable copy of this group with a new name.booleanequals(Object o) Determines if the object is equal to this repository group.StringGet the description for this group.List<String> Get a copy of the list of repository definition names for this group.StringGets a localized message which describes the repository group type.StringGets a localized message which describes the repository group's type and value.StringgetName()Get the name of this group.StringGets the unique ID.StringGets the consumed resource type for an Information Service repository group.intGets the consumed resource code for an Information Service repository group.StringGets the value of the repository group's name.inthashCode()Gets the hash code.booleanDetermines whether this resource is required by the Information Service's configuration.voidremoveRepository(String name) Remove a repository definition name from this group.voidsetDescription(String description) Set the description for this group.voidsetName(String name) Set the name of this group.voidSet this group to be protected.StringtoString()Gets a string representing this repository group composed of its name and description.Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
RepositoryGroup
public RepositoryGroup()Default constructor. -
RepositoryGroup
public RepositoryGroup(String name) Constructor with name. A new repository group is created with the given name.- Parameters:
name- The name of the new group.
-
RepositoryGroup
public RepositoryGroup(String name, String description) Constructor with name. A new repository group is created with the given name.- Parameters:
name- The name of the new group.description- A string describing this group's use.
-
RepositoryGroup
public RepositoryGroup(String name, List<String> group) Create a new group with the name a List of repository names.- Parameters:
name- The group name.group- A List of repository names as Strings.
-
RepositoryGroup
public RepositoryGroup(String uid, String name, String description, List<String> group) Create a new group with the name a List of repository names.- Parameters:
uid- Unique identifier.name- The group's name.description- A string describing this group's use.group- A List ofStringrepository names ornull.
-
-
Method Details
-
setDescription
public void setDescription(String description) Set the description for this group.- Parameters:
description- A string describing this group's use.
-
getDescription
public String getDescription()Get the description for this group.- Returns:
- A String describing this group's use.
-
getResourceID
public String getResourceID()Gets the unique ID.- Specified by:
getResourceIDin interfaceConsumedResourceInterface- Returns:
- Unique ID.
-
getResourceValue
public String getResourceValue()Gets the value of the repository group's name.- Specified by:
getResourceValuein interfaceConsumedResourceInterface- Returns:
- Repository group's name.
-
getLocalizedResourceType
public String getLocalizedResourceType()Gets a localized message which describes the repository group type.- Specified by:
getLocalizedResourceTypein interfaceConsumedResourceInterface- Returns:
- Localized message which describes the repository group type.
-
getLocalizedResourceTypeAndValue
public String getLocalizedResourceTypeAndValue()Gets a localized message which describes the repository group's type and value.- Specified by:
getLocalizedResourceTypeAndValuein interfaceConsumedResourceInterface- Returns:
- Localized message which describes the repository group's type and name.
-
getResourceType
public String getResourceType()Gets the consumed resource type for an Information Service repository group.- Specified by:
getResourceTypein interfaceConsumedResourceInterface- Returns:
- Consumed resource type for an Information Service repository group.
-
getResourceTypeCode
public int getResourceTypeCode()Gets the consumed resource code for an Information Service repository group.- Specified by:
getResourceTypeCodein interfaceConsumedResourceInterface- Returns:
- Consumed resource type code "4" for a repository group.
-
isRequired
public boolean isRequired()Determines whether this resource is required by the Information Service's configuration.- Specified by:
isRequiredin interfaceConsumedResourceInterface- Returns:
false
-
addRepository
public void addRepository(String name) Add a repository definition name to the list for this group.- Parameters:
name- The repository definition name to add to this group.- Throws:
IllegalStateException- if this group has been set to protected.
-
removeRepository
public void removeRepository(String name) Remove a repository definition name from this group.- Parameters:
name- the repository definition name to remove from this group.- Throws:
IllegalStateException- if this group has been set to protected.
-
getGroupNames
public List<String> getGroupNames()Get a copy of the list of repository definition names for this group.- Returns:
- A List of String objects with repository definition names.
-
getName
public String getName()Get the name of this group.- Returns:
- The group name.
-
setName
public void setName(String name) Set the name of this group.- Parameters:
name- The new name of this group.- Throws:
IllegalStateException- if this group has been set to protected.
-
setProtected
public void setProtected()Set this group to be protected. Attempts to change it after this call is made will result in an IllegalStateException. -
copyTo
Make a writable copy of this group with a new name.- Parameters:
name- The name of the new group.- Returns:
- The new group.
-
toString
public String toString()Gets a string representing this repository group composed of its name and description.- Overrides:
toStringin classObject- Returns:
- Repository group's name and description.
-
clone
public Object clone() throws CloneNotSupportedExceptionClones this RepositoryGroup.- Specified by:
clonein interfaceConsumedResourceInterface- Overrides:
clonein classObject- Returns:
- Clone of this RepositoryGroup.
- Throws:
CloneNotSupportedException- if cloning is not supported.
-
equals
public boolean equals(Object o) Determines if the object is equal to this repository group.- Overrides:
equalsin classObject- Parameters:
o- TheRepositoryGroupto be compared to this instance.- Returns:
trueif the object is equal orfalseotherwise.
-
hashCode
public int hashCode()Gets the hash code.- Overrides:
hashCodein classObject- Returns:
- Hash code.
-