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 Object implements BaseDescription
Abstract class for implementation of BaseDescription interface
Author:
drq
  • Constructor Details

    • AbstractBaseDescription

      public AbstractBaseDescription(String id, String shortName, String description)
      Constructor with id, shortName and description
      Parameters:
      id - String
      shortName - String
      description - String
    • AbstractBaseDescription

      public AbstractBaseDescription()
      Default constructor
  • Method Details

    • setId

      public void setId(String id)
      Sets the service id
      Parameters:
      id - String
    • getId

      public String getId()
      Description copied from interface: BaseDescription
      Gets the id of this base description
      Specified by:
      getId in interface BaseDescription
      Returns:
      id
    • setShortName

      public void setShortName(String shortName)
      Sets the service short name
      Parameters:
      shortName - String
    • setDescription

      public void setDescription(String description)
      Sets the service description
      Parameters:
      description - String
    • getDescription

      public String getDescription()
      Description copied from interface: BaseDescription
      Gets the description of this base description
      Specified by:
      getDescription in interface BaseDescription
      Returns:
      description
    • getShortName

      public String getShortName()
      Description copied from interface: BaseDescription
      Gets the short name of this base description
      Specified by:
      getShortName in interface BaseDescription
      Returns:
      short name
    • validateRootElement

      public boolean validateRootElement(org.dom4j.Element rootElement, String name)
      Validate XML root element which will be used for parsing
      Parameters:
      rootElement - root element
      name - 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(String text1, String text2)
      Utility function for comparing two strings
      Parameters:
      text1 - String
      text2 - String
      Returns:
      true if text2 is same as text1