Package overit.geocall.platform
Class Package
java.lang.Object
overit.geocall.platform.Package
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CustomPackage,LangPackage,Layer,ScriptPackage,ThemePackage
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAlias()getName()inthashCode()protected voidprotected voidSets the alias namefinal voidsetPosition(String position) Set the path that identifies the position of the package.protected booleanvalidatePosition(String position) Check that the position refers to an over-package or sub-package with respect to the current class.
-
Field Details
-
name
-
alias
-
position
-
-
Constructor Details
-
Package
public Package()Creates an unnamed package whose location matches that of the sub-class package. -
Package
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
- Returns:
- the package name
-
getAlias
- Returns:
- the alias name
-
setAlias
Sets the alias name- Parameters:
alias- The alias name to set.
-
getPosition
- Returns:
- the package position
-
setPosition
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
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:
trueif the position is valid respect the current package,falseotherwise.
-
invariant
protected void invariant() -
equals
-
hashCode
public int hashCode()
-