public class Scope extends EntityIdentifier implements java.lang.Comparable<Scope>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLICATION_SCOPETYPE
Application type is the lowest scope type and child to Environment type
|
static java.lang.String |
ENTERPRISE_SCOPENAME
Enterprise name used for display purpose.
|
static java.lang.String |
ENTERPRISE_SCOPETYPE
Enterprise is the highest scope type and is parent to all
|
static java.lang.String |
ENVIRONMENT_SCOPETYPE
Environment type is parent to all Application type and child to Enterprise type
|
Constructor and Description |
---|
Scope() |
Scope(EntityIdentifier id,
java.lang.String type) |
Scope(long id,
java.lang.String name,
java.lang.String type)
If id is -1 and scopeType is null, it is considered as enterprise scope type.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Scope scope)
Only scopeType is used to compare.
|
java.lang.String |
getName() |
java.lang.String |
getType() |
boolean |
isApplicationScope() |
boolean |
isEnterpriseScope() |
boolean |
isEnvironmentScope() |
void |
setType(java.lang.String scopeType) |
java.lang.String |
toString() |
public static final java.lang.String ENTERPRISE_SCOPETYPE
public static final java.lang.String ENVIRONMENT_SCOPETYPE
public static final java.lang.String APPLICATION_SCOPETYPE
public static final java.lang.String ENTERPRISE_SCOPENAME
public Scope()
public Scope(long id, java.lang.String name, java.lang.String type)
ScopeType can be any one of the following.
id
- name
- scopeType
- java.lang.IllegalArgumentException
- if scopeType is not supported.public Scope(EntityIdentifier id, java.lang.String type)
public java.lang.String getType()
public void setType(java.lang.String scopeType)
scopeType
- the scopeType to setpublic java.lang.String getName()
getName
in class EntityIdentifier
public int compareTo(Scope scope)
Returns 0, even if both scope belongs to two different application scope or two different environment scope.
compareTo
in interface java.lang.Comparable<Scope>
public boolean isEnterpriseScope()
public boolean isEnvironmentScope()
public boolean isApplicationScope()
public java.lang.String toString()
toString
in class EntityIdentifier