@Component(value="cuba_AttributeSecuritySupport")
public class AttributeSecuritySupport
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Constructor and Description |
---|
AttributeSecuritySupport() |
Modifier and Type | Method and Description |
---|---|
void |
afterCommit(Entity entity)
Should be called after merging an entity and transaction commit.
|
void |
afterLoad(java.util.Collection<? extends Entity> entities)
Should be called after loading a list of entities from the database.
|
void |
afterLoad(Entity entity)
Should be called after loading an entity from the database.
|
void |
afterMerge(Entity entity)
Should be called after merging an entity and before transaction commit.
|
void |
beforeMerge(Entity entity)
Should be called before merging an entity.
|
void |
beforePersist(Entity entity)
Should be called before persisting a new entity.
|
View |
createRestrictedView(View view)
Removes restricted attributes from a view.
|
boolean |
isAttributeAccessEnabled(MetaClass metaClass)
Checks if attribute access enabled for the current entity type.
|
void |
onLoad(java.util.Collection<? extends Entity> entities,
View view) |
void |
onLoad(Entity entity,
View view) |
<T extends Entity> |
setupAttributeAccess(T entity) |
public static final java.lang.String NAME
public View createRestrictedView(View view)
view
- source viewpublic void afterLoad(Entity entity)
entity
- just loaded detached entitypublic void afterLoad(java.util.Collection<? extends Entity> entities)
entities
- list of just loaded detached entitiespublic void beforePersist(Entity entity)
entity
- new entitypublic void beforeMerge(Entity entity)
entity
- detached entitypublic void afterMerge(Entity entity)
entity
- detached entitypublic void afterCommit(Entity entity)
entity
- detached entitypublic <T extends Entity> void setupAttributeAccess(T entity)
public boolean isAttributeAccessEnabled(MetaClass metaClass)
metaClass
- - entity metaClass