org.dasein.cloud.cloudstack.compute
Class Templates

java.lang.Object
  extended by org.dasein.cloud.compute.AbstractImageSupport
      extended by org.dasein.cloud.cloudstack.compute.Templates
All Implemented Interfaces:
AccessControlledService, MachineImageSupport

public class Templates
extends AbstractImageSupport


Field Summary
 
Fields inherited from interface org.dasein.cloud.compute.MachineImageSupport
ANY, DOWNLOAD_IMAGE, GET_IMAGE, IMAGE_VM, LIST_IMAGE, MAKE_PUBLIC, REGISTER_IMAGE, REMOVE_IMAGE, SHARE_IMAGE, UPLOAD_IMAGE
 
Constructor Summary
Templates(CSCloud provider)
           
 
Method Summary
 void addImageShare(String providerImageId, String accountNumber)
           
 void addPublicShare(String providerImageId)
           
protected  MachineImage capture(ImageCreateOptions options, AsynchronousTask<MachineImage> task)
           
 MachineImage getImage(String providerImageId)
           
 String getProviderTermForImage(Locale locale, ImageClass cls)
           
 Requirement identifyLocalBundlingRequirement()
           
 boolean isImageSharedWithPublic(String templateId)
           
 boolean isSubscribed()
           
 Iterable<MachineImage> listImages(ImageFilterOptions options)
           
 Iterable<ResourceStatus> listImageStatus(ImageClass cls)
           
 Iterable<String> listShares(String templateId)
           
 Iterable<MachineImageFormat> listSupportedFormats()
           
 Iterable<MachineImageFormat> listSupportedFormatsForBundling()
           
 Iterable<ImageClass> listSupportedImageClasses()
           
 Iterable<MachineImageType> listSupportedImageTypes()
           
 MachineImage registerImageBundle(ImageCreateOptions options)
           
 void remove(String providerImageId, boolean checkState)
           
 void removeAllImageShares(String providerImageId)
           
 void removeImageShare(String providerImageId, String accountNumber)
           
 void removePublicShare(String providerImageId)
           
 Iterable<MachineImage> searchPublicImages(ImageFilterOptions options)
           
 boolean supportsCustomImages()
           
 boolean supportsDirectImageUpload()
           
 boolean supportsImageCapture(MachineImageType type)
           
 boolean supportsImageSharing()
           
 boolean supportsImageSharingWithPublic()
           
 boolean supportsPublicLibrary(ImageClass cls)
           
 
Methods inherited from class org.dasein.cloud.compute.AbstractImageSupport
bundleVirtualMachine, bundleVirtualMachineAsync, captureImage, captureImageAsync, getContext, getMachineImage, getProvider, getProviderTermForCustomImage, getProviderTermForImage, hasPublicLibrary, imageVirtualMachine, listImages, listImages, listMachineImages, listMachineImagesOwnedBy, mapServiceAction, matches, remove, removeTags, removeTags, searchImages, searchMachineImages, searchPublicImages, shareMachineImage, updateTags, updateTags
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Templates

public Templates(CSCloud provider)
Method Detail

addImageShare

public void addImageShare(@Nonnull
                          String providerImageId,
                          @Nonnull
                          String accountNumber)
                   throws CloudException,
                          InternalException
Specified by:
addImageShare in interface MachineImageSupport
Overrides:
addImageShare in class AbstractImageSupport
Throws:
CloudException
InternalException

addPublicShare

public void addPublicShare(@Nonnull
                           String providerImageId)
                    throws CloudException,
                           InternalException
Specified by:
addPublicShare in interface MachineImageSupport
Overrides:
addPublicShare in class AbstractImageSupport
Throws:
CloudException
InternalException

getImage

public MachineImage getImage(@Nonnull
                             String providerImageId)
                      throws CloudException,
                             InternalException
Throws:
CloudException
InternalException

getProviderTermForImage

@Nonnull
public String getProviderTermForImage(@Nonnull
                                              Locale locale,
                                              @Nonnull
                                              ImageClass cls)

identifyLocalBundlingRequirement

@Nonnull
public Requirement identifyLocalBundlingRequirement()
                                             throws CloudException,
                                                    InternalException
Specified by:
identifyLocalBundlingRequirement in interface MachineImageSupport
Overrides:
identifyLocalBundlingRequirement in class AbstractImageSupport
Throws:
CloudException
InternalException

capture

@Nonnull
protected MachineImage capture(@Nonnull
                                       ImageCreateOptions options,
                                       @Nullable
                                       AsynchronousTask<MachineImage> task)
                        throws CloudException,
                               InternalException
Overrides:
capture in class AbstractImageSupport
Throws:
CloudException
InternalException

isImageSharedWithPublic

public boolean isImageSharedWithPublic(@Nonnull
                                       String templateId)
                                throws CloudException,
                                       InternalException
Specified by:
isImageSharedWithPublic in interface MachineImageSupport
Overrides:
isImageSharedWithPublic in class AbstractImageSupport
Throws:
CloudException
InternalException

isSubscribed

public boolean isSubscribed()
                     throws CloudException,
                            InternalException
Throws:
CloudException
InternalException

listImageStatus

@Nonnull
public Iterable<ResourceStatus> listImageStatus(@Nonnull
                                                        ImageClass cls)
                                         throws CloudException,
                                                InternalException
