com.continuent.tungsten.common.cluster.resource
Class Resource

java.lang.Object
  extended by com.continuent.tungsten.common.cluster.resource.Resource
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Cluster, ClusterManager, DataServer, DataSource, DataSource, Folder, Monitor, Operation, Process, Queue, RemoteDataService, Replicator, ResourceConfiguration, ResourceManager, ResourceTree, RootResource, SQLRouter

public class Resource
extends java.lang.Object
implements java.io.Serializable

Author:
edward
See Also:
Serialized Form

Field Summary
protected  ResourceType childType
           
protected  java.lang.Boolean compositeMember
           
protected  java.lang.String description
           
protected  boolean isContainer
           
protected  boolean isExecutable
           
protected  java.lang.String name
           
protected  ResourceType type
           
 
Constructor Summary
Resource()
           
Resource(ResourceType type, java.lang.String name)
           
 
Method Summary
 Resource copyTo(Resource destination)
          Copies values from fields of this instance to another instance
 java.lang.String describe(boolean detailed)
          Describe this instance, in detail if necessary.
 ResourceType getChildType()
           
 java.lang.Boolean getCompositeMember()
          Returns the compositeMember value.
 java.lang.String getKey()
           
 java.lang.String getName()
           
 ResourceType getType()
           
 boolean isContainer()
           
 boolean isExecutable()
           
 void setChildType(ResourceType childType)
           
 void setCompositeMember(java.lang.Boolean compositeMember)
          Sets the compositeMember value.
 void setContainer(boolean isContainer)
           
 void setExecutable(boolean isExecutable)
           
 void setName(java.lang.String name)
           
 void setType(ResourceType type)
           
 java.lang.String toJSON()
           
 TungstenProperties toProperties()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

type

protected ResourceType type

description

protected java.lang.String description

isContainer

protected boolean isContainer

isExecutable

protected boolean isExecutable

compositeMember

protected java.lang.Boolean compositeMember

childType

protected ResourceType childType
Constructor Detail

Resource

public Resource()

Resource

public Resource(ResourceType type,
                java.lang.String name)
Method Detail

toProperties

public TungstenProperties toProperties()

describe

public java.lang.String describe(boolean detailed)
Describe this instance, in detail if necessary.

Parameters:
detailed -
Returns:
string description of this resource

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getKey

public java.lang.String getKey()

getName

public java.lang.String getName()
Returns:
the name

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getType

public ResourceType getType()
Returns:
the type

setType

public void setType(ResourceType type)
Parameters:
type - the type to set

isContainer

public boolean isContainer()
Returns:
the isContainerResource

setContainer

public void setContainer(boolean isContainer)
Parameters:
isContainer - the isContainer to set

isExecutable

public boolean isExecutable()
Returns:
the isExecutable

setExecutable

public void setExecutable(boolean isExecutable)
Parameters:
isExecutable - the isExecutable to set

getChildType

public ResourceType getChildType()
Returns:
the childType

setChildType

public void setChildType(ResourceType childType)
Parameters:
childType - the childType to set

getCompositeMember

public java.lang.Boolean getCompositeMember()
Returns the compositeMember value.

Returns:
Returns the compositeMember. True if the resource is part of a higher level Composite DataService

setCompositeMember

public void setCompositeMember(java.lang.Boolean compositeMember)
Sets the compositeMember value.

Parameters:
compositeMember - The compositeMember to set.

copyTo

public Resource copyTo(Resource destination)
Copies values from fields of this instance to another instance

Parameters:
destination -
Returns:
the copied resource

toJSON

public java.lang.String toJSON()
                        throws ResourceException
Throws:
ResourceException