org.jclouds.domain.internal
Class ResourceMetadataImpl<T extends Enum<T>>

java.lang.Object
  extended by org.jclouds.domain.internal.ResourceMetadataImpl<T>
All Implemented Interfaces:
Serializable, Comparable<ResourceMetadata<T>>, ResourceMetadata<T>
Direct Known Subclasses:
ComputeMetadataImpl, LoadBalancerMetadataImpl, StorageMetadataImpl

public abstract class ResourceMetadataImpl<T extends Enum<T>>
extends Object
implements ResourceMetadata<T>, Serializable

Idpayload of the object

Author:
Adrian Cole
See Also:
Serialized Form

Constructor Summary
ResourceMetadataImpl(String providerId, String name, Location location, URI uri, Map<String,String> userMetadata)
           
 
Method Summary
 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.
 URI getUri()
          URI used to access this resource
 Map<String,String> getUserMetadata()
          Any key-value pairs associated with the resource.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jclouds.domain.ResourceMetadata
getType
 

Constructor Detail

ResourceMetadataImpl

public ResourceMetadataImpl(@Nullable
                            String providerId,
                            @Nullable
                            String name,
                            @Nullable
                            Location location,
                            @Nullable
                            URI uri,
                            Map<String,String> userMetadata)
Method Detail

compareTo

public int compareTo(ResourceMetadata<T> o)

Specified by:
compareTo in interface Comparable<ResourceMetadata<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 interface ResourceMetadata<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 interface ResourceMetadata<T extends Enum<T>>

getLocation

public Location getLocation()
Physical location of the resource, or null if n/a ex. us-west-1

Specified by:
getLocation in interface ResourceMetadata<T extends Enum<T>>

getUri

public URI getUri()
URI used to access this resource

Specified by:
getUri in interface ResourceMetadata<T extends Enum<T>>

getUserMetadata

public Map<String,String> getUserMetadata()
Any key-value pairs associated with the resource.

Specified by:
getUserMetadata in interface ResourceMetadata<T extends Enum<T>>

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2009-2011 jclouds. All Rights Reserved.