
com.sun.xml.ws.commons.virtualbox.IHardDiskFormat Maven / Gradle / Ivy
package com.sun.xml.ws.commons.virtualbox;
import java.util.List;
import javax.xml.ws.Holder;
import javax.xml.ws.WebServiceException;
/**
* The IHardDiskFormat interface represents a virtual hard disk format.
*
* Each hard disk format has an associated backend which is used to handle
* hard disks stored in this format. This interface provides information
* about the properties of the associated backend.
*
* Each hard disk format is identified by a string represented by the {@link #id} attribute. This string is used in calls like {@link IVirtualBox#createHardDisk2()} to specify the desired
* format.
*
* The list of all supported hard disk formats can be obtained using {@link ISystemProperties#hardDiskFormats}.
* @see IHardDisk2
*
*/
public class IHardDiskFormat {
public final VboxPortType port;
public final String _this;
public IHardDiskFormat(String _this, VboxPortType port) {
this._this = _this;
this.port = port;
}
/**
* Identifier of this format.
*
* This string is used in methods of other interfaces where it is necessary
* to specify a hard disk format, such as {@link IVirtualBox#createHardDisk2()}.
*
*/
public String getId() {
try {
String retVal = port.iHardDiskFormatGetId(_this);
return retVal;
} catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
throw new WebServiceException(e);
} catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
throw new WebServiceException(e);
}
}
/**
* Human readable description of this format.
*
* Mainly for use in file open dialogs.
*
*/
public String getName() {
try {
String retVal = port.iHardDiskFormatGetName(_this);
return retVal;
} catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
throw new WebServiceException(e);
} catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
throw new WebServiceException(e);
}
}
/**
* Array of strings containing the supported file extensions.
*
* The first extension in the array is the extension preferred by the
* backend. It is recommended to use this extension when specifying a
* location of the storage unit for a new hard disk.
*
* Note that some backends do not work on files, so this array may be
* empty.
* @see IHardDiskFormat::capabilities
*
*/
public List getFileExtensions() {
try {
List retVal = port.iHardDiskFormatGetFileExtensions(_this);
return retVal;
} catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
throw new WebServiceException(e);
} catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
throw new WebServiceException(e);
}
}
/**
* Capabilities of the format as a set of bit flags.
*
* For the meaning of individual capability flags see {@link HardDiskFormatCapabilities}.
*
*/
public long getCapabilities() {
try {
long retVal = port.iHardDiskFormatGetCapabilities(_this);
return retVal;
} catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
throw new WebServiceException(e);
} catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
throw new WebServiceException(e);
}
}
/**
* Returns several arrays describing the properties supported by this
* format.
*
* An element with the given index in each array describes one
* property. Thus, the number of elements in each returned array is the
* same and corresponds to the number of supported properties.
*
* The returned arrays are not empty only if the {@link HardDiskFormatCapabilities_Properties} flag is set.
* @see DataType
* @see DataFlags
*
* @param types
* Array of property types.
* @param description
* Array of property descriptions.
* @param names
* Array of property names.
* @param flags
* Array of property flags.
* @param defaults
* Array of default property values.
*/
public void describeProperties(Holder> names, Holder> description, Holder> types, Holder> flags, Holder> defaults) {
try {
port.iHardDiskFormatDescribeProperties(_this, names, description, types, flags, defaults);
} catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
throw new WebServiceException(e);
} catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
throw new WebServiceException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy