public class ManagedObjectImpl extends Object implements MutableManagedObject
Constructor and Description |
---|
ManagedObjectImpl(String name)
Create a new ManagedObjectImpl
|
ManagedObjectImpl(String name,
Set<ManagedProperty> properties)
Create a new ManagedObjectImpl
|
ManagedObjectImpl(String name,
Set<ManagedProperty> properties,
HashSet<ManagedOperation> operations)
Deprecated.
|
ManagedObjectImpl(String name,
Set<ManagedProperty> properties,
Set<ManagedOperation> operations)
Create a new ManagedObjectImpl
|
ManagedObjectImpl(String name,
String nameType,
String attachmentName,
Map<String,ManagedProperty> properties,
HashSet<ManagedOperation> operations,
Serializable attachment)
Deprecated.
|
ManagedObjectImpl(String name,
String nameType,
String attachmentName,
Map<String,ManagedProperty> properties,
Set<ManagedOperation> operations,
Object attachment)
Create a new ManagedObjectImpl
|
ManagedObjectImpl(String name,
String nameType,
String attachmentName,
Set<ManagedProperty> properties,
HashSet<ManagedOperation> operations,
Serializable attachment)
Deprecated.
|
ManagedObjectImpl(String name,
String nameType,
String attachmentName,
Set<ManagedProperty> properties,
Set<ManagedOperation> operations,
Object attachment)
Create a new ManagedObjectImpl
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Map<String,Annotation> |
getAnnotations()
Get the annotations associated with the property
|
Object |
getAttachment()
Get the underlying object.
|
String |
getAttachmentName()
Get the attachment name
|
Object |
getComponentName()
Get the runtime component name.
|
String |
getName()
Get the external name by which the ManagedObject is known
|
String |
getNameType()
Get the external name type/qualifier.
|
Set<ManagedOperation> |
getOperations()
get the ManagedOperations
|
ManagedObject |
getParent()
Get the parent ManagedObject
|
Map<String,ManagedProperty> |
getProperties()
Get the properties
|
ManagedProperty |
getProperty(String name)
Get a property
|
Set<String> |
getPropertyNames()
Get the property names
|
<T> T |
getTransientAttachment(Class<T> expectedType)
Get an attachment from the property,
uses the expected type as both the name
and to cast the resulting object.
|
Object |
getTransientAttachment(String name)
Get a transient attachment from the property.
|
int |
hashCode() |
void |
setAnnotations(Map<String,Annotation> annotations) |
void |
setAttachment(Object attachment)
Set the attachment.
|
void |
setAttachmentName(String attachmentName) |
void |
setComponentName(Object name)
Set the runtime component name.
|
void |
setName(String name)
Set the external name by which the ManagedObject is known
|
void |
setNameType(String nameType) |
void |
setOperations(Set<ManagedOperation> operations)
Set the ManagedOperation associated with the ManagedObject.
|
void |
setParent(ManagedObject parent)
Set the parent ManagedObject.
|
void |
setProperties(Map<String,ManagedProperty> properties)
Set the ManagedObject ManagedProperty mapping.
|
void |
setTransientAttachment(String name,
Object attachment)
Set a transient attachment against the property.
|
String |
toString() |
protected void |
toString(StringBuilder sb)
Append the name and props
|
public ManagedObjectImpl(String name)
name
- - The object name used for ManagementRef resolutionpublic ManagedObjectImpl(String name, Set<ManagedProperty> properties)
name
- - The object name used for ManagementRef resolutionproperties
- the propertiespublic ManagedObjectImpl(String name, Set<ManagedProperty> properties, Set<ManagedOperation> operations)
name
- - The object name used for ManagementRef resolutionproperties
- the propertiesoperations
- the operations@Deprecated public ManagedObjectImpl(String name, Set<ManagedProperty> properties, HashSet<ManagedOperation> operations)
public ManagedObjectImpl(String name, String nameType, String attachmentName, Set<ManagedProperty> properties, Set<ManagedOperation> operations, Object attachment)
name
- - The object name used for ManagementRef resolutionnameType
- - The name type/qualifier used for ManagementRef resolutionattachmentName
- the attachment nameproperties
- the propertiesoperations
- the operationsattachment
- the attachment@Deprecated public ManagedObjectImpl(String name, String nameType, String attachmentName, Set<ManagedProperty> properties, HashSet<ManagedOperation> operations, Serializable attachment)
public ManagedObjectImpl(String name, String nameType, String attachmentName, Map<String,ManagedProperty> properties, Set<ManagedOperation> operations, Object attachment)
name
- - The object name used for ManagementRef resolutionnameType
- - The name type/qualifier used for ManagementRef resolutionattachmentName
- the attachment nameproperties
- the propertiesoperations
- the operationsattachment
- the attachment@Deprecated public ManagedObjectImpl(String name, String nameType, String attachmentName, Map<String,ManagedProperty> properties, HashSet<ManagedOperation> operations, Serializable attachment)
public String getName()
ManagedCommon
getName
in interface ManagedCommon
ManagementObject#name}}
,
ManagementObjectID#name}}
public void setName(String name)
MutableManagedObject
setName
in interface MutableManagedObject
ManagementObject#name}}
,
ManagementObjectID#name}}
public String getNameType()
ManagedCommon
getNameType
in interface ManagedCommon
ManagementObject#type}
,
ManagementObjectID#type}
public void setNameType(String nameType)
public String getAttachmentName()
ManagedCommon
getAttachmentName
in interface ManagedCommon
ManagementObject#attachmentName}}
public void setAttachmentName(String attachmentName)
public Map<String,Annotation> getAnnotations()
getAnnotations
in interface ManagedObject
public void setAnnotations(Map<String,Annotation> annotations)
public Set<String> getPropertyNames()
ManagedCommon
getPropertyNames
in interface ManagedCommon
public ManagedProperty getProperty(String name)
ManagedCommon
getProperty
in interface ManagedCommon
name
- the namepublic Map<String,ManagedProperty> getProperties()
ManagedCommon
getProperties
in interface ManagedCommon
public void setProperties(Map<String,ManagedProperty> properties)
MutableManagedObject
setProperties
in interface MutableManagedObject
properties
- - the ManagedProperty mapping.public Object getAttachment()
ManagedObject
getAttachment
in interface ManagedObject
public void setAttachment(Object attachment)
setAttachment
in interface MutableManagedObject
attachment
- the attachment.public Set<ManagedOperation> getOperations()
getOperations
in interface ManagedCommon
public void setOperations(Set<ManagedOperation> operations)
MutableManagedObject
setOperations
in interface MutableManagedObject
operations
- - the ManagedOperations for the ManagedObject.public ManagedObject getParent()
ManagedObject
getParent
in interface ManagedCommon
getParent
in interface ManagedObject
public void setParent(ManagedObject parent)
MutableManagedObject
setParent
in interface MutableManagedObject
parent
- - the parent ManagedObject, null if no parent exists.public Object getComponentName()
ManagedCommon
getComponentName
in interface ManagedCommon
ManagementRuntimeRef}
public void setComponentName(Object name)
MutableManagedObject
setComponentName
in interface MutableManagedObject
ManagementRuntimeRef}
public <T> T getTransientAttachment(Class<T> expectedType)
ManagedObject
getTransientAttachment
in interface ManagedObject
T
- the expected typeexpectedType
- the expected typepublic Object getTransientAttachment(String name)
ManagedObject
getTransientAttachment
in interface ManagedObject
name
- the nameManagedObject.setTransientAttachment(String, Object)
public void setTransientAttachment(String name, Object attachment)
ManagedObject
setTransientAttachment
in interface ManagedObject
name
- the nameattachment
- the attachment, pass null to remove an attachmentprotected void toString(StringBuilder sb)
sb
- the buffer to append the name and props toCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.