Class AbstractBaseDescription
- java.lang.Object
-
- org.springframework.extensions.webscripts.AbstractBaseDescription
-
- All Implemented Interfaces:
BaseDescription
- Direct Known Subclasses:
AbstractBaseDescriptionDocument,ArgumentTypeDescription,ResourceDescription,TypeDescription
public abstract class AbstractBaseDescription extends java.lang.Object implements BaseDescription
Abstract class for implementation of BaseDescription interface- Author:
- drq
-
-
Constructor Summary
Constructors Constructor Description AbstractBaseDescription()Default constructorAbstractBaseDescription(java.lang.String id, java.lang.String shortName, java.lang.String description)Constructor with id, shortName and description
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancompareField(java.lang.String text1, java.lang.String text2)Utility function for comparing two stringsjava.lang.StringgetDescription()Gets the description of this base descriptionjava.lang.StringgetId()Gets the id of this base descriptionjava.lang.StringgetShortName()Gets the short name of this base descriptionvoidparse(org.dom4j.Element rootElement)Populates fields from given XML element without validationvoidsetDescription(java.lang.String description)Sets the service descriptionvoidsetId(java.lang.String id)Sets the service idvoidsetShortName(java.lang.String shortName)Sets the service short namebooleanvalidateRootElement(org.dom4j.Element rootElement, java.lang.String name)Validate XML root element which will be used for parsing
-
-
-
Constructor Detail
-
AbstractBaseDescription
public AbstractBaseDescription(java.lang.String id, java.lang.String shortName, java.lang.String description)Constructor with id, shortName and description- Parameters:
id- StringshortName- Stringdescription- String
-
AbstractBaseDescription
public AbstractBaseDescription()
Default constructor
-
-
Method Detail
-
setId
public void setId(java.lang.String id)
Sets the service id- Parameters:
id- String
-
getId
public java.lang.String getId()
Description copied from interface:BaseDescriptionGets the id of this base description- Specified by:
getIdin interfaceBaseDescription- Returns:
- id
-
setShortName
public void setShortName(java.lang.String shortName)
Sets the service short name- Parameters:
shortName- String
-
setDescription
public void setDescription(java.lang.String description)
Sets the service description- Parameters:
description- String
-
getDescription
public java.lang.String getDescription()
Description copied from interface:BaseDescriptionGets the description of this base description- Specified by:
getDescriptionin interfaceBaseDescription- Returns:
- description
-
getShortName
public java.lang.String getShortName()
Description copied from interface:BaseDescriptionGets the short name of this base description- Specified by:
getShortNamein interfaceBaseDescription- Returns:
- short name
-
validateRootElement
public boolean validateRootElement(org.dom4j.Element rootElement, java.lang.String name)Validate XML root element which will be used for parsing- Parameters:
rootElement- root elementname- required root element name- Returns:
- true if the root element is valid and the name matches
-
parse
public void parse(org.dom4j.Element rootElement)
Populates fields from given XML element without validation- Parameters:
rootElement- root element for parsing
-
compareField
protected boolean compareField(java.lang.String text1, java.lang.String text2)Utility function for comparing two strings- Parameters:
text1- Stringtext2- String- Returns:
- true if text2 is same as text1
-
-