|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.repository.RepositoryManager
public class RepositoryManager
Initial Date: Mar 31, 2004
| Field Summary | |
|---|---|
static java.lang.String |
SEND_DELETE_EMAIL_ACTION
|
| Method Summary | |
|---|---|
void |
addOwners(Identity ureqIdentity,
IdentitiesAddEvent iae,
RepositoryEntry re)
add provided list of identities as owners to the repo entry. |
int |
countByTypeLimitAccess(java.lang.String restrictedType,
int restrictedAccess)
Count by type, limit by role accessability. |
RepositoryEntry |
createRepositoryEntryInstance(java.lang.String initialAuthor)
|
RepositoryEntry |
createRepositoryEntryInstance(java.lang.String initialAuthor,
java.lang.String resourceName,
java.lang.String description)
|
RepositoryEntryStatus |
createRepositoryEntryStatus(int repositoryEntryStatusCode)
|
void |
deleteRepositoryEntry(RepositoryEntry re)
Delete repo entry. |
java.util.List |
genericANDQueryWithRolesRestriction(java.lang.String displayName,
java.lang.String author,
java.lang.String desc,
java.util.List resourceTypes,
Roles roles,
java.lang.String institution)
Query repository If any input data contains "*", then it replaced by "%" (search me*er -> sql: me%er). |
static RepositoryManager |
getInstance()
|
java.util.List<RepositoryEntry> |
getLearningResourcesAsStudent(Identity identity)
Gets all learning resources where the user is in a learning group as participant. |
java.util.List<RepositoryEntry> |
getLearningResourcesAsTeacher(Identity identity)
Gets all learning resources where the user is coach of a learning group or where he is in the repo entry owner group (course administrator) |
void |
incrementDownloadCounter(RepositoryEntry re)
Increment the download counter. |
void |
incrementLaunchCounter(RepositoryEntry re)
Increment the launch counter. |
boolean |
isAllowedToLaunch(Identity identity,
Roles roles,
RepositoryEntry re)
Test a repo entry if identity is allowed to launch. |
boolean |
isAllowedToLaunch(UserRequest ureq,
RepositoryEntry re)
Test a repo entry if identity is allowed to launch. |
boolean |
isInstitutionalRessourceManagerFor(RepositoryEntry repositoryEntry,
Identity identity)
has one owner of repository entry the same institution like the resource manager |
boolean |
isOwnerOfRepositoryEntry(Identity identity,
RepositoryEntry entry)
check ownership of identiy for a resource |
java.lang.String |
lookupDisplayNameByOLATResourceableId(java.lang.Long resId)
Convenience method to access the repositoryEntry displayname by the referenced OLATResourceable id. |
RepositoryEntry |
lookupRepositoryEntry(java.lang.Long key)
Lookup repo entry by key. |
RepositoryEntry |
lookupRepositoryEntry(OLATResourceable resourceable,
boolean strict)
Lookup the repository entry which references the given olat resourceable. |
RepositoryEntry |
lookupRepositoryEntryBySoftkey(java.lang.String softkey,
boolean strict)
Lookup a repository entry by its softkey. |
java.util.List |
queryByInitialAuthor(java.lang.String initialAuthor)
Query by initial-author |
java.util.List |
queryByOwner(Identity identity,
java.lang.String limitType)
Query by ownership, optionally limit by type. |
java.util.List |
queryByOwner(Identity identity,
java.lang.String[] limitTypes)
|
java.util.List |
queryByOwnerLimitAccess(Identity identity,
int limitAccess)
Query by ownership, limit by access. |
java.util.List |
queryByType(java.lang.String restrictedType)
Query by type without any other limitations |
java.util.List |
queryByTypeLimitAccess(java.lang.String restrictedType,
Roles roles)
Query by type, limit by ownership or role accessability. |
java.util.List |
queryByTypeLimitAccess(java.lang.String restrictedType,
UserRequest ureq)
Query by type, limit by ownership or role accessability. |
java.util.List |
queryReferencableResourcesLimitType(Identity identity,
Roles roles,
java.util.List resourceTypes,
java.lang.String displayName,
java.lang.String author,
java.lang.String desc)
Search for resources that can be referenced by an author. |
void |
removeOwners(Identity ureqIdentity,
java.util.List<Identity> removeIdentities,
RepositoryEntry re)
remove list of identities as owners of given repository entry. |
void |
saveRepositoryEntry(RepositoryEntry re)
Save repo entry. |
void |
setAccess(RepositoryEntry re,
int access)
|
void |
setDescriptionAndName(RepositoryEntry re,
java.lang.String displayName,
java.lang.String description)
|
static void |
setLastUsageNowFor(RepositoryEntry re)
Set last-usage date to to now for certain repository-entry. |
void |
setProperties(RepositoryEntry re,
boolean canCopy,
boolean canReference,
boolean canLaunch,
boolean canDownload)
|
void |
updateRepositoryEntry(RepositoryEntry re)
Update repo entry. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SEND_DELETE_EMAIL_ACTION
| Method Detail |
|---|
public static RepositoryManager getInstance()
public RepositoryEntry createRepositoryEntryInstance(java.lang.String initialAuthor)
initialAuthor -
public RepositoryEntry createRepositoryEntryInstance(java.lang.String initialAuthor,
java.lang.String resourceName,
java.lang.String description)
initialAuthor - resourceName - description -
public RepositoryEntryStatus createRepositoryEntryStatus(int repositoryEntryStatusCode)
repositoryEntryStatusCode - public void saveRepositoryEntry(RepositoryEntry re)
re - public void updateRepositoryEntry(RepositoryEntry re)
re - public void deleteRepositoryEntry(RepositoryEntry re)
re - public RepositoryEntry lookupRepositoryEntry(java.lang.Long key)
the - repository entry key (not the olatresourceable key)
public RepositoryEntry lookupRepositoryEntry(OLATResourceable resourceable,
boolean strict)
resourceable - strict - true: throws exception if not found, false: returns null if not found
AssertException - if the softkey could not be found (strict=true)
public RepositoryEntry lookupRepositoryEntryBySoftkey(java.lang.String softkey,
boolean strict)
softkey - strict - true: throws exception if not found, false: returns null if not found
AssertException - if the softkey could not be found (strict=true)public java.lang.String lookupDisplayNameByOLATResourceableId(java.lang.Long resId)
resId -
public boolean isAllowedToLaunch(UserRequest ureq,
RepositoryEntry re)
ureq - re -
public boolean isAllowedToLaunch(Identity identity,
Roles roles,
RepositoryEntry re)
identity - roles - re -
public void incrementLaunchCounter(RepositoryEntry re)
re - public void incrementDownloadCounter(RepositoryEntry re)
re - public static void setLastUsageNowFor(RepositoryEntry re)
-
public void setAccess(RepositoryEntry re,
int access)
public void setDescriptionAndName(RepositoryEntry re,
java.lang.String displayName,
java.lang.String description)
public void setProperties(RepositoryEntry re,
boolean canCopy,
boolean canReference,
boolean canLaunch,
boolean canDownload)
public int countByTypeLimitAccess(java.lang.String restrictedType,
int restrictedAccess)
restrictedType - roles -
public java.util.List queryByType(java.lang.String restrictedType)
restrictedType - roles -
public java.util.List queryByTypeLimitAccess(java.lang.String restrictedType,
Roles roles)
restrictedType - roles -
public java.util.List queryByTypeLimitAccess(java.lang.String restrictedType,
UserRequest ureq)
restrictedType - roles -
public java.util.List queryByOwner(Identity identity,
java.lang.String limitType)
identity - limitType -
public java.util.List queryByOwner(Identity identity,
java.lang.String[] limitTypes)
public java.util.List queryByInitialAuthor(java.lang.String initialAuthor)
restrictedType - roles -
public java.util.List queryReferencableResourcesLimitType(Identity identity,
Roles roles,
java.util.List resourceTypes,
java.lang.String displayName,
java.lang.String author,
java.lang.String desc)
identity - The user initiating the queryroles - The current users role setresourceTypes - Limit search result to this list of repo types. Can be NULLdisplayName - Limit search to this repo title. Can be NULLauthor - Limit search to this user (Name, firstname, loginname). Can be NULLdesc - Limit search to description. Can be NULL
public java.util.List queryByOwnerLimitAccess(Identity identity,
int limitAccess)
identity - limitAccess -
public boolean isOwnerOfRepositoryEntry(Identity identity,
RepositoryEntry entry)
public java.util.List genericANDQueryWithRolesRestriction(java.lang.String displayName,
java.lang.String author,
java.lang.String desc,
java.util.List resourceTypes,
Roles roles,
java.lang.String institution)
ureq - displayName - null -> no restrictionauthor - null -> no restrictiondesc - null -> no restrictionresourceTypes - NOTE: for null -> no restriction, or a list of resourceTypeNamesroles - The calling user's rolesinstitution - null -> no restriction
public void addOwners(Identity ureqIdentity,
IdentitiesAddEvent iae,
RepositoryEntry re)
ureqIdentity - addIdentities - re - userActivityLogger -
public void removeOwners(Identity ureqIdentity,
java.util.List<Identity> removeIdentities,
RepositoryEntry re)
ureqIdentity - removeIdentities - re - logger -
public boolean isInstitutionalRessourceManagerFor(RepositoryEntry repositoryEntry,
Identity identity)
RepositoryEntry - repositoryEntryIdentity - identitypublic java.util.List<RepositoryEntry> getLearningResourcesAsStudent(Identity identity)
identity -
public java.util.List<RepositoryEntry> getLearningResourcesAsTeacher(Identity identity)
identity -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||