@PublicApi public class GenericItemType extends Object implements StructureItemType<GenericItem>, CreatableItemType, UpdatableItemType, StructureOwnedItemType, DeadItemsCheckingItemType, BulkAccessCheckingItemType
GenericItemType is responsible for generic items support in Structure plugin.
It is used as a reference in structure-item-type module that declares generic item type.
| Modifier and Type | Field and Description |
|---|---|
static long |
NEW_ITEM_ID |
| Constructor and Description |
|---|
GenericItemType(GenericItemService genericItemService,
GenericItemManager genericItemManager,
StructurePluginHelper helper) |
| Modifier and Type | Method and Description |
|---|---|
GenericItem |
accessItem(ItemIdentity itemId)
Does not check for permissions.
|
StructureRow |
createDummyRow(long rowId,
long semantics,
Map<String,Object> values,
ErrorCollection errors) |
ItemIdentity |
createItem(Map<String,Object> values,
ErrorCollection errors) |
void |
filterDead(ItemIdentitySet items,
ItemIdentitySet deadCollector)
Item is considered dead, if the item ID is guaranteed to never be valid again.
|
void |
filterInaccessible(ItemIdentitySet items,
ApplicationUser user,
boolean overrideSecurity,
ItemIdentitySet inaccessibleCollector) |
ItemIdentity |
getOwnedItem(ItemIdentity itemId,
long structureId,
boolean copyIfSame)
Associate an item with a structure, or create a copy of the given item and associate the copy with the structure.
|
void |
init(ModuleDescriptor descriptor) |
boolean |
isVisible(GenericItem item,
ApplicationUser user) |
void |
updateItem(ItemIdentity itemId,
Map<String,Object> values,
ErrorCollection errors) |
public static final long NEW_ITEM_ID
public GenericItemType(GenericItemService genericItemService, GenericItemManager genericItemManager, StructurePluginHelper helper)
@Internal public void init(ModuleDescriptor descriptor)
@Nullable public GenericItem accessItem(@NotNull ItemIdentity itemId)
StructureItemTypeaccessItem in interface StructureItemType<GenericItem>public boolean isVisible(@NotNull
GenericItem item,
@Nullable
ApplicationUser user)
isVisible in interface StructureItemType<GenericItem>public StructureRow createDummyRow(long rowId, long semantics, Map<String,Object> values, ErrorCollection errors) throws StructureException
createDummyRow in interface CreatableItemTypeStructureExceptionpublic ItemIdentity createItem(Map<String,Object> values, ErrorCollection errors) throws StructureException
createItem in interface CreatableItemTypeStructureExceptionpublic void updateItem(ItemIdentity itemId, Map<String,Object> values, ErrorCollection errors) throws StructureException
updateItem in interface UpdatableItemTypeStructureException@NotNull public ItemIdentity getOwnedItem(@NotNull ItemIdentity itemId, long structureId, boolean copyIfSame) throws StructureException
StructureOwnedItemTypegetOwnedItem in interface StructureOwnedItemTypeitemId - The item ID.structureId - The structure ID.copyIfSame - Create a copy of the item even if it is already associated with the given structure.StructureExceptionpublic void filterDead(ItemIdentitySet items, ItemIdentitySet deadCollector)
DeadItemsCheckingItemTypefilterDead in interface DeadItemsCheckingItemTypeitems - items to look up for dead onesdeadCollector - collection to add dead items to.public void filterInaccessible(ItemIdentitySet items, ApplicationUser user, boolean overrideSecurity, ItemIdentitySet inaccessibleCollector)
filterInaccessible in interface BulkAccessCheckingItemTypeCopyright © 2022 ALM Works. All Rights Reserved.