Package com.abiquo.server.core.enterprise

Examples of com.abiquo.server.core.enterprise.EnterprisePropertiesDto


    *      EnterprisePropertiesResource#
    *      EnterprisePropertiesResource-Retrievethepropertiesforanenterprise</a>
    * @return The defined properties of the given enterprise.
    */
   public EnterpriseProperties getEnterpriseProperties() {
      EnterprisePropertiesDto dto = context.getApi().getEnterpriseApi().getEnterpriseProperties(this.unwrap());
      return wrap(context, EnterpriseProperties.class, dto);
   }
View Full Code Here


    *      EnterprisePropertiesResource#
    *      EnterprisePropertiesResource-Retrievethepropertiesforanenterprise</a>
    * @return The defined properties of the given enterprise.
    */
   public EnterpriseProperties getEnterpriseProperties() {
      EnterprisePropertiesDto dto = context.getApi().getEnterpriseApi().getEnterpriseProperties(this.unwrap());
      return wrap(context, EnterpriseProperties.class, dto);
   }
View Full Code Here

      Integer size = properties.getProperties().size();
      properties.getProperties().put("Prop", "Value");
      properties.update();

      // Recover the updated properties
      EnterprisePropertiesDto updated = env.enterpriseApi.getEnterpriseProperties(env.enterprise.unwrap());

      assertEquals(updated.getProperties().size(), size + 1);
      assertTrue(updated.getProperties().containsKey("Prop"));
      assertTrue(updated.getProperties().containsValue("Value"));
   }
View Full Code Here

   @Override
   public EnterpriseProperties getEnterpriseProperties(final Enterprise enterprise) {
      checkNotNull(enterprise.getId(), ValidationErrors.MISSING_REQUIRED_FIELD + " id in " + Enterprise.class);

      EnterprisePropertiesDto properties = context.getApi().getEnterpriseApi()
            .getEnterpriseProperties(enterprise.unwrap());
      return wrap(context, EnterpriseProperties.class, properties);
   }
View Full Code Here

      return enterprise;
   }

   public static EnterprisePropertiesDto enterprisePropertiesPut() {
      EnterprisePropertiesDto enterpriseProp = new EnterprisePropertiesDto();
      enterpriseProp.setId(1);
      Map<String, String> props = Maps.newHashMap();
      props.put("key", "value");
      enterpriseProp.setProperties(props);
      enterpriseProp.addLink(new RESTLink("edit", "http://localhost/api/admin/enterprises/1/properties"));
      enterpriseProp.addLink(new RESTLink("enterprise", "http://localhost/api/admin/enterprises/1"));

      return enterpriseProp;
   }
View Full Code Here

   @Override
   public EnterpriseProperties getEnterpriseProperties(final Enterprise enterprise) {
      checkNotNull(enterprise.getId(), ValidationErrors.MISSING_REQUIRED_FIELD + " id in " + Enterprise.class);

      EnterprisePropertiesDto properties = context.getApi().getEnterpriseApi()
            .getEnterpriseProperties(enterprise.unwrap());
      return wrap(context, EnterpriseProperties.class, properties);
   }
View Full Code Here

      Integer size = properties.getProperties().size();
      properties.getProperties().put("Prop", "Value");
      properties.update();

      // Recover the updated properties
      EnterprisePropertiesDto updated = env.enterpriseApi.getEnterpriseProperties(env.enterprise.unwrap());

      assertEquals(updated.getProperties().size(), size + 1);
      assertTrue(updated.getProperties().containsKey("Prop"));
      assertTrue(updated.getProperties().containsValue("Value"));
   }
View Full Code Here

      return enterprise;
   }

   public static EnterprisePropertiesDto enterprisePropertiesPut() {
      EnterprisePropertiesDto enterpriseProp = new EnterprisePropertiesDto();
      enterpriseProp.setId(1);
      Map<String, String> props = Maps.newHashMap();
      props.put("key", "value");
      enterpriseProp.setProperties(props);
      enterpriseProp.addLink(new RESTLink("edit", "http://localhost/api/admin/enterprises/1/properties"));
      enterpriseProp.addLink(new RESTLink("enterprise", "http://localhost/api/admin/enterprises/1"));

      return enterpriseProp;
   }
View Full Code Here

    *      EnterprisePropertiesResource#
    *      EnterprisePropertiesResource-Retrievethepropertiesforanenterprise</a>
    * @return The defined properties of the given enterprise.
    */
   public EnterpriseProperties getEnterpriseProperties() {
      EnterprisePropertiesDto dto = context.getApi().getEnterpriseApi().getEnterpriseProperties(this.unwrap());
      return wrap(context, EnterpriseProperties.class, dto);
   }
View Full Code Here

    *      EnterprisePropertiesResource#
    *      EnterprisePropertiesResource-Retrievethepropertiesforanenterprise</a>
    * @return The defined properties of the given enterprise.
    */
   public EnterpriseProperties getEnterpriseProperties() {
      EnterprisePropertiesDto dto = context.getApi().getEnterpriseApi().getEnterpriseProperties(this.unwrap());
      return wrap(context, EnterpriseProperties.class, dto);
   }
View Full Code Here

TOP

Related Classes of com.abiquo.server.core.enterprise.EnterprisePropertiesDto

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.