Package org.jclouds.domain.internal
Class MutableResourceMetadataImpl<T extends Enum<T>>
- java.lang.Object
-
- org.jclouds.domain.internal.MutableResourceMetadataImpl<T>
-
- All Implemented Interfaces:
Comparable<ResourceMetadata<T>>
,MutableResourceMetadata<T>
,ResourceMetadata<T>
- Direct Known Subclasses:
MutableStorageMetadataImpl
public class MutableResourceMetadataImpl<T extends Enum<T>> extends Object implements MutableResourceMetadata<T>
Used to construct new resources or modify existing ones.
-
-
Constructor Summary
Constructors Constructor Description MutableResourceMetadataImpl()
MutableResourceMetadataImpl(ResourceMetadata<T> from)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ResourceMetadata<T> o)
boolean
equals(Object obj)
Location
getLocation()
Physical location of the resource, or null if n/a ex.String
getName()
Name of this resource.String
getProviderId()
Unique identifier of this resource within its enclosing namespace.T
getType()
Whether this resource is a container, file, node, queue, etc.URI
getUri()
URI used to access this resourceMap<String,String>
getUserMetadata()
Any key-value pairs associated with the resource.int
hashCode()
void
setId(String id)
void
setLocation(Location location)
void
setName(String name)
void
setType(T type)
void
setUri(URI uri)
void
setUserMetadata(Map<String,String> userMetadata)
protected com.google.common.base.MoreObjects.ToStringHelper
string()
String
toString()
-
-
-
Constructor Detail
-
MutableResourceMetadataImpl
public MutableResourceMetadataImpl()
-
MutableResourceMetadataImpl
public MutableResourceMetadataImpl(ResourceMetadata<T> from)
-
-
Method Detail
-
compareTo
public int compareTo(ResourceMetadata<T> o)
- Specified by:
compareTo
in interfaceComparable<T extends Enum<T>>
-
getType
public T getType()
Whether this resource is a container, file, node, queue, etc.- Specified by:
getType
in interfaceResourceMetadata<T extends Enum<T>>
-
getName
public String getName()
Name of this resource. Names are dictated by the user. For files, this may be the filename, ex. file.txt- Specified by:
getName
in interfaceResourceMetadata<T extends Enum<T>>
-
getProviderId
public String getProviderId()
Unique identifier of this resource within its enclosing namespace. In some scenarios, this id is not user assignable. For files, this may be an system generated key, or the full path to the resource. ex. /path/to/file.txt- Specified by:
getProviderId
in interfaceResourceMetadata<T extends Enum<T>>
-
getUri
public URI getUri()
URI used to access this resource- Specified by:
getUri
in interfaceResourceMetadata<T extends Enum<T>>
-
getUserMetadata
public Map<String,String> getUserMetadata()
Any key-value pairs associated with the resource.- Specified by:
getUserMetadata
in interfaceResourceMetadata<T extends Enum<T>>
-
setName
public void setName(String name)
- Specified by:
setName
in interfaceMutableResourceMetadata<T extends Enum<T>>
- See Also:
ResourceMetadata.getName()
-
setType
public void setType(T type)
- Specified by:
setType
in interfaceMutableResourceMetadata<T extends Enum<T>>
- See Also:
ResourceMetadata.getType()
-
setUserMetadata
public void setUserMetadata(Map<String,String> userMetadata)
- Specified by:
setUserMetadata
in interfaceMutableResourceMetadata<T extends Enum<T>>
- See Also:
ResourceMetadata.getUserMetadata()
-
setId
public void setId(String id)
- Specified by:
setId
in interfaceMutableResourceMetadata<T extends Enum<T>>
- See Also:
#getId
-
setUri
public void setUri(URI uri)
- Specified by:
setUri
in interfaceMutableResourceMetadata<T extends Enum<T>>
- See Also:
ResourceMetadata.getUri()
-
setLocation
public void setLocation(Location location)
- Specified by:
setLocation
in interfaceMutableResourceMetadata<T extends Enum<T>>
- See Also:
ResourceMetadata.getLocation()
-
getLocation
public Location getLocation()
Physical location of the resource, or null if n/a ex. us-west-1- Specified by:
getLocation
in interfaceResourceMetadata<T extends Enum<T>>
-
string
protected com.google.common.base.MoreObjects.ToStringHelper string()
-
-