|
SAP NetWeaver 7.11 (EhP1 SP03) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sap.scheduler.runtime.JobDefinition
public final class JobDefinition
This abstract class represents the job meta information for jobs which
have been deployed. Information represented by instances of this class
are taken from the deployment descriptor and the
JobDefinition.xml file. Instances of this class are provided
by the scheduler. Applications cannot change this object in the scheduler.
Note: Although there are a constructor with no arguments and public set methods,
these methods should not be used. This class is designed to be
XML serializable/deserializable. Instances of these class are asumed to be
immutable and once a field is initialized it cannot be changed. An attempt
to invoke the setter for a given attribute would result in an
IllegalStateException.
| Field Summary | |
|---|---|
static int |
DEFAULT_RETENTION_PERIOD
This constant represents the default retention period if no value is specified. |
static int |
INFINITE_RETENTION_PERIOD
This constant represents the value for an infinite retention period. |
| Constructor Summary | |
|---|---|
JobDefinition()
Deprecated. Please use #JobDefinition(JobDefinitionID, JobDefinitionName, String, JobParameterDefinition[], int, int, Date, String[][], Map) |
|
JobDefinition(JobDefinitionID id,
JobDefinitionName name,
String description,
JobParameterDefinition[] parameters,
int retentionPeriod,
int jobDefinitionType,
Date removeDate,
String[][] properties,
HashMap<String,HashMap<String,String>> localizedTextMap)
Creates a new instance of JobDefinition. |
|
JobDefinition(JobDefinitionID id,
String name,
String description,
JobParameterDefinition[] parameters,
int retentionPeriod,
int jobDefinitionType,
Date removeDate,
String[][] properties,
String application,
HashMap<String,HashMap<String,String>> localizedTextMap)
Deprecated. Please use #JobDefinition(JobDefinitionID, JobDefinitionName, String, JobParameterDefinition[], int, int, Date, String[][], Map) |
|
| Method Summary | |
|---|---|
String |
getApplication()
|
String |
getDescription()
Obtains a text description of this job definition |
JobDefinitionID |
getJobDefinitionId()
Obtains the id of this job definition. |
JobDefinitionName |
getJobDefinitionName()
This method returns the JobDefinitionName object which represents
the name of this job definition. |
int |
getJobType()
This method returns an int representing the type of this job. |
HashMap<String,HashMap<String,String>> |
getLocalizationInfoMap()
Returns the localization info for this parameter. |
String |
getLocalizedDescription()
Returns the localized description depending on the current system locale, if not available, the default description deployed with this job will be returned. |
String |
getLocalizedDescription(Locale l)
Returns the localized description depending on the provided locale if available, otherwise the default description deployed with this job will be returned. |
String |
getLocalizedName()
Returns the localized name depending on the current system locale. |
String |
getLocalizedName(Locale l)
Returns the localized name depending on the provided locale if available, otherwise the default name deployed with this job will be returned. |
String |
getName()
Deprecated. Use getJobDefinitionName.getName() instead |
JobParameterDefinition |
getParameter(String name)
This method returns the job parameter definition for the specified parameter. |
JobParameterDefinition[] |
getParameters()
This method returns the array of parameter definitions for this job definition. |
String[][] |
getProperties()
Obtains all properties currently stored in this instance. |
Date |
getRemoveDate()
|
int |
getRetentionPeriod()
Obtains the retention period in days. |
String |
putProperty(String name,
String value)
Puts a property in the list of properties belonging to this instance. |
String |
readProperty(String name)
Queries a property from the current instance. |
void |
setDescription(String description)
Deprecated. - used only for XML Serialization/Deserialization. Instead of using this method use a constructor accipting a description argument. |
void |
setJobDefinitionId(JobDefinitionID id)
Deprecated. - used only for XML Serialization/Deserialization. Instead of using this method use a constructor acceptiong JobDefintionID argument. |
void |
setJobType(int jobDefinitionType)
Deprecated. - used only for XML Serialization/Deserialization. Instead of using this method use a constructor accipting a parameters argument. |
void |
setLocalizationInfoMap(HashMap<String,HashMap<String,String>> localizedTextMap)
Deprecated. use constructor instead |
void |
setName(String name)
Deprecated. - used only for XML Serialization/Deserialization. Instead of using this method use a constructor accepting a JobDefinitionName argument. |
void |
setParameters(JobParameterDefinition[] parameters)
Deprecated. - used only for XML Serialization/Deserialization. Instead of using this method use a constructor accepting a parameters argument. |
void |
setProperties(String[][] properties)
Deprecated. - intended to be used only by XML Seriliazliation/deserialization framework. Instead of this method use the putProperty(String, String) method |
void |
setRetentionPeriod(int days)
Deprecated. - used only for XML Serialization/Deserialization. Instead of using this method use a constructor accepting a parameters argument. |
String |
toString()
Obtains a string representation of this instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int INFINITE_RETENTION_PERIOD
public static final int DEFAULT_RETENTION_PERIOD
| Constructor Detail |
|---|
public JobDefinition(JobDefinitionID id,
String name,
String description,
JobParameterDefinition[] parameters,
int retentionPeriod,
int jobDefinitionType,
Date removeDate,
String[][] properties,
String application,
HashMap<String,HashMap<String,String>> localizedTextMap)
#JobDefinition(JobDefinitionID, JobDefinitionName, String, JobParameterDefinition[], int, int, Date, String[][], Map)
public JobDefinition(JobDefinitionID id,
JobDefinitionName name,
String description,
JobParameterDefinition[] parameters,
int retentionPeriod,
int jobDefinitionType,
Date removeDate,
String[][] properties,
HashMap<String,HashMap<String,String>> localizedTextMap)
id - the id of this job definition object. This parameter cannot be null.name - the name of this job definition. It must not be null.description - description of the job. This could be also null. If description
is null then the job definition is considered to have no description.parameters - an array of job parameter definitions. This parameter must not be null. If a instances
of this job definition takes no parameters than an empty array must be passed.retentionPeriod - the period for which the logs of individual job instance are kept. Afte this period
has expired the logs are removed. Its values are in days measurement units.jobDefinitionType - an integer signifying the job defintion type.
It's values are enumerated by JobDefinitionTyp class.removeDate - the date when the job which is represented by this
metadata has been removed. This can be null if the job is
still deployed.properties - a list of additional properties for this job.localizedTextMap - localization information for this job.
NullPointerException - thrown if id,
name, or parameters is null.
IllegalArgumentException - thrown if the value of
jobDefinitionType does not corresponds to a valid job
definition as defined in JobDefinitionTypepublic JobDefinition()
#JobDefinition(JobDefinitionID, JobDefinitionName, String, JobParameterDefinition[], int, int, Date, String[][], Map)
| Method Detail |
|---|
public void setLocalizationInfoMap(HashMap<String,HashMap<String,String>> localizedTextMap)
the - localization infopublic HashMap<String,HashMap<String,String>> getLocalizationInfoMap()
Note: This method should be used only by the Scheduler runtime.
public String readProperty(String name)
name - - a property name whose value should be found. This parameter can be null.
name. Null if no property with this name is found.
public String putProperty(String name,
String value)
name
equals "EXAMPLENAME" but a property with name "examplename" exists the value will be overriden.
name - name of the property to be put. This cannot be null nor it could be the empty stringvalue - the value of the property.
public String[][] getProperties()
getProperties[2][0] would yield the name of the 3 property and the expression
getProperties[2][1] would yield the value of the 3 property. The lenght of the returned array
could not be used to accurately determine the number of properties currently stored in this instance.
public void setProperties(String[][] properties)
putProperty(String, String) method
IllegalStateException - - thrown if properties field is already initialized.public JobDefinitionID getJobDefinitionId()
IllegalStateException - - if job id is not initializedpublic void setJobDefinitionId(JobDefinitionID id)
id - - the id of this job definitionpublic String getDescription()
public void setDescription(String description)
description - The description to set.public String getName()
getJobDefinitionName.getName() instead
IllegalStateException - - if this instance has not yet been initializedpublic JobDefinitionName getJobDefinitionName()
JobDefinitionName object which represents
the name of this job definition.
public void setName(String name)
JobDefinitionName argument.
name - - the name to set.public JobParameterDefinition[] getParameters()
IllegalStateException - - if this instance has not been initialized yet.public JobParameterDefinition getParameter(String name)
name - name of the parameter
NullPointerException - if name is nullpublic void setParameters(JobParameterDefinition[] parameters)
parameters - The parameters to set.public void setRetentionPeriod(int days)
days - retention period for this jobpublic int getRetentionPeriod()
INFINITE_RETENTION_PERIOD means that instances of this job
definition will not deleted.public int getJobType()
IllegalStateException - - if this instance has not been initialized yet.public String getApplication()
public Date getRemoveDate()
public void setJobType(int jobDefinitionType)
public String toString()
toString in class Objectpublic String getLocalizedName()
public String getLocalizedName(Locale l)
l - the locale
public String getLocalizedDescription()
public String getLocalizedDescription(Locale l)
l - the locale
|
SAP NetWeaver 7.11 (EhP1 SP03) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||