Package org.platformlayer.core.model

Examples of org.platformlayer.core.model.Action


    if (OpsContext.isConfigure()) {
      String key = model.getKey().getUrl();
      PlatformLayerKey target = model.targetItem;
      PlatformLayerEndpointInfo endpoint = platformLayer.getEndpointInfo(target);
      JobSchedule schedule = model.schedule;
      Action action = model.action;

      actionScheduler.putJob(key, endpoint, schedule, target, action);
    }
  }
View Full Code Here


    values.put("jobId", o.getJobId());
    values.put("executionId", o.getExecutionId());
    JobData job = o.getJob();
    values.put("target", job != null ? job.getTargetItemKey() : null);

    Action action = null;
    if (job != null) {
      action = job.getAction();
    }
    values.put("action", action != null ? action.getType() : null);

    values.put("startedAt", o.getStartedAt());
    values.put("endedAt", o.getEndedAt());
    values.put("state", o.getState());
View Full Code Here

    this.activeJob = jobRecord;
    this.opsSystem = opsSystem;
  }

  Object doOperation() throws OpsException {
    final Action action = activeJob.getAction();
    final PlatformLayerKey targetItemKey = activeJob.getTargetItemKey();

    RenameThread rename = new RenameThread(action.getClass().getSimpleName() + " " + targetItemKey);
    try {
      OpsContextBuilder opsContextBuilder = opsSystem.getInjector().getInstance(OpsContextBuilder.class);

      final ProjectAuthorization project = activeJob.getProjectAuthorization();
View Full Code Here

    return best;
  }

  private boolean isCandidate(Method method, BindingScope scope) {
    Action action = scope.getInstance(Action.class);

    Handler handler = method.getAnnotation(Handler.class);
    if (handler != null) {
      if (!canHandleAction(handler, action, true)) {
        return false;
View Full Code Here

    if (rHandler != null && lHandler == null) {
      return r;
    }

    if (rHandler != null && lHandler != null) {
      Action action = scope.getInstance(Action.class);
      if (action != null) {
        boolean lExplicit = canHandleAction(lHandler, action, false);
        boolean rExplicit = canHandleAction(rHandler, action, false);

        if (lExplicit && !rExplicit) {
View Full Code Here

  public static boolean isDelete() {
    return isOperationType(DeleteAction.class);
  }

  public static boolean isOperationType(Class<? extends Action> actionClass) {
    Action action = OpsContext.get().getAction();
    return actionClass.isInstance(action);
  }
View Full Code Here

    Class<? extends Action> actionClass = actionMap.get(actionType.toLowerCase());
    if (actionClass == null) {
      throw new IllegalArgumentException("Unknown action: " + actionType);
    }

    Action action = jsonMapper.readItem(actionClass, json);
    return doAction(action);
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.core.model.Action

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.