Class Package

java.lang.Object
overit.geocall.platform.Package
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CustomPackage, LangPackage, Layer, ScriptPackage, ThemePackage

public abstract class Package extends Object implements Serializable
This class contains the basic structures to define a package, i.e. a place, within the classpath, with a name and a position.
See Also:
  • Field Details

    • name

      protected final String name
    • alias

      protected String alias
    • position

      protected String position
  • Constructor Details

    • Package

      public Package()
      Creates an unnamed package whose location matches that of the sub-class package.
    • Package

      public Package(String name)
      Creates a named package whose location matches that of the sub-class package.
      Parameters:
      name - string that identifies the package. Null names are not allowed.
  • Method Details

    • getName

      public String getName()
      Returns:
      the package name
    • getAlias

      public String getAlias()
      Returns:
      the alias name
    • setAlias

      protected void setAlias(String alias)
      Sets the alias name
      Parameters:
      alias - The alias name to set.
    • getPosition

      public String getPosition()
      Returns:
      the package position
    • setPosition

      public final void setPosition(String position)
      Set the path that identifies the position of the package. Null names are not allowed. The path directories must be separated with the / character, the string must start without the / character and must end with.
      Parameters:
      position - the package's path. Null value is not allowed.
      Throws:
      InvalidParameterException - if the position refers to a location positioned outside the current class package
    • validatePosition

      protected boolean validatePosition(String position)
      Check that the position refers to an over-package or sub-package with respect to the current class.
      Parameters:
      position - the path of the package to checks
      Returns:
      true if the position is valid respect the current package, false otherwise.
    • invariant

      protected void invariant()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object