|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.sword.SWORDAuthenticator
public class SWORDAuthenticator
This class offers a thin wrapper for the default DSpace authentication module for the SWORD implementation
| Constructor Summary | |
|---|---|
SWORDAuthenticator()
|
|
| Method Summary | |
|---|---|
SWORDContext |
authenticate(AtomDocumentRequest request)
Authenticate the given atom document request. |
SWORDContext |
authenticate(Deposit deposit)
Authenticate the deposit request. |
SWORDContext |
authenticate(ServiceDocumentRequest request)
Authenticate the given service document request. |
boolean |
authenticates(Context context,
String un,
String pw)
Does the given username and password authenticate for the given DSpace Context? |
boolean |
canSubmit(SWORDService swordService,
Deposit deposit,
DSpaceObject dso)
Can the users contained in this object's member SWORDContext make a successful submission to the selected collection. |
boolean |
canSubmitTo(SWORDContext swordContext,
Collection collection)
Can the current SWORD Context permit deposit into the given collection in the given DSpace Context IF: the authenticated user is an administrator AND: (the on-behalf-of user is an administrator OR the on-behalf-of user is authorised to ADD OR the on-behalf-of user is null) OR IF: the authenticated user is authorised to ADD AND: (the on-behalf-of user is an administrator OR the on-behalf-of user is authorised to ADD OR the on-behalf-of user is null) |
boolean |
canSubmitTo(SWORDContext context,
DSpaceObject dso)
Can the given context submit to the specified dspace object. |
boolean |
canSubmitTo(SWORDContext swordContext,
Item item)
Does the given context have the authority to submit to the given item. |
List<Collection> |
getAllowedCollections(SWORDContext swordContext)
Get an array of all the collections that the current SWORD context will allow deposit onto in the given DSpace context Forwards to: getAllowedCollections(swordContext, null) See that method for details of the conditions applied |
List<Collection> |
getAllowedCollections(SWORDContext swordContext,
Community community)
Get an array of all the collections that the current SWORD context will allow deposit onto in the given DSpace context IF: the authenticated user is an administrator AND: (the on-behalf-of user is an administrator OR the on-behalf-of user is authorised to ADD OR the on-behalf-of user is null) OR IF: the authenticated user is authorised to ADD AND: (the on-behalf-of user is an administrator OR the on-behalf-of user is authorised to ADD OR the on-behalf-of user is null) |
List<Community> |
getAllowedCommunities(SWORDContext swordContext)
Get an array of all the communities that the current SWORD context will allow deposit onto in the given DSpace context The user may submit to a community if the following conditions are met: IF: the authenticated user is an administrator AND: (the on-behalf-of user is an administrator OR the on-behalf-of user is authorised to READ OR the on-behalf-of user is null) OR IF: the authenticated user is authorised to READ AND: (the on-behalf-of user is an administrator OR the on-behalf-of user is authorised to READ OR the on-behalf-of user is null) |
List<Item> |
getAllowedItems(SWORDContext swordContext,
Collection collection)
Get a list of all the items that the current SWORD context will allow deposit onto in the given DSpace context IF: the authenticated user is an administrator AND: (the on-behalf-of user is an administrator OR the on-behalf-of user is authorised to WRITE on the item and ADD on the ORIGINAL bundle OR the on-behalf-of user is null) OR IF: the authenticated user is authorised to WRITE on the item and ADD on the ORIGINAL bundle AND: (the on-behalf-of user is an administrator OR the on-behalf-of user is authorised to WRITE on the item and ADD on the ORIGINAL bundle OR the on-behalf-of user is null) |
List<Community> |
getCommunities(SWORDContext swordContext,
Community community)
Get an array of all the collections that the current SWORD context will allow deposit onto in the given DSpace context The user may submit to a community if the following conditions are met: IF: the authenticated user is an administrator AND: (the on-behalf-of user is an administrator OR the on-behalf-of user is authorised to READ OR the on-behalf-of user is null) OR IF: the authenticated user is authorised to READ AND: (the on-behalf-of user is an administrator OR the on-behalf-of user is authorised to READ OR the on-behalf-of user is null) |
boolean |
isInGroup(Group group,
EPerson eperson)
Is the given eperson in the given group, or any of the groups that are also members of that group. |
boolean |
isOnBehalfOfAdmin(SWORDContext swordContext)
Is the given onBehalfOf user DSpace administrator? This translates as asking the question of whether the given eperson is a member of the special DSpace group Administrator, with id 1 |
boolean |
isOnBehalfOfInGroup(SWORDContext swordContext,
Group group)
Is the onBehalfOf user a member of the given group or one of its sub groups |
boolean |
isUserAdmin(SWORDContext swordContext)
Is the authenticated user a DSpace administrator? This translates as asking the question of whether the given eperson is a member of the special DSpace group Administrator, with id 1 |
boolean |
isUserInGroup(SWORDContext swordContext,
Group group)
Is the authenticated user a member of the given group or one of its sub groups? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SWORDAuthenticator()
| Method Detail |
|---|
public boolean authenticates(Context context,
String un,
String pw)
context - un - pw -
public SWORDContext authenticate(ServiceDocumentRequest request)
throws SWORDException,
SWORDErrorException,
SWORDAuthenticationException
request -
SWORDException
SWORDErrorException
SWORDAuthenticationException
public SWORDContext authenticate(AtomDocumentRequest request)
throws SWORDException,
SWORDErrorException,
SWORDAuthenticationException
request -
SWORDException
SWORDErrorException
SWORDAuthenticationException
public SWORDContext authenticate(Deposit deposit)
throws SWORDException,
SWORDErrorException,
SWORDAuthenticationException
deposit -
SWORDException
SWORDErrorException
SWORDAuthenticationException
public boolean canSubmit(SWORDService swordService,
Deposit deposit,
DSpaceObject dso)
throws DSpaceSWORDException,
SWORDErrorException
DSpaceSWORDException
SWORDErrorException
public boolean isUserAdmin(SWORDContext swordContext)
throws DSpaceSWORDException
swordContext -
SQLException
DSpaceSWORDException
public boolean isOnBehalfOfAdmin(SWORDContext swordContext)
throws DSpaceSWORDException
swordContext -
SQLException
DSpaceSWORDException
public boolean isUserInGroup(SWORDContext swordContext,
Group group)
group -
public boolean isOnBehalfOfInGroup(SWORDContext swordContext,
Group group)
group -
public boolean isInGroup(Group group,
EPerson eperson)
group - eperson -
public List<Community> getAllowedCommunities(SWORDContext swordContext)
throws DSpaceSWORDException
swordContext -
DSpaceSWORDException
public List<Community> getCommunities(SWORDContext swordContext,
Community community)
throws DSpaceSWORDException
community -
DSpaceSWORDException
public List<Collection> getAllowedCollections(SWORDContext swordContext)
throws DSpaceSWORDException
swordContext -
DSpaceSWORDException
public List<Collection> getAllowedCollections(SWORDContext swordContext,
Community community)
throws DSpaceSWORDException
swordContext -
DSpaceSWORDException
public List<Item> getAllowedItems(SWORDContext swordContext,
Collection collection)
throws DSpaceSWORDException
swordContext -
DSpaceSWORDException
public boolean canSubmitTo(SWORDContext swordContext,
Collection collection)
throws DSpaceSWORDException
swordContext - collection -
DSpaceSWORDException
public boolean canSubmitTo(SWORDContext swordContext,
Item item)
throws DSpaceSWORDException
swordContext -
DSpaceSWORDException
public boolean canSubmitTo(SWORDContext context,
DSpaceObject dso)
throws DSpaceSWORDException
context - dso -
DSpaceSWORDException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||