Class Tag
- java.lang.Object
-
- org.glassfish.admingui.common.handlers.Tag
-
- All Implemented Interfaces:
Serializable
public class Tag extends Object implements Serializable
Tag Class.
- Author:
- Ken Paulsen ([email protected])
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUser(String name)
Allows an additional user to be added as a Tag creator.boolean
containsUser(String name)
Checks to see if the given user is an owner of this Tag.boolean
equals(Object obj)
This implementation of equals only checks the tagName and the tagViewId for equality.String
getDisplayName()
This returns aString
that is meaningful to the user which represents the content of thisTag
instance.String
getTagName()
This provides access to the tag name.String
getTagViewId()
This provides access to the TagViewId value.List<String>
getUsers()
Provides access to all the users that have created this Tag.int
hashCode()
List<String>
removeUser(String name)
This method ensures the specifieduser
is removed from the list of users for thisTag
.String
toString()
String representation of this Tag.
-
-
-
Method Detail
-
addUser
public void addUser(String name)
Allows an additional user to be added as a Tag creator.
-
getUsers
public List<String> getUsers()
Provides access to all the users that have created this Tag. This may be null.
-
containsUser
public boolean containsUser(String name)
Checks to see if the given user is an owner of this Tag.
-
removeUser
public List<String> removeUser(String name)
This method ensures the specified
user
is removed from the list of users for thisTag
.While a
Tag
is of little or no use when 0 users own theTag
, it is not the responsibility of this method to remove theTag
if this state occurs as a result of a call to this method.- Returns:
- The
List
of users remaining after removing this user, ornull
if none.
-
equals
public boolean equals(Object obj)
This implementation of equals only checks the tagName and the tagViewId for equality. This means 2 tags with different user Lists are still considered equal. The Display Name is also of no importance to this implementation of equality.
-
toString
public String toString()
String representation of this Tag.
-
getTagName
public String getTagName()
This provides access to the tag name.
-
getTagViewId
public String getTagViewId()
This provides access to the TagViewId value.
-
getDisplayName
public String getDisplayName()
This returns a
String
that is meaningful to the user which represents the content of thisTag
instance.
-
-