public interface ObjectCollectionService
CockpitCollectionService instead. In this service there should be only method specific for the current
cockpit - like filtering collection elements by type, or dealing with ObjectCollection or TypedObject
elements.| Modifier and Type | Method and Description |
|---|---|
void |
addReadUser(PrincipalModel user,
ObjectCollection collection)
Allows given user to read given collection.
|
int |
addToCollection(ObjectCollection collection,
java.util.Collection<TypedObject> elements)
|
void |
addWriteUser(PrincipalModel user,
ObjectCollection collection)
Allows given user to modify given collection.
|
ObjectCollection |
cloneCollection(ObjectCollection collection,
UserModel user)
Clones the given collection and assigns just cloned collection to the given user.
|
ObjectCollection |
createCollection(java.lang.String qualifier,
UserModel user)
Deprecated.
since 6.3, use
ModelService to create items |
ObjectCollection |
createSpecialCollection(java.lang.String qualifier,
UserModel user)
Deprecated.
since 6.3, use
ModelService to create items |
ObjectCollection |
createSpecialCollection(java.lang.String qualifier,
UserModel user,
EnumerationValue collectionType)
Deprecated.
since 6.3, use
ModelService to create items |
ObjectCollection |
createSpecialCollection(java.lang.String qualifier,
UserModel user,
HybrisEnumValue collectionType)
Deprecated.
since 6.3, use
ModelService to create items |
java.util.List<ObjectCollection> |
getCollections(UserModel user)
Deprecated.
since 6.3, use
getCollectionsForUser(UserModel) instead |
java.util.List<ObjectCollection> |
getCollectionsForUser(UserModel user)
Gets all collections for given user including the collections that given user has permission to read or write.
|
int |
getElementCount(ObjectCollection collection)
Gets the number of the elements in the given collection.
|
java.util.List<TypedObject> |
getElements(ObjectCollection collection,
int start,
int count)
Returns elements of the given object collection.
|
java.util.List<PrincipalModel> |
getReadUsers(ObjectCollection collection)
Deprecated.
since 6.3, use
getReadUsersForCollection(ObjectCollection) instead |
java.util.List<PrincipalModel> |
getReadUsersForCollection(ObjectCollection collection)
Returns list of all users who are allowed to read given collection.
|
java.util.List<ObjectCollection> |
getSpecialCollections(UserModel user)
Deprecated.
since 6.3, use
getSpecialCollectionsForUser(UserModel) instead |
java.util.List<ObjectCollection> |
getSpecialCollections(UserModel user,
java.lang.String collectionType)
Gets the special collections of the specified type that belongs to the given user.
|
java.util.List<ObjectCollection> |
getSpecialCollectionsForUser(UserModel user)
Gets the special collections for a given user.
|
java.util.List<PrincipalModel> |
getWriteUsers(ObjectCollection collection)
Deprecated.
since 6.3, use
getWriteUsersForCollection(ObjectCollection) instead |
java.util.List<PrincipalModel> |
getWriteUsersForCollection(ObjectCollection collection)
Returns list of all users who are allowed to modify given collection.
|
java.lang.Boolean |
hasReadCollectionRight(PrincipalModel principal,
ObjectCollection collection)
Returns information whether the user can read collection.
|
java.lang.Boolean |
hasWriteCollectionRight(PrincipalModel principal,
ObjectCollection collection)
Returns information whether the user can modify collection.
|
java.lang.Boolean |
isCollectionOwner(PrincipalModel principal,
ObjectCollection collection)
Deprecated.
since 6.3, use local check when required
|
java.lang.Boolean |
isInCollection(TypedObject object,
ObjectCollection collection)
Checks if the given element belongs to the specified collection.
|
void |
publishCollection(ObjectCollection collection)
Sets the collection's owner to null, so it can be accessed by any user.
|
ObjectCollection |
refreshCollection(ObjectCollection collection)
Deprecated.
since 6.3, use local refreshing if required
|
void |
removeCollection(ObjectCollection collection)
Deprecated.
since 6.3, use
ModelService to remove items |
int |
removeFromCollection(ObjectCollection collection,
java.util.Collection<TypedObject> elements)
|
int |
removeNullItemReferences(ObjectCollection collection)
Removes references to non-existing items
|
void |
removeReadUser(PrincipalModel user,
ObjectCollection collection)
Disallow given user to read given collection.
|
void |
removeWriteUser(PrincipalModel user,
ObjectCollection collection)
Disallow given user to modify given collection.
|
void |
renameCollection(ObjectCollection collection,
java.lang.String label)
Renames the collection with the specified label.
|
@Deprecated ObjectCollection createCollection(java.lang.String qualifier, UserModel user)
ModelService to create itemsqualifier - the qualifieruser - the user that created collection will belong to@Deprecated ObjectCollection createSpecialCollection(java.lang.String qualifier, UserModel user)
ModelService to create itemsqualifier - the qualifieruser - the user that created collection will belong to@Deprecated ObjectCollection createSpecialCollection(java.lang.String qualifier, UserModel user, EnumerationValue collectionType)
ModelService to create itemsqualifier - the qualifieruser - the user that created collection will belong tocollectionType - the collection type (quickcollection, blacklist, clipboard, etc)@Deprecated ObjectCollection createSpecialCollection(java.lang.String qualifier, UserModel user, HybrisEnumValue collectionType)
ModelService to create itemsqualifier - the qualifieruser - the user that created collection will belong tocollectionType - the collection type (quickcollection, blacklist, clipboard, etc)void renameCollection(ObjectCollection collection, java.lang.String label)
collection - the collection to renamelabel - the new collection label@Deprecated void removeCollection(ObjectCollection collection)
ModelService to remove itemscollection - the collection to removeint addToCollection(ObjectCollection collection, java.util.Collection<TypedObject> elements)
collection - the collection to which elements are to be addedelements - the elements to addint removeFromCollection(ObjectCollection collection, java.util.Collection<TypedObject> elements)
collection - the collection from which elements are to be removedelements - the elements to removejava.util.List<TypedObject> getElements(ObjectCollection 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(ObjectCollection collection)
collection - the object collection to search elements ofint getElementCount(ObjectCollection collection)
collection - the collectionvoid publishCollection(ObjectCollection collection)
collection - the collection to publishObjectCollection cloneCollection(ObjectCollection collection, UserModel user)
collection - the collection to cloneuser - the user - clonned collection owner@Deprecated java.util.List<ObjectCollection> getCollections(UserModel user)
getCollectionsForUser(UserModel) insteaduser - the userjava.util.List<ObjectCollection> getCollectionsForUser(UserModel user)
user - the user@Deprecated java.util.List<ObjectCollection> getSpecialCollections(UserModel user)
getSpecialCollectionsForUser(UserModel) insteaduser - the userjava.util.List<ObjectCollection> getSpecialCollectionsForUser(UserModel user)
user - the userjava.util.List<ObjectCollection> getSpecialCollections(UserModel user, java.lang.String collectionType)
user - the usercollectionType - the collection type@Deprecated ObjectCollection refreshCollection(ObjectCollection collection)
collection - given collection@Deprecated java.util.List<PrincipalModel> getReadUsers(ObjectCollection collection)
getReadUsersForCollection(ObjectCollection) insteadcollection - the collection to check read accessjava.util.List<PrincipalModel> getReadUsersForCollection(ObjectCollection collection)
collection - the collection to check read access@Deprecated java.util.List<PrincipalModel> getWriteUsers(ObjectCollection collection)
getWriteUsersForCollection(ObjectCollection) insteadcollection - the collection to check write accessjava.util.List<PrincipalModel> getWriteUsersForCollection(ObjectCollection collection)
collection - the collection to check write accessjava.lang.Boolean hasReadCollectionRight(PrincipalModel principal, ObjectCollection collection)
principal - the requested principalcollection - the requested collectionjava.lang.Boolean hasWriteCollectionRight(PrincipalModel principal, ObjectCollection collection)
principal - the requested principalcollection - the requested collection@Deprecated java.lang.Boolean isCollectionOwner(PrincipalModel principal, ObjectCollection collection)
principal - the principalcollection - the collectionjava.lang.Boolean isInCollection(TypedObject object, ObjectCollection collection)
object - the objectcollection - the collectionvoid addReadUser(PrincipalModel user, ObjectCollection collection)
user - to add read accesscollection - to add read accessvoid addWriteUser(PrincipalModel user, ObjectCollection collection)
user - to add write accesscollection - to add write accessvoid removeReadUser(PrincipalModel user, ObjectCollection collection)
user - to remove read accesscollection - to remove read accessvoid removeWriteUser(PrincipalModel user, ObjectCollection collection)
user - to remove write accesscollection - to remove write accessCopyright © 2018 SAP SE. All Rights Reserved.