Class AbstractBaseDescription
java.lang.Object
org.springframework.extensions.webscripts.AbstractBaseDescription
- All Implemented Interfaces:
BaseDescription
- Direct Known Subclasses:
AbstractBaseDescriptionDocument,ArgumentTypeDescription,ResourceDescription,TypeDescription
Abstract class for implementation of BaseDescription interface
- Author:
- drq
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorAbstractBaseDescription(String id, String shortName, String description) Constructor with id, shortName and description -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancompareField(String text1, String text2) Utility function for comparing two stringsGets the description of this base descriptiongetId()Gets the id of this base descriptionGets the short name of this base descriptionvoidparse(org.dom4j.Element rootElement) Populates fields from given XML element without validationvoidsetDescription(String description) Sets the service descriptionvoidSets the service idvoidsetShortName(String shortName) Sets the service short namebooleanvalidateRootElement(org.dom4j.Element rootElement, String name) Validate XML root element which will be used for parsing
-
Constructor Details
-
AbstractBaseDescription
Constructor with id, shortName and description- Parameters:
id- StringshortName- Stringdescription- String
-
AbstractBaseDescription
public AbstractBaseDescription()Default constructor
-
-
Method Details
-
setId
Sets the service id- Parameters:
id- String
-
getId
Description copied from interface:BaseDescriptionGets the id of this base description- Specified by:
getIdin interfaceBaseDescription- Returns:
- id
-
setShortName
Sets the service short name- Parameters:
shortName- String
-
setDescription
Sets the service description- Parameters:
description- String
-
getDescription
Description copied from interface:BaseDescriptionGets the description of this base description- Specified by:
getDescriptionin interfaceBaseDescription- Returns:
- description
-
getShortName
Description copied from interface:BaseDescriptionGets the short name of this base description- Specified by:
getShortNamein interfaceBaseDescription- Returns:
- short name
-
validateRootElement
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
Utility function for comparing two strings- Parameters:
text1- Stringtext2- String- Returns:
- true if text2 is same as text1
-