org.figure8.join.businessobjects.environment
Class AbstractResource

java.lang.Object
  extended by org.figure8.join.core.EntityObject
      extended by org.figure8.join.businessobjects.environment.AbstractResource
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Resource
Direct Known Subclasses:
Gateway, Service, VersionedResource

public abstract class AbstractResource
extends EntityObject
implements Resource

Helper class for implementing persistent Resources.

Version:
$Revision: 1.3 $
Author:
Laurent Broudoux
See Also:
Serialized Form

Constructor Summary
AbstractResource()
          Creates a new instance of AbstractResource
AbstractResource(java.lang.String name, AbstractResourceType resourceType)
          Creates a new instance of AbstractResource with mandatory attribute
 
Method Summary
abstract  java.lang.String getCategory()
          Return the category information on this resource.
 java.util.List getCurrentMappings()
           
 java.lang.String getLogDirPath()
           
 java.lang.String getLogFilePath()
           
 Machine getMachine()
           
 java.lang.String getName()
           
 java.util.List getPhysicalEnvironments()
           
 ResourceType getResourceType()
           
 void setCurrentMappings(java.util.List mappings)
           
 void setLogDirPath(java.lang.String logDirPath)
           
 void setLogFilePath(java.lang.String logFilePath)
           
 void setMachine(Machine machine)
           
 void setName(java.lang.String name)
           
 void setResourceType(AbstractResourceType resourceType)
           
 
Methods inherited from class org.figure8.join.core.EntityObject
clone, equals, getId, hashCode, isTransient
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractResource

public AbstractResource()
Creates a new instance of AbstractResource


AbstractResource

public AbstractResource(java.lang.String name,
                        AbstractResourceType resourceType)
Creates a new instance of AbstractResource with mandatory attribute

Parameters:
name - This resource name (must be unique)
resourceType - The type of the resource to create
Method Detail

setName

public void setName(java.lang.String name)
Parameters:
name - This resource unique name

setLogDirPath

public void setLogDirPath(java.lang.String logDirPath)
Parameters:
logDirPath - The path to directory where this resource stores log files

setLogFilePath

public void setLogFilePath(java.lang.String logFilePath)
Parameters:
logFilePath - The path to the current log file for this resource

setMachine

public void setMachine(Machine machine)
Parameters:
machine - The physical machine hosting this resource

setResourceType

public void setResourceType(AbstractResourceType resourceType)
Parameters:
resourceType - The type of this resource

getCurrentMappings

public java.util.List getCurrentMappings()
Returns:
A list of ResourceMapping objects that are currently valid

setCurrentMappings

public void setCurrentMappings(java.util.List mappings)
Parameters:
mappings - The list of ResourceMapping objects that are currently valid

getCategory

public abstract java.lang.String getCategory()
Return the category information on this resource. Should be implemented in a static way by resource subclasses.

Returns:
The category information as character string

getName

public java.lang.String getName()
Specified by:
getName in interface Resource
Returns:
This resource unique name

getLogDirPath

public java.lang.String getLogDirPath()
Specified by:
getLogDirPath in interface Resource
Returns:
The path to directory where this resource stores log files

getLogFilePath

public java.lang.String getLogFilePath()
Specified by:
getLogFilePath in interface Resource
Returns:
The path to current log file for this resource

getMachine

public Machine getMachine()
Specified by:
getMachine in interface Resource
Returns:
The physical machine hosting this resource (if any)

getResourceType

public ResourceType getResourceType()
Specified by:
getResourceType in interface Resource
Returns:
The type of this resource

getPhysicalEnvironments

public java.util.List getPhysicalEnvironments()
Specified by:
getPhysicalEnvironments in interface Resource
Returns:
The physical environments that are using this resource


Copyright © 2005-2008 Join. All Rights Reserved.