Package org.openquark.cal.machine

Examples of org.openquark.cal.machine.StatusListener$Status$Entity


    try {
      // TODO getStatus does all validations and filters clusters
      InstancesResult result = getStatus(type, entity, startStr, endStr,
          colo);
      LogProvider logProvider = new LogProvider();
      Entity entityObject = EntityUtil.getEntity(type, entity);
      for (Instance instance : result.getInstances()) {
        logProvider.populateLogUrls(entityObject, instance, runId);
      }
      return result;
    } catch (Exception e) {
View Full Code Here


            audit(request, entity, type, "INSTANCE_KILL");
            validateParams(type, entity, startStr, endStr);
           
            Date start = EntityUtil.parseDateUTC(startStr);
            Date end = getEndDate(start, endStr);           
            Entity entityObject = EntityUtil.getEntity(type, entity);
           
            Properties props = getProperties(request);
            AbstractWorkflowEngine wfEngine = getWorkflowEngine();
            return wfEngine.killInstances(entityObject, start, end, props);
        } catch (Throwable e) {
View Full Code Here

            audit(request, entity, type, "INSTANCE_SUSPEND");
            validateParams(type, entity, startStr, endStr);
           
            Date start = EntityUtil.parseDateUTC(startStr);
            Date end = getEndDate(start, endStr);           
            Entity entityObject = EntityUtil.getEntity(type, entity);
           
            Properties props = getProperties(request);
            AbstractWorkflowEngine wfEngine = getWorkflowEngine();
            return wfEngine.suspendInstances(entityObject, start, end, props);
        } catch (Throwable e) {
View Full Code Here

            audit(request, entity, type, "INSTANCE_RESUME");
            validateParams(type, entity, startStr, endStr);
           
            Date start = EntityUtil.parseDateUTC(startStr);
            Date end = getEndDate(start, endStr);           
            Entity entityObject = EntityUtil.getEntity(type, entity);
           
            Properties props = getProperties(request);
            AbstractWorkflowEngine wfEngine = getWorkflowEngine();
            return wfEngine.resumeInstances(entityObject, start, end, props);
        } catch (Throwable e) {
View Full Code Here

       
        String workspaceFileName = "gemcutter.default.cws";
        BasicCALServices services = BasicCALServices.make(workspaceFileName);
       
        // A simple status listener which provides feedback with dots.
        StatusListener statusListener = new StatusListener() {

            private int nDotsInLine = 0;
            private static final int DOTS_PER_LINE = 120;
           
            public void setModuleStatus(StatusListener.Status.Module moduleStatus, ModuleName moduleName) {
View Full Code Here

     * Recompiles the changed modules in the workspace.
     * @return True if the operation completed successfully, false otherwise.
     */
    private boolean recompile() {
        CompilerMessageLogger logger = new MessageLogger();
        StatusListener recompileStatusListener = new StatusListener.StatusListenerAdapter() {
            @Override
            public void setModuleStatus(StatusListener.Status.Module moduleStatus, ModuleName moduleName) {
                if (moduleStatus == StatusListener.SM_LOADED) {
                    incrementProgressBar();
                }
View Full Code Here

     */
    private boolean compileWorkspace(boolean dirtyModulesOnly) {
       
        // Create a listener that just sets status messages.
        // We no longer want detailed compilation status messages in status bar - these go in the splash screen now
        StatusListener listener = new StatusListener.StatusListenerAdapter() {
            public void setEntityStatus(StatusListener.Status.Entity entityStatus, String entityName) {
               
            }
            public void setModuleStatus(StatusListener.Status.Module moduleStatus, ModuleName moduleName) {
                String resourceName = statusToPropertyKeyMap.get(moduleStatus);
View Full Code Here

            request.setAuthentication(authentication);

            RecoverKeyBinding keyBinding = createRecoverKeyBinding();
            keyBinding.setKeyName(alias);

            Status status = new Status();
            status.setStatusValue(StatusValue.INDETERMINATE);
            keyBinding.setStatus(status);

            request.setRecoverKeyBinding(keyBinding);

            request.addRespondWith(RespondWith.PRIVATE_KEY);
View Full Code Here

            ValidateResult validateResult = getValidateResult(result);
            List keybinds = validateResult.getKeyBindingList();
            KeyBinding keybinding = (KeyBinding) keybinds.get(0);

            Status status = keybinding.getStatus();

            return StatusValue.VALID.equals(status.getStatusValue());

        } catch (Exception ex) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("", ex);
            }
View Full Code Here

        kb.setValidityInterval(notBefore, notAfter);
    }

    private void addStatus(boolean valid, KeyBinding kb) {
        Status status = new Status();
        status
                .setStatusValue((valid) ? StatusValue.VALID
                        : StatusValue.INVALID);
        if (valid) {
            status.addValidReason(ValidReason.ISSUER_TRUST);
            status.addValidReason(ValidReason.REVOCATION_STATUS);
            status.addValidReason(ValidReason.SIGNATURE);
            status.addValidReason(ValidReason.VALIDITY_INTERVAL);
        } else {
            status.addInvalidReason(InvalidReason.ISSUER_TRUST);
            status.addInvalidReason(InvalidReason.REVOCATION_STATUS);
            status.addInvalidReason(InvalidReason.SIGNATURE);
            status.addInvalidReason(InvalidReason.VALIDITY_INTERVAL);
        }
        kb.setStatus(status);
    }
View Full Code Here

TOP

Related Classes of org.openquark.cal.machine.StatusListener$Status$Entity

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.