/** . */
private final String description;
public RestResource(String name, ManagedResource managedResource)
{
ManagedTypeMetaData managedType = managedResource.getMetaData();
//
HashMap<String, RestResourceProperty> properties = new HashMap<String, RestResourceProperty>();
for (ManagedPropertyMetaData managedProperty : managedType.getProperties()) {
RestResourceProperty resourceProperty = new RestResourceProperty(managedProperty);
properties.put(resourceProperty.getName(), resourceProperty);
}
//
List<RestResourceMethod> methods = new ArrayList<RestResourceMethod>();
for (ManagedMethodMetaData managedMethod : managedType.getMethods()) {
RestResourceMethod resourceMethod = new RestResourceMethod(managedMethod);
methods.add(resourceMethod);
}
//
this.name = name;
this.description = managedType.getDescription();
this.managedResource = managedResource;
this.properties = Collections.unmodifiableMap(properties);
this.methods = methods;
}