001 /**
002 *
003 */
004 package de.jw.cloud42.webapp.tree;
005
006 import com.xerox.amazonws.ec2.GroupDescription;
007
008 /**
009 * Represents a tree node holding a GroupDescription object.
010 * Returns a proper toString message.
011 *
012 * @author Frank
013 *
014 */
015 public class GroupTreeNode {
016
017
018
019 /**
020 * The actual GroupDescription.
021 */
022 private GroupDescription groupDescription;
023
024
025
026 /**
027 * Use constructor to pass represented GroupDescription.
028 * @param forGroup
029 */
030 public GroupTreeNode(GroupDescription forGroup){
031 groupDescription = forGroup;
032 }
033
034 public GroupDescription getGroupDescription() {
035 return groupDescription;
036 }
037
038
039 /**
040 * Return group details in format <i>{groupName} ({groupDescription}, owned by {owner})</i>.
041 */
042 public String toString(){
043 return groupDescription.getName() +
044 " (" + groupDescription.getDescription() + ", owned by " +
045 groupDescription.getOwner() + ")";
046 }
047
048
049 }