org.figure8.join.control.form
Class ResourceForm

java.lang.Object
  extended by org.apache.struts.action.ActionForm
      extended by org.figure8.join.control.JoinForm
          extended by org.figure8.join.control.form.ResourceForm
All Implemented Interfaces:
java.io.Serializable

public class ResourceForm
extends JoinForm

Form object used for manipulating Resources into Join application

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

Field Summary
static java.lang.String[] SUPPORTED_CATEGORIES
          The list of actually supported resource categories
static java.util.Map SUPPORTED_IMPLEMENTATIONS
          The map of actually supported resource implementations (key is the category)
 
Fields inherited from class org.figure8.join.control.JoinForm
errors
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
ResourceForm()
          Creates a new instance of ResourceForm
 
Method Summary
 void doValidate(java.lang.String operation, org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Validation of the form attributes.
 java.lang.String getCategory()
           
 java.util.Date getEndDate()
           
 java.lang.String getLogDirPath()
           
 java.lang.String getLogFilePath()
           
 long getMachineId()
           
 java.lang.String getMachineIdStr()
           
 java.lang.String getName()
           
 java.lang.String getResourceTypeKey()
           
 java.util.Date getStartDate()
           
static java.lang.String[] getSupportedCategories()
          Retrieve the supported resource categories for form validation purpose.
static java.lang.String getSupportedImplementation(java.lang.String category)
          Retrieve the FQN of the Java class representing a valid implementation for a resource category.
 void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Reset form attributes.
 void setCategory(java.lang.String category)
           
 void setEndDateStr(java.lang.String endDateStr)
           
 void setLogDirPath(java.lang.String logDirPath)
           
 void setLogFilePath(java.lang.String logFilePath)
           
 void setMachineId(long machineId)
           
 void setMachineIdStr(java.lang.String machineIdStr)
           
 void setName(java.lang.String name)
           
 void setResourceTypeKey(java.lang.String typeKey)
           
 void setStartDateStr(java.lang.String startDateStr)
           
 void setStartHourStr(java.lang.String startHourStr)
           
 void setStartMinStr(java.lang.String startMinStr)
           
 
Methods inherited from class org.figure8.join.control.JoinForm
addActionError, addActionError, addActionError, getGuiMessageResources, getId, getIdStr, getMessageResources, setId, setIdStr, validate, validateEntityObjectId
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUPPORTED_CATEGORIES

public static final java.lang.String[] SUPPORTED_CATEGORIES
The list of actually supported resource categories


SUPPORTED_IMPLEMENTATIONS

public static java.util.Map SUPPORTED_IMPLEMENTATIONS
The map of actually supported resource implementations (key is the category)

Constructor Detail

ResourceForm

public ResourceForm()
Creates a new instance of ResourceForm

Method Detail

getName

public java.lang.String getName()
Returns:
This resource name (must be unique)

setName

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

getLogDirPath

public java.lang.String getLogDirPath()
Returns:
The path to the log directory of this resource

setLogDirPath

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

getLogFilePath

public java.lang.String getLogFilePath()
Returns:
The path to the current log file of this resource

setLogFilePath

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

getResourceTypeKey

public java.lang.String getResourceTypeKey()
Returns:
he key of this resource type

setResourceTypeKey

public void setResourceTypeKey(java.lang.String typeKey)
Parameters:
typeKey - he key of this resource type

getMachineId

public long getMachineId()
Returns:
The identifier of machine this resource is hosted on

setMachineId

public void setMachineId(long machineId)
Parameters:
machineId - The identifier of machine this resource is hosted on

getCategory

public java.lang.String getCategory()
Returns:
The category of this resource (this determine its persistent implementation)

setCategory

public void setCategory(java.lang.String category)
Parameters:
category - The category of this resource (this determine its persistent implementation)

getMachineIdStr

public java.lang.String getMachineIdStr()
Returns:
The string representation of identifier of machine this resource is hosted on

setMachineIdStr

public void setMachineIdStr(java.lang.String machineIdStr)
Parameters:
machineIdStr - The string representation of identifier of machine this resource is hosted on

getStartDate

public java.util.Date getStartDate()
Returns:
The starting date of changes tracking period

setStartDateStr

public void setStartDateStr(java.lang.String startDateStr)
Parameters:
startDateStr - The String representation of changes tracking period start date (must be a date)

setStartHourStr

public void setStartHourStr(java.lang.String startHourStr)
Parameters:
startHourStr - The String representation of changes tracking period start hour (must be an integer)

setStartMinStr

public void setStartMinStr(java.lang.String startMinStr)
Parameters:
startMinStr - The String representation of changes tracking period start minute (must be an integer)

getEndDate

public java.util.Date getEndDate()
Returns:
The ending date of changes tracking period

setEndDateStr

public void setEndDateStr(java.lang.String endDateStr)
Parameters:
endDateStr - The String representation of changes tracking period start date (must be a date)

getSupportedCategories

public static java.lang.String[] getSupportedCategories()
Retrieve the supported resource categories for form validation purpose. This is a hook that will allow subclasses to override and specifiy their supported resource categories implementations.

Returns:
The current default SUPPORTED_CATEGORIES static variable

getSupportedImplementation

public static java.lang.String getSupportedImplementation(java.lang.String category)
Retrieve the FQN of the Java class representing a valid implementation for a resource category. This is a hook that will allow subclasses to override and specifiy their own categories implementations.

Parameters:
category - The resource category to get implementation for
Returns:
The full name of Java resource implementation or null if none match

doValidate

public void doValidate(java.lang.String operation,
                       org.apache.struts.action.ActionMapping mapping,
                       javax.servlet.http.HttpServletRequest request)
Validation of the form attributes.

Specified by:
doValidate in class JoinForm
Parameters:
operation - String representing the operation to invoke on Action
mapping - Mapping between forwards name and path for this action
request - The servlet container request wrapper

reset

public void reset(org.apache.struts.action.ActionMapping mapping,
                  javax.servlet.http.HttpServletRequest request)
Reset form attributes.

Overrides:
reset in class JoinForm
Parameters:
mapping - Mapping between forwards name and path for this action
request - The servlet container request wrapper


Copyright © 2005-2008 Join. All Rights Reserved.