Interface GenericItemManager
@PublicApi
public interface GenericItemManager
GenericItemManager is responsible for performing operations with generic items.
Unlike GenericItemService it doesn't operate with validation results, performs minimum checks
and throws StructureException if anything goes wrong.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateItem(String itemType, GenericItem genericItem) voiddeleteItem(ItemIdentity itemId) getItem(ItemIdentity itemId) getOwnedItem(ItemIdentity itemId, long structureId, boolean copyIfSame) booleanisVisible(GenericItem item, ApplicationUser user) voidloadItems(Set<ItemIdentity> itemIds, BiConsumer<ItemIdentity, GenericItem> consumer) voidupdateItem(ItemIdentity itemId, GenericItem genericItem)
-
Method Details
-
createItem
@NotNull ItemIdentity createItem(@NotNull String itemType, @NotNull GenericItem genericItem) throws StructureException - Throws:
StructureException
-
getItem
-
loadItems
void loadItems(@NotNull Set<ItemIdentity> itemIds, @NotNull BiConsumer<ItemIdentity, GenericItem> consumer) -
updateItem
void updateItem(@NotNull ItemIdentity itemId, @NotNull GenericItem genericItem) throws StructureException - Throws:
StructureException
-
deleteItem
- Throws:
StructureException
-
getOwnedItem
@NotNull ItemIdentity getOwnedItem(@NotNull ItemIdentity itemId, long structureId, boolean copyIfSame) throws StructureException - Throws:
StructureException
-
isVisible
-