Search in sources :

Example 1 with Action

use of org.asqatasun.webapp.action.Action in project Asqatasun by Asqatasun.

the class ContractActionHandlerImpl method getActionList.

@Override
public synchronized List<Action> getActionList(Object object) {
    if (!(object instanceof Contract)) {
        return null;
    }
    List<Action> userContractActionList = getActionList();
    Collection<Functionality> functionalitySet = ((Contract) object).getFunctionalitySet();
    for (Action action : userContractActionList) {
        activateAction(action, functionalitySet);
    }
    return userContractActionList;
}
Also used : Action(org.asqatasun.webapp.action.Action) Functionality(org.asqatasun.webapp.entity.functionality.Functionality) Contract(org.asqatasun.webapp.entity.contract.Contract)

Example 2 with Action

use of org.asqatasun.webapp.action.Action in project Asqatasun by Asqatasun.

the class ActionBuilderImpl method build.

@Override
public Action build() {
    Action action = new ActionImpl();
    action.setActionCode(this.actionCode);
    action.setActionI81NCode(this.actionI81NCode);
    action.setActionUrl(this.actionUrl);
    action.setDisabledActionImageUrl(this.disabledActionImageUrl);
    action.setEnabledActionImageUrl(this.enabledActionImageUrl);
    action.setCssSelector(cssSelector);
    action.setActionAltI81NCode(this.actionAltI81NCode);
    // By default an action is disabled
    action.setActionEnabled(false);
    return action;
}
Also used : Action(org.asqatasun.webapp.action.Action) ActionImpl(org.asqatasun.webapp.action.ActionImpl)

Example 3 with Action

use of org.asqatasun.webapp.action.Action in project Asqatasun by Asqatasun.

the class ActionVoterImpl method initialize.

@Override
public void initialize(List<Action> contractActionList) {
    String actionCode;
    this.actionList = contractActionList;
    for (Action action : this.actionList) {
        actionCode = action.getActionCode();
        if (actionEnableMap.containsKey(actionCode)) {
            action.setActionEnabled(actionEnableMap.get(actionCode));
        }
    }
}
Also used : Action(org.asqatasun.webapp.action.Action)

Aggregations

Action (org.asqatasun.webapp.action.Action)3 ActionImpl (org.asqatasun.webapp.action.ActionImpl)1 Contract (org.asqatasun.webapp.entity.contract.Contract)1 Functionality (org.asqatasun.webapp.entity.functionality.Functionality)1