@Override public GenericTypeResourceDTO marshal(GenericTypeResource resource) throws Exception { return new GenericTypeResourceDTO(resource); }
@Override public InterfaceLevelResource unmarshal(InterfaceLevelResourceDTO dto) throws Exception { return dto.toResource(); }
@Override public NodeLevelResourceDTO marshal(NodeLevelResource resource) throws Exception { return new NodeLevelResourceDTO(resource); }
@SuppressWarnings("unchecked") @Override public <V> V getAttribute(String property) { for (CollectionAttributeDTO attribute : attributes) { if (!attribute.getKey().equals(property)) { continue; } return (V)attribute.getValueOrContents(); } return null; }
public NumericAttribute toAttribute() { return new NumericAttribute(getGroup(), getName(), value, getType(), getIdentifier()); }
public StringAttribute toAttribute() { return new StringAttribute(getGroup(), getName(), value, getIdentifier()); }
public void addAttribute(String key, Object value) { attributes.add(new CollectionAttributeDTO(key, value)); }
@Override public GenericTypeResource unmarshal(GenericTypeResourceDTO dto) throws Exception { return dto.toResource(); }
@Override public NodeLevelResource unmarshal(NodeLevelResourceDTO dto) throws Exception { return dto.toResource(); }
@Override public InterfaceLevelResourceDTO marshal(InterfaceLevelResource resource) throws Exception { return new InterfaceLevelResourceDTO(resource); }
@Override public NumericAttribute unmarshal(NumericAttributeDTO dto) throws Exception { return dto.toAttribute(); }
@Override public NumericAttributeDTO marshal(NumericAttribute attribute) throws Exception { return new NumericAttributeDTO(attribute); }
@Override public StringAttribute unmarshal(StringAttributeDTO dto) throws Exception { return dto.toAttribute(); }
@Override public StringAttributeDTO marshal(StringAttribute attribute) throws Exception { return new StringAttributeDTO(attribute); }
public CollectionSetDTO build() { return new CollectionSetDTO(m_agent, m_status, m_timestamp, m_attributesByResource, m_disableCounterPersistence); }
public InterfaceLevelResourceDTO(InterfaceLevelResource resource) { parent = new NodeLevelResourceDTO(resource.getParent()); ifName = resource.getIfName(); timestamp = resource.getTimestamp(); }
@Override public GenericTypeResourceDTO marshal(DeferredGenericTypeResource resource) throws Exception { return new GenericTypeResourceDTO(resource); }
@Override public GenericTypeResource unmarshal(GenericTypeResourceDTO dto) throws Exception { return dto.toResource(); }
public InterfaceLevelResource toResource() { final InterfaceLevelResource resource = new InterfaceLevelResource(parent.toResource(), ifName); resource.setTimestamp(timestamp); return resource; } }
public GenericTypeResourceDTO(DeferredGenericTypeResource resource) { parent = new NodeLevelResourceDTO(resource.getParent()); name = resource.getTypeName(); fallback = resource.getFallbackTypeName(); instance = resource.getInstance(); timestamp = resource.getTimestamp(); }