public interface CockpitCollectionService
ObjectCollectionService that will be
parametrized with the allowed item types that are valid for collections present in the specific cockpit.| Modifier and Type | Method and Description |
|---|---|
void |
addReadUser(PrincipalModel user,
CockpitObjectAbstractCollectionModel collection)
Allows given user to read given collection.
|
int |
addToCollection(CockpitObjectAbstractCollectionModel collection,
java.util.List<ItemModel> elements)
|
void |
addWriteUser(PrincipalModel user,
CockpitObjectAbstractCollectionModel collection)
Allows given user to modify given collection.
|
CockpitObjectAbstractCollectionModel |
cloneCollection(CockpitObjectAbstractCollectionModel collection,
UserModel user)
Clones the given collection and assigns just cloned collection to the given user.
|
java.util.List<CockpitObjectAbstractCollectionModel> |
getCollectionsForUser(UserModel user)
Gets all collections for given user including the collections that given user has permission to read or write.
|
int |
getElementCount(CockpitObjectAbstractCollectionModel collection)
Gets the element count for the given collection.
|
java.util.List<ItemModel> |
getElements(CockpitObjectAbstractCollectionModel collection,
int start,
int count)
Returns elements of the given object collection.
|
java.util.List<CockpitObjectSpecialCollectionModel> |
getSpecialCollections(UserModel user,
java.lang.String collectionType)
Gets the special collections of the specified type that belongs to the given user.
|
java.util.List<CockpitObjectSpecialCollectionModel> |
getSpecialCollectionsForUser(UserModel user)
Gets the special collections for a given user.
|
boolean |
hasReadCollectionRight(PrincipalModel principal,
CockpitObjectAbstractCollectionModel collection)
Returns information whether the user can read collection.
|
boolean |
hasWriteCollectionRight(PrincipalModel principal,
CockpitObjectAbstractCollectionModel collection)
Returns information whether the user can modify collection.
|
boolean |
isInCollection(ItemModel object,
CockpitObjectAbstractCollectionModel collection)
Checks if the given element belongs to the specified collection.
|
int |
removeFromCollection(CockpitObjectAbstractCollectionModel collection,
java.util.List<ItemModel> elements)
|
int |
removeNullItemReferences(CockpitObjectAbstractCollectionModel collection)
Removes references to non-existing items
|
void |
removeReadUser(PrincipalModel user,
CockpitObjectAbstractCollectionModel collection)
Disallow given user to read given collection.
|
void |
removeWriteUser(PrincipalModel user,
CockpitObjectAbstractCollectionModel collection)
Disallow given user to modify given collection.
|
int addToCollection(CockpitObjectAbstractCollectionModel collection, java.util.List<ItemModel> elements)
collection - the collection to which elements are to be addedelements - the elements to addint removeFromCollection(CockpitObjectAbstractCollectionModel collection, java.util.List<ItemModel> elements)
collection - the collection from which elements are to be removedelements - the elements to removejava.util.List<ItemModel> getElements(CockpitObjectAbstractCollectionModel collection, int start, int count)
collection - the object collection to search elements ofstart - starting index of the searchcount - max. count of elements to be foundint removeNullItemReferences(CockpitObjectAbstractCollectionModel collection)
collection - the object collection to search elements ofint getElementCount(CockpitObjectAbstractCollectionModel collection)
collection - the collectionCockpitObjectAbstractCollectionModel cloneCollection(CockpitObjectAbstractCollectionModel collection, UserModel user)
collection - the collection to cloneuser - the user - clonned collection ownerjava.util.List<CockpitObjectAbstractCollectionModel> getCollectionsForUser(UserModel user)
user - the userjava.util.List<CockpitObjectSpecialCollectionModel> getSpecialCollectionsForUser(UserModel user)
user - the userjava.util.List<CockpitObjectSpecialCollectionModel> getSpecialCollections(UserModel user, java.lang.String collectionType)
user - the usercollectionType - the collection typeboolean hasReadCollectionRight(PrincipalModel principal, CockpitObjectAbstractCollectionModel collection)
principal - the requested principalcollection - the requested collectionboolean hasWriteCollectionRight(PrincipalModel principal, CockpitObjectAbstractCollectionModel collection)
principal - the requested principalcollection - the requested collectionboolean isInCollection(ItemModel object, CockpitObjectAbstractCollectionModel collection)
object - the objectcollection - the collectionvoid addReadUser(PrincipalModel user, CockpitObjectAbstractCollectionModel collection)
user - to add read accesscollection - to add read accessvoid addWriteUser(PrincipalModel user, CockpitObjectAbstractCollectionModel collection)
user - to add write accesscollection - to add write accessvoid removeReadUser(PrincipalModel user, CockpitObjectAbstractCollectionModel collection)
user - to remove read accesscollection - to remove read accessvoid removeWriteUser(PrincipalModel user, CockpitObjectAbstractCollectionModel collection)
user - to remove write accesscollection - to remove write accessCopyright © 2018 SAP SE. All Rights Reserved.