|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.sword.SWORDContext
public class SWORDContext
This class represents the users who are involved in the deposit or service document request process. This is the authenticated primary user and the potentially null onBehalfOf user. It can then answer various authorisation questions regarding those users.
| Constructor Summary | |
|---|---|
SWORDContext()
|
|
| Method Summary | |
|---|---|
boolean |
canSubmitTo(Context context,
Collection collection)
Can the current SWORD Context permit deposit into the given collection in the given DSpace Context |
Collection[] |
getAllowedCollections(Context context)
Get an array of all the collections that the current SWORD context will allow deposit onto in the given DSpace context |
EPerson |
getAuthenticated()
|
EPerson |
getOnBehalfOf()
|
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(Context context)
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(Group group)
Is the onBehalfOf user a member of the given group or one of its sub groups |
boolean |
isUserAdmin(Context context)
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(Group group)
Is the authenticated user a member of the given group or one of its sub groups? |
void |
setAuthenticated(EPerson authenticated)
|
void |
setOnBehalfOf(EPerson onBehalfOf)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SWORDContext()
| Method Detail |
|---|
public EPerson getAuthenticated()
public void setAuthenticated(EPerson authenticated)
authenticated - the eperson to setpublic EPerson getOnBehalfOf()
public void setOnBehalfOf(EPerson onBehalfOf)
onBehalfOf - the eperson to set
public boolean isUserAdmin(Context context)
throws DSpaceSWORDException
eperson -
SQLException
DSpaceSWORDException
public boolean isOnBehalfOfAdmin(Context context)
throws DSpaceSWORDException
eperson -
SQLException
DSpaceSWORDExceptionpublic boolean isUserInGroup(Group group)
group -
public boolean isOnBehalfOfInGroup(Group group)
group -
public boolean isInGroup(Group group,
EPerson eperson)
group - eperson -
public Collection[] getAllowedCollections(Context context)
throws DSpaceSWORDException
context -
DSpaceSWORDException
public boolean canSubmitTo(Context context,
Collection collection)
throws DSpaceSWORDException
context - collection -
DSpaceSWORDException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||