Class AbstractExtensibleRepresentation
java.lang.Object
com.cumulocity.rest.representation.BaseResourceRepresentation
com.cumulocity.rest.representation.AbstractExtensibleRepresentation
- All Implemented Interfaces:
ResourceRepresentation
,org.svenson.DynamicProperties
- Direct Known Subclasses:
AlarmsApiRepresentation
,ApplicationReferenceRepresentation
,ApplicationRepresentation
,ApplicationUserRepresentation
,ApplicationVersionRepresentation
,AuditRecordsRepresentation
,BaseResourceWithExplainRepresentation
,ChangeRepresentation
,ConfigurationOptionRepresentation
,ConfigurationOptionSchemaRepresentation
,CurrentUserRepresentation
,DeliveryLogEntryRepresentation
,DeliveryRepresentation
,DeviceControlRepresentation
,EmailRepresentation
,ErrorMessageRepresentation
,EventRepresentation
,EventsApiRepresentation
,ExtensibleOptionRepresentation
,ExtensionRepresentation
,ExternalIDRepresentation
,GroupReferenceRepresentation
,IdentityRepresentation
,InventoryRepresentation
,ManagedObjectReferenceRepresentation
,ManagedObjectRepresentation
,ManifestRepresentation
,MeasurementRepresentation
,MeasurementsApiRepresentation
,MicroserviceBillingRepresentation
,NotificationSubscriptionFilterRepresentation
,NotificationSubscriptionRepresentation
,NotificationTokenRequestRepresentation
,OperationRepresentation
,OptionRepresentation
,OptionsRepresentation
,PageStatisticsRepresentation
,PlatformApiRepresentation
,ProbeRepresentation
,ProbeRepresentation.ExecActionRepresentation
,ProbeRepresentation.HTTPGetActionRepresentation
,ProbeRepresentation.HttpHeaderRepresentation
,ProbeRepresentation.TCPSocketActionRepresentation
,ProviderRepresentation
,ResourcesRepresentation
,RoleReferenceRepresentation
,RoleRepresentation
,SupportedMeasurementsRepresentation
,SupportedSeriesRepresentation
,SupportUserDetailsRepresentation
,TenantApiRepresentation
,TenantReferenceRepresentation
,UserReferenceRepresentation
,UsersApiRepresentation
public class AbstractExtensibleRepresentation
extends BaseResourceRepresentation
implements org.svenson.DynamicProperties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
Returns the object whose parameter name is given by clazz, or null if no such property exists, or it is invalid.Returns the object associated with the given property name, or null if no such property exists.getAttrs()
getProperty
(String name) boolean
hasProperty
(String name) removeProperty
(String name) void
Sets a property referring to the given object.<T> void
Sets a property referring to the given object.void
Sets a property referring to the given object, using an arbitrary property name.void
void
setProperty
(String name, Object value) Methods inherited from class com.cumulocity.rest.representation.BaseResourceRepresentation
getSelf, getSelfDecoded, setSelf, toJSON, toString
-
Constructor Details
-
AbstractExtensibleRepresentation
public AbstractExtensibleRepresentation()
-
-
Method Details
-
getAttrs
-
setAttrs
-
getProperty
- Specified by:
getProperty
in interfaceorg.svenson.DynamicProperties
-
setProperty
- Specified by:
setProperty
in interfaceorg.svenson.DynamicProperties
-
removeProperty
- Specified by:
removeProperty
in interfaceorg.svenson.DynamicProperties
-
hasProperty
- Specified by:
hasProperty
in interfaceorg.svenson.DynamicProperties
-
propertyNames
- Specified by:
propertyNames
in interfaceorg.svenson.DynamicProperties
-
set
Sets a property referring to the given object. The name of the property will be the fully qualified class name with dots replaced by underscores.
For example, if the object is of type:
- com.cumulocity.model.Coordinate
- "com_cumulocity_model_Coordinate"
- Parameters:
object
- an object to set
-
set
Sets a property referring to the given object, using an arbitrary property name.- Parameters:
object
- property valuepropertyName
- property name
-
set
Sets a property referring to the given object. The name of the property will be the fully qualified class name of the given class, with dots replaced by underscores.
This can be useful if you want to name the property after the base class rather than the actual class of object.
For example, if clazz is of type:
- com.cumulocity.model.Coordinate
- "com_cumulocity_model_Coordinate"
- Type Parameters:
T
- generic type of the class- Parameters:
object
- object to setclazz
- object class
-
get
Returns the object whose parameter name is given by clazz, or null if no such property exists, or it is invalid.- Type Parameters:
T
- generic type fo the class- Parameters:
clazz
- a class of the property- Returns:
- property value
- See Also:
-
get
Returns the object associated with the given property name, or null if no such property exists.- Parameters:
name
- property name- Returns:
- value of the property
-