Package org.eclipse.orion.server.core.resources

Examples of org.eclipse.orion.server.core.resources.Property


    this.spaces = spaces;
  }

  @Override
  public JSONObject toJSON() throws JSONException {
    DEFAULT_RESOURCE_SHAPE.addProperty(new Property(CFProtocolConstants.KEY_SPACES));
    return jsonSerializer.serialize(this, DEFAULT_RESOURCE_SHAPE);
  }
View Full Code Here


  @Test
  public void testDefaultResourceShapeForNestedResource() throws Exception {
    // given
    ResourceShape resourceShape = ResourceShapeFactory.createResourceShape(TestResource.class, null);
    Property[] properties = resourceShape.getProperties();
    Property resourceProperty = getPropertyWithName(properties, TestResource.RESOURCE_PROPERTY_NAME);

    // when
    ResourceShape nestedResourceShape = resourceProperty.getResourceShape();

    // then
    Property[] nestedProperties = nestedResourceShape.getProperties();
    assertEquals(1, nestedProperties.length);
    assertHasProperty(nestedProperties, TestResource.LOCATION_PROPERTY);
View Full Code Here

  public void testSerializeInvalidProperty() throws Exception {
    // given
    TestResource testResource = new TestResource();
    Serializer<JSONObject> jsonSerializer = new JSONSerializer();
    ResourceShape resourceShape = new ResourceShape();
    resourceShape.addProperty(new Property("invalid"));

    // when
    jsonSerializer.serialize(testResource, resourceShape);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.orion.server.core.resources.Property

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.