Examples of ZoneProperties


Examples of com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties

              break;
            case ZONE_STATUS_ARMING:
            case ZONE_STATUS_CURRENT:
            case ZONE_STATUS_LATCHED:
            case ZONE_STATUS_ALL: {
              ZoneProperties p = readZoneProperties(config.getNumber());
              Zone zone = zoneMap.get(number);
              if (zone == null) {
                zone = new Zone(p);
                zoneMap.put(number, zone);
              }
View Full Code Here

Examples of com.digitaldan.jomnilinkII.MessageTypes.properties.ZoneProperties

    int objnum = 0;
    Message m;

    while ((m =  c.reqObjectProperties(Message.OBJ_TYPE_ZONE, objnum, 1, ObjectProperties.FILTER_1_NAMED,
        ObjectProperties.FILTER_2_AREA_ALL, ObjectProperties.FILTER_3_ANY_LOAD)).getMessageType() == Message.MESG_TYPE_OBJ_PROP) {
      ZoneProperties o = ((ZoneProperties) m);
      objnum = o.getNumber();

      String group = addUniqueGroup(groupName + "_" + cleanString(o.getName()));

      groups.append(String.format(groupString,group,o.getName(),groupName));
      //String name = group + "_" + cleanString(o.getName());

      zones.add(new SiteItem(group, o.getName(), o.getName()));

      items.append(String.format(itemString,"Contact", group + "_Current","Current: [%s]",group,"zone_status_current",objnum));
      items.append(String.format(itemString,"String", group + "_Latched","Latched [%s]",group,"zone_status_latched",objnum));
      items.append(String.format(itemString,"String", group + "_Arming","Arming [%s]",group,"zone_status_arming",objnum));
      items.append(String.format(itemString,"String", group + "_All","Status  [%s]",group,"zone_status_all",objnum));
View Full Code Here

Examples of org.jclouds.ultradns.ws.domain.ZoneProperties

public class GetGeneralPropertiesForZoneResponseTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/zoneproperties.xml");

      ZoneProperties expected = expected();

      ZonePropertiesHandler handler = injector.getInstance(ZonePropertiesHandler.class);
      ZoneProperties result = factory.create(handler).parse(is);

      assertEquals(result.toString(), expected.toString());
   }
View Full Code Here

Examples of org.jclouds.ultradns.ws.domain.ZoneProperties

   }

   @Test
   public void testGetZone() {
      for (Zone zone : api().listByAccount(account.getId())) {
         ZoneProperties zoneProperties = api().get(zone.getName());
         assertEquals(zoneProperties.getName(), zone.getName());
         assertEquals(zoneProperties.getType(), zone.getType());
         assertEquals(zoneProperties.getTypeCode(), zone.getTypeCode());
         assertNotNull(zoneProperties.getModified(), "Modified cannot be null for " + zone);
         assertTrue(zoneProperties.getResourceRecordCount() >= 0,
               "ResourceRecordCount must be positive or zero for a Zone " + zone);
      }
   }
View Full Code Here

Examples of org.jclouds.ultradns.ws.domain.ZoneProperties

   @Test
   public void testCreateAndDeleteZone() {
      try {
         api().createInAccount(zoneName, account.getId());
         ZoneProperties newZone = api().get(zoneName);
         getAnonymousLogger().info("created zone: " + newZone);

         try {
            api().createInAccount(zoneName, account.getId());
            fail();
         } catch (ResourceAlreadyExistsException e) {

         }

         assertEquals(newZone.getName(), zoneName);
         assertEquals(newZone.getType(), Type.PRIMARY);
         assertEquals(newZone.getTypeCode(), Type.PRIMARY.getCode());
         assertNotNull(newZone.getModified(), "Modified cannot be null for " + newZone);
         assertEquals(newZone.getResourceRecordCount(), 5);
      } finally {
         api().delete(zoneName);
      }
   }
View Full Code Here

Examples of org.jclouds.ultradns.ws.domain.ZoneProperties

public class GetGeneralPropertiesForZoneResponseTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/zoneproperties.xml");

      ZoneProperties expected = expected();

      ZonePropertiesHandler handler = injector.getInstance(ZonePropertiesHandler.class);
      ZoneProperties result = factory.create(handler).parse(is);

      assertEquals(result.toString(), expected.toString());
   }
View Full Code Here

Examples of org.jclouds.ultradns.ws.domain.ZoneProperties

   }

   @Test
   public void testGetZone() {
      for (Zone zone : api().listByAccount(account.getId())) {
         ZoneProperties zoneProperties = api().get(zone.getName());
         assertEquals(zoneProperties.getName(), zone.getName());
         assertEquals(zoneProperties.getType(), zone.getType());
         assertEquals(zoneProperties.getTypeCode(), zone.getTypeCode());
         assertNotNull(zoneProperties.getModified(), "Modified cannot be null for " + zone);
         assertTrue(zoneProperties.getResourceRecordCount() >= 0,
               "ResourceRecordCount must be positive or zero for a Zone " + zone);
      }
   }
View Full Code Here

Examples of org.jclouds.ultradns.ws.domain.ZoneProperties

   @Test
   public void testCreateAndDeleteZone() {
      try {
         api().createInAccount(zoneName, account.getId());
         ZoneProperties newZone = api().get(zoneName);
         getAnonymousLogger().info("created zone: " + newZone);

         try {
            api().createInAccount(zoneName, account.getId());
            fail();
         } catch (ResourceAlreadyExistsException e) {

         }

         assertEquals(newZone.getName(), zoneName);
         assertEquals(newZone.getType(), Type.PRIMARY);
         assertEquals(newZone.getTypeCode(), Type.PRIMARY.getCode());
         assertNotNull(newZone.getModified(), "Modified cannot be null for " + newZone);
         assertEquals(newZone.getResourceRecordCount(), 5);
      } finally {
         api().delete(zoneName);
      }
   }
View Full Code Here

Examples of org.jclouds.ultradns.ws.domain.ZoneProperties

public class GetGeneralPropertiesForZoneResponseTest extends BaseHandlerTest {

   public void test() {
      InputStream is = getClass().getResourceAsStream("/zoneproperties.xml");

      ZoneProperties expected = expected();

      ZonePropertiesHandler handler = injector.getInstance(ZonePropertiesHandler.class);
      ZoneProperties result = factory.create(handler).parse(is);

      assertEquals(result.toString(), expected.toString());
   }
View Full Code Here

Examples of org.jclouds.ultradns.ws.domain.ZoneProperties

   }

   @Test
   public void testGetZone() {
      for (Zone zone : api().listByAccount(account.getId())) {
         ZoneProperties zoneProperties = api().get(zone.getName());
         assertEquals(zoneProperties.getName(), zone.getName());
         assertEquals(zoneProperties.getType(), zone.getType());
         assertEquals(zoneProperties.getTypeCode(), zone.getTypeCode());
         assertNotNull(zoneProperties.getModified(), "Modified cannot be null for " + zone);
         assertTrue(zoneProperties.getResourceRecordCount() >= 0,
               "ResourceRecordCount must be positive or zero for a Zone " + zone);
      }
   }
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.