public interface PinManager
PinManager
represents a PIN manager which may be used to
access and managed PINs
.
This interface is not intended to be implemented by clients. Instances of
this interface are returned by the
PinManagerFactory.getPinManager(org.apache.sling.api.resource.ResourceResolver)
method.
Modifier and Type | Method and Description |
---|---|
Pin |
createPin(String userId)
Deprecated.
Creates and returns a new PIN for the named user.
|
boolean |
deletePin(String pinId)
Deprecated.
Deletes the
Pin with the given ID. |
Pin |
getPin(String pinId)
Deprecated.
|
Iterator<Pin> |
listPins()
Deprecated.
Returns an iterator of all PINS present in the system.
|
Iterator<Pin> |
listPins(String userId)
Deprecated.
Returns an iterator of
Pin s present in the system belonging to
the given user. |
Pin createPin(String userId)
This method may only be called by the named user or a PIN administrator.
If this method is called by another non-administrator user no PIN is
created and null
is returned.
userId
- The name of the user for which a PIN is to be returned.Pin
or null
if not called by a
PIN administrator or the owner of the new PIN.NullPointerException
- if userId
is null
.Pin getPin(String pinId)
Pin
identified by the given PIN
Id
or null
if no such PIN is defined in the system.
This method will also return the actual existing Pin
if called by
the PIN owner or by a PIN administrator.
pinId
- The identification of the Pin
to return.Pin
or null
.NullPointerException
- if pinId
is null
.Iterator<Pin> listPins()
This method only returns all defined PINs if called by a PIN administrator. For regular users this method only returns the PINs of the user itself.
Iterator<Pin> listPins(String userId)
Pin
s present in the system belonging to
the given user.
This method only returns the Pin
s if called by a PIN
administrator. For regular users this method only returns the PINs of the
user itself. If a regular user requests the PINs of another user, an
empty iterator is returned.
userId
- The name of the user whose Pin
s have to be
returned. This may be null
in which case this
method returns the same as calling the listPins()
method.boolean deletePin(String pinId)
Pin
with the given ID. If this method is not called
by the Pin
owner it must be called by a PIN administrator.
Otherwise this method has no effect. That is non-administrators cannot
delete PINs of other users.
Likewise trying to delete a non-existing PIN has no effect.
pinId
- The identification of the Pin
to delete.true
if the named PIN has been deleted.
false
is returned if not called by the owner or a
PIN administrator or if the PIN does not exist at all.NullPointerException
- if pinId
is null
."Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"