Specified by:
listImageStatus in interface MachineImageSupport
Overrides:
listImageStatus in class AbstractImageSupport
Throws:
CloudException
InternalException

listImages

@Nonnull
public Iterable<MachineImage> listImages(@Nullable
                                                 ImageFilterOptions options)
                                  throws CloudException,
                                         InternalException
Throws:
CloudException
InternalException

listShares

@Nonnull
public Iterable<String> listShares(@Nonnull
                                           String templateId)
                            throws CloudException,
                                   InternalException
Specified by:
listShares in interface MachineImageSupport
Overrides:
listShares in class AbstractImageSupport
Throws:
CloudException
InternalException

listSupportedImageClasses

@Nonnull
public Iterable<ImageClass> listSupportedImageClasses()
                                               throws CloudException,
                                                      InternalException
Specified by:
listSupportedImageClasses in interface MachineImageSupport
Overrides:
listSupportedImageClasses in class AbstractImageSupport
Throws:
CloudException
InternalException

listSupportedImageTypes

@Nonnull
public Iterable<MachineImageType> listSupportedImageTypes()
                                                   throws CloudException,
                                                          InternalException
Specified by:
listSupportedImageTypes in interface MachineImageSupport
Overrides:
listSupportedImageTypes in class AbstractImageSupport
Throws:
CloudException
InternalException

registerImageBundle

@Nonnull
public MachineImage registerImageBundle(@Nonnull
                                                ImageCreateOptions options)
                                 throws CloudException,
                                        InternalException
Specified by:
registerImageBundle in interface MachineImageSupport
Overrides:
registerImageBundle in class AbstractImageSupport
Throws:
CloudException
InternalException

listSupportedFormats

@Nonnull
public Iterable<MachineImageFormat> listSupportedFormats()
                                                  throws CloudException,
                                                         InternalException
Specified by:
listSupportedFormats in interface MachineImageSupport
Overrides:
listSupportedFormats in class AbstractImageSupport
Throws:
CloudException
InternalException

listSupportedFormatsForBundling

@Nonnull
public Iterable<MachineImageFormat> listSupportedFormatsForBundling()
                                                             throws CloudException,
                                                                    InternalException
Specified by:
listSupportedFormatsForBundling in interface MachineImageSupport
Overrides:
listSupportedFormatsForBundling in class AbstractImageSupport
Throws:
CloudException
InternalException

remove

public void remove(@Nonnull
                   String providerImageId,
                   boolean checkState)
            throws CloudException,
                   InternalException
Throws:
CloudException
InternalException

removeAllImageShares

public void removeAllImageShares(@Nonnull
                                 String providerImageId)
                          throws CloudException,
                                 InternalException
Specified by:
removeAllImageShares in interface MachineImageSupport
Overrides:
removeAllImageShares in class AbstractImageSupport
Throws:
CloudException
InternalException

removeImageShare

public void removeImageShare(@Nonnull
                             String providerImageId,
                             @Nonnull
                             String accountNumber)
                      throws CloudException,
                             InternalException
Specified by:
removeImageShare in interface MachineImageSupport
Overrides:
removeImageShare in class AbstractImageSupport
Throws:
CloudException
InternalException

removePublicShare

public void removePublicShare(@Nonnull
                              String providerImageId)
                       throws CloudException,
                              InternalException
Specified by:
removePublicShare in interface MachineImageSupport
Overrides:
removePublicShare in class AbstractImageSupport
Throws:
CloudException
InternalException

searchPublicImages

@Nonnull
public Iterable<MachineImage> searchPublicImages(@Nonnull
                                                         ImageFilterOptions options)
                                          throws CloudException,
                                                 InternalException
Specified by:
searchPublicImages in interface MachineImageSupport
Overrides:
searchPublicImages in class AbstractImageSupport
Throws:
CloudException
InternalException

supportsCustomImages

public boolean supportsCustomImages()
Specified by:
supportsCustomImages in interface MachineImageSupport
Overrides:
supportsCustomImages in class AbstractImageSupport

supportsDirectImageUpload

public boolean supportsDirectImageUpload()
                                  throws CloudException,
                                         InternalException
Specified by:
supportsDirectImageUpload in interface MachineImageSupport
Overrides:
supportsDirectImageUpload in class AbstractImageSupport
Throws:
CloudException
InternalException

supportsImageCapture

public boolean supportsImageCapture(@Nonnull
                                    MachineImageType type)
                             throws CloudException,
                                    InternalException
Specified by:
supportsImageCapture in interface MachineImageSupport
Overrides:
supportsImageCapture in class AbstractImageSupport
Throws:
CloudException
InternalException

supportsImageSharing

public boolean supportsImageSharing()
Specified by:
supportsImageSharing in interface MachineImageSupport
Overrides:
supportsImageSharing in class AbstractImageSupport

supportsImageSharingWithPublic

public boolean supportsImageSharingWithPublic()
Specified by:
supportsImageSharingWithPublic in interface MachineImageSupport
Overrides:
supportsImageSharingWithPublic in class AbstractImageSupport

supportsPublicLibrary

public boolean supportsPublicLibrary(@Nonnull
                                     ImageClass cls)
                              throws CloudException,
                                     InternalException
Specified by:
supportsPublicLibrary in interface MachineImageSupport
Overrides:
supportsPublicLibrary in class AbstractImageSupport
Throws:
CloudException
InternalException


Copyright © 2013 enstratius, Inc.. All Rights Reserved.