Search in sources :

Example 1 with EntityOp

use of io.jmix.core.security.EntityOp in project jmix by jmix-framework.

the class AbstractComponentLoader method loadActionConstraint.

protected void loadActionConstraint(Action action, Element element) {
    if (action instanceof Action.HasSecurityConstraint) {
        Action.HasSecurityConstraint itemTrackingAction = (Action.HasSecurityConstraint) action;
        Attribute operationTypeAttribute = element.attribute("constraintEntityOp");
        if (operationTypeAttribute != null) {
            EntityOp operationType = EntityOp.fromId(operationTypeAttribute.getValue());
            itemTrackingAction.setConstraintEntityOp(operationType);
        }
    }
}
Also used : Action(io.jmix.ui.action.Action) ItemTrackingAction(io.jmix.ui.action.ItemTrackingAction) BaseAction(io.jmix.ui.action.BaseAction) Attribute(org.dom4j.Attribute) EntityOp(io.jmix.core.security.EntityOp)

Example 2 with EntityOp

use of io.jmix.core.security.EntityOp in project jmix by jmix-framework.

the class ComponentLoaderHelper method loadActionConstraint.

/*
     * Caution! Copied from io.jmix.ui.xml.layout.loader.AbstractComponentLoader
     */
public static void loadActionConstraint(Action action, Element element) {
    if (action instanceof Action.HasSecurityConstraint) {
        Action.HasSecurityConstraint itemTrackingAction = (Action.HasSecurityConstraint) action;
        Attribute operationTypeAttribute = element.attribute("constraintOperationType");
        if (operationTypeAttribute != null) {
            EntityOp operationType = EntityOp.fromId(operationTypeAttribute.getValue());
            itemTrackingAction.setConstraintEntityOp(operationType);
        }
    }
}
Also used : DeclarativeTrackingAction(com.haulmont.cuba.gui.xml.DeclarativeTrackingAction) Action(io.jmix.ui.action.Action) BaseAction(io.jmix.ui.action.BaseAction) DeclarativeAction(com.haulmont.cuba.gui.xml.DeclarativeAction) Attribute(org.dom4j.Attribute) EntityOp(io.jmix.core.security.EntityOp)

Aggregations

EntityOp (io.jmix.core.security.EntityOp)2 Action (io.jmix.ui.action.Action)2 BaseAction (io.jmix.ui.action.BaseAction)2 Attribute (org.dom4j.Attribute)2 DeclarativeAction (com.haulmont.cuba.gui.xml.DeclarativeAction)1 DeclarativeTrackingAction (com.haulmont.cuba.gui.xml.DeclarativeTrackingAction)1 ItemTrackingAction (io.jmix.ui.action.ItemTrackingAction)1