|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.auth.core.impl.PathBasedHolder
public abstract class PathBasedHolder
The PathBasedHolder
provides the basic abstraction for managing
authentication handler and authentication requirements in the
SlingAuthenticator
with the following base functionality:
Comparable
and
odering according to the fullPath
and the
ServiceReference
of the provider serviceequals(Object)
and hashCode()
compatible with
the Comparable
implementation.
Field Summary | |
---|---|
protected String |
fullPath
The full registration path of this instance. |
Constructor Summary | |
---|---|
protected |
PathBasedHolder(String url,
org.osgi.framework.ServiceReference serviceReference)
Sets up this instance with the given configuration URL provided by the given serviceReference . |
Method Summary | |
---|---|
int |
compareTo(PathBasedHolder other)
Compares this instance to the other PathBasedHolder
instance. |
boolean |
equals(Object obj)
Returns true if the other object is the same as this or if
it is an instance of the same class with the same full path and the same
provider (ServiceReference ). |
int |
hashCode()
Returns the hash code of the full path. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String fullPath
Constructor Detail |
---|
protected PathBasedHolder(String url, org.osgi.framework.ServiceReference serviceReference)
serviceReference
.
The serviceReference
may be null
which means
the configuration is created by the SlingAuthenticator
itself.
Instances whose service reference is null
are always ordered
behind instances with non-null
service references (provided
their path is equal.
url
- The configuration URL to setup this instance withserviceReference
- The reference to the service providing the
configuration for this instance.Method Detail |
---|
public final int compareTo(PathBasedHolder other)
other
PathBasedHolder
instance. Comparison takes into account the path
first. If they
are not equal the result is returned: If the other
path is
lexicographically sorted behind this path
a value larger than
zero is returned; otherwise a value smaller than zero is returned.
If the paths are the same, a positive number is returned if the
other
service reference is ordered after this service
reference. If the service reference is the same, zero is returned.
As a special case, zero is returned if other
is the same
object as this.
If this service reference is null
, -1
is always
returned; if the other
service reference is
null
, +1
is returned.
compareTo
in interface Comparable<PathBasedHolder>
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
true
if the other object is the same as this or if
it is an instance of the same class with the same full path and the same
provider (ServiceReference
).
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |