@Test(expected = ResourceException.class) public void testRepresentNullOrgName() throws ResourceException { final Variant variant = context.mock(Variant.class); setupCommonInitExpectations(null); sut.init(restContext, request, response); sut.represent(variant); context.assertIsSatisfied(); }
@Override public Representation represent(final Variant variant) throws ResourceException { verifyEntityShortNameParam(); CompositeEntity ent = this.getEntityByShortName(entityShortName); Representation rep = new StringRepresentation(convertEntityToJSONObject(ent).toString(), MediaType.APPLICATION_JSON); rep.setExpirationDate(new Date(0L)); return rep; }
CompositeEntityCapabilityResource extends WritableResource { @Override public Representation represent(final Variant variant) throws ResourceException { verifyEntityShortNameParam(); CompositeEntity ent = this.getEntityByShortName(entityShortName); Representation rep = new StringRepresentation(convertEntityToJSONObject(ent).toString(), MediaType.APPLICATION_JSON); rep.setExpirationDate(new Date(0L)); return rep; } }
CompositeEntityCapabilityResource extends WritableResource { @Override public Representation represent(final Variant variant) throws ResourceException { verifyEntityShortNameParam(); CompositeEntity ent = this.getEntityByShortName(entityShortName); Representation rep = new StringRepresentation(convertEntityToJSONObject(ent).toString(), MediaType.APPLICATION_JSON); rep.setExpirationDate(new Date(0L)); return rep; }  }
CompositeEntityCapabilityResource extends WritableResource { @Override public Representation represent(final Variant variant) throws ResourceException { verifyEntityShortNameParam(); CompositeEntity ent = this.getEntityByShortName(entityShortName); Representation rep = new StringRepresentation(convertEntityToJSONObject(ent).toString(), MediaType.APPLICATION_JSON); rep.setExpirationDate(new Date(0L)); return rep; }  void setEntityMapper(final CompositeEntityMapper inEntMapper); @Override Representation represent(final Variant variant); @Override void storeRepresentation(final Representation entity); JSONObject convertEntityToJSONObject(final CompositeEntity inEntInfo); }
CompositeEntityCapabilityResource extends WritableResource { @Override public Representation represent(final Variant variant) throws ResourceException { verifyEntityShortNameParam(); CompositeEntity ent = this.getEntityByShortName(entityShortName); Representation rep = new StringRepresentation(convertEntityToJSONObject(ent).toString(), MediaType.APPLICATION_JSON); rep.setExpirationDate(new Date(0L)); return rep; }  void setEntityMapper(final CompositeEntityMapper inEntMapper); @Override Representation represent(final Variant variant); @Override void storeRepresentation(final Representation entity); JSONObject convertEntityToJSONObject(final CompositeEntity inEntInfo); static final String CAP_ARRAY_KEY; static final String COORD_ARRAY_KEY; static final String URL_SHORTNAME_KEY; }