DeployContainer Class

Represents a container for custom metadata components to be deployed.

Metadata

Use Metadata.DeployContainer to manage custom metadata components for deployment. A container must have one or more components before being deployed.

The following are methods for DeployContainer.

Add a custom metadata component to the container.

public void addMetadata(Metadata.Metadata md)

  • md:

    Type: Metadata.Metadata

    A custom metadata component class that derives from Metadata.Metadata. Avoid adding components to a Metadata.DeployContainerthat have the same Metadata.Metadata.fullName because it causes deployment errors.

Type: void

Makes a duplicate copy of the Metadata.DeployContainer.

public Object clone()

Type: Object

Retrieves a list of custom metadata components from the container.

public List<Metadata.Metadata> getMetadata()

Type: List<Metadata.Metadata>

Removes a metadata component from the container.

public Boolean removeMetadata(Metadata.Metadata md)

Type: Boolean

Returns true if the container changed as a result of the call.

Removes a metadata component from the container using the component’s full name.

public Boolean removeMetadataByFullName(String fullName)

  • fullName:

    Type: String

    Full

    name of the component to remove.

Type: Boolean

Returns true if the container changed as a result of the call.