Examples of LogStatus


Examples of com.jitcaforwin.trackinfoanalyzer.log.api.LogStatus

public class LogStatusTest {

  @Test
  public void testOKStatus(){
    LogStatus ok = new Ok();
    assertTrue(ok.isOk());
    assertFalse(ok.isWarning());
    assertFalse(ok.isError());
    assertFalse(ok.isUnknown());
   
    assertEquals(LogStatus.OK, ok.toChar());
   
    assertFalse(ok.hasToBeUpdated(new Ok()));
    assertTrue(ok.hasToBeUpdated(new Warning()));
    assertTrue(ok.hasToBeUpdated(new Error()));
    assertFalse(ok.hasToBeUpdated(new Unkown()));
  }
View Full Code Here

Examples of com.jitcaforwin.trackinfoanalyzer.log.api.LogStatus

    assertFalse(ok.hasToBeUpdated(new Unkown()));
  }
 
  @Test
  public void testWarningStatus(){
    LogStatus warning = new Warning();
    assertFalse(warning.isOk());
    assertTrue(warning.isWarning());
    assertFalse(warning.isUnknown());
   
    assertEquals(LogStatus.WARNING, warning.toChar());
   
    assertFalse(warning.hasToBeUpdated(new Ok()));
    assertFalse(warning.hasToBeUpdated(new Warning()));
    assertTrue(warning.hasToBeUpdated(new Error()));
    assertFalse(warning.hasToBeUpdated(new Unkown()));
  }
View Full Code Here

Examples of com.jitcaforwin.trackinfoanalyzer.log.api.LogStatus

    assertFalse(warning.hasToBeUpdated(new Unkown()));
  }
 
  @Test
  public void testErrorStatus(){
    LogStatus error = new Error();
    assertFalse(error.isOk());
    assertFalse(error.isWarning());
    assertTrue(error.isError());
    assertFalse(error.isUnknown());
   
    assertEquals(LogStatus.ERROR, error.toChar());
   
    assertFalse(error.hasToBeUpdated(new Ok()));
    assertFalse(error.hasToBeUpdated(new Warning()));
    assertFalse(error.hasToBeUpdated(new Error()));
    assertFalse(error.hasToBeUpdated(new Unkown()));
  }
View Full Code Here

Examples of com.jitcaforwin.trackinfoanalyzer.log.api.LogStatus

    assertFalse(error.hasToBeUpdated(new Unkown()));
  }
 
  @Test
  public void testUnkownStatus(){
    LogStatus status = new Unkown();
    assertFalse(status.isOk());
    assertFalse(status.isWarning());
    assertFalse(status.isError());
    assertTrue(status.isUnknown());
   
    assertEquals(LogStatus.UNKOWN, status.toChar());
   
    assertTrue(status.hasToBeUpdated(new Ok()));
    assertTrue(status.hasToBeUpdated(new Warning()));
    assertTrue(status.hasToBeUpdated(new Error()));
    assertFalse(status.hasToBeUpdated(new Unkown()));
  }
View Full Code Here

Examples of org.jitterbit.integration.activity.client.log.LogStatus

            e.setParentOpInstanceId(getOptionalLong(ws.getParentOperationInstanceId()));
            return e;
        }

        private static QueueStatus getStatus(WsOperationLogInstance ws) {
            LogStatus logStatus = LogStatus.fromServerId(ws.getStatus());
            switch (logStatus) {
            case PENDING:
                return QueueStatus.PENDING;
            case RUNNING:
                return QueueStatus.RUNNING;
View Full Code Here

Examples of org.jitterbit.integration.activity.client.log.LogStatus

    private static final class StatusRenderer extends DefaultTableCellRenderer {

        @Override
        protected void setValue(Object value) {
            if (value instanceof LogStatus) {
                LogStatus status = (LogStatus) value;
                Icon icon = PackageResources.getStatusIcon(status);
                setIcon(icon);
                setText(icon == null ? status.toString() : null);
                setToolTipText(status.toString());
                setHorizontalAlignment(JLabel.CENTER);
            } else {
                setToolTipText(null);
                setIcon(null);
                super.setValue(value);
View Full Code Here

Examples of org.jitterbit.integration.activity.client.log.LogStatus

        private final OperationId opId = new OperationId("ffbf2874-631e-44fe-af79-57f200643d18");
       
        @Override
        public synchronized void getOperationLog(OperationLogRequest request, GetOperationLogCallback callback) {
            updateTimeStamps();
            LogStatus status = progression[where];
            OperationLogEntry entry;
            if (status == LogStatus.SUCCESS) {
                entry = new OperationLogEntry(
                                opId,
                                "My Operation",
View Full Code Here

Examples of org.jitterbit.integration.activity.client.log.LogStatus

        @Override
        public void getOperationProgress(OperationProgressRequest request, OperationProgressCallback callback) {
            List<OperationProgressMessage> result = Lists.newArrayList();
            if (where < progression.length) {
                LogStatus status = progression[where];
                if (status != LogStatus.PENDING) {
                    int percentageDone = 20 * where;
                    ProgressSnapshot snapshot = new ProgressSnapshot("Sending data", messages[where], percentageDone,
                                    new Date(System.currentTimeMillis() + (100 - percentageDone) * 2000000L));
                    result.add(new OperationProgressMessage(opId, request.opInstanceId, snapshot));
View Full Code Here

Examples of org.jitterbit.integration.activity.client.log.LogStatus

        if (where == 0) {
            opId = new OperationId();
        }
        long opInstanceId = (request.opInstanceId == null) ? 100L : request.opInstanceId;
        updateTimeStamps();
        LogStatus status = progression[where];
        OperationLogEntry entry;
        if (status == LogStatus.SUCCESS) {
            entry = new OperationLogEntry(
                            opId,
                            "My Operation",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.