io.sphere.sdk.extensions.commands.ExtensionDeleteCommand Maven / Gradle / Ivy
/*
This class has been generated by class io.sphere.sdk.annotations.processors.DeleteCommandEndpointAnnotationProcessor
induced by the annotation io.sphere.sdk.annotations.HasDeleteCommand.
in the source class io.sphere.sdk.extensions.Extension.
To render this class the handlebars template 'commands/deleteCommandInterface.hbs' has been used.
*/
package io.sphere.sdk.extensions.commands;
import io.sphere.sdk.commands.DeleteCommand;
import io.sphere.sdk.expansion.MetaModelReferenceExpansionDsl;
import io.sphere.sdk.models.Versioned;
import io.sphere.sdk.extensions.Extension;
import io.sphere.sdk.extensions.expansion.ExtensionExpansionModel;
import static io.sphere.sdk.client.SphereRequestUtils.urlEncode;
/**
Deletes an extension.
@see Extension
*/
public interface ExtensionDeleteCommand extends MetaModelReferenceExpansionDsl>, DeleteCommand {
/**
Creates a command object to delete a {@link Extension} by ID.
@param versioned the object to delete (so directly a {@link Extension}) or just the version/ID information of it
@return delete command
*/
static ExtensionDeleteCommand of(final Versioned versioned) {
return new ExtensionDeleteCommandImpl(versioned,false);
}
/**
Creates a command object to delete a {@link Extension} by its key.
@param key the key of the Extension to delete, see {@link Extension#getKey()}
@param version `the current version of the Extension, see {@link Extension#getVersion()}
@return delete command
*/
static ExtensionDeleteCommand ofKey(final String key, final Long version) {
final Versioned versioned = Versioned.of("key=" + urlEncode(key), version);//hack for simple reuse
return of(versioned);
}
/**
Creates a command object to delete a {@link Extension} by its id.
@param id the id of the Extension to delete, see {@link Extension#getId()}
@param version `the current version of the Extension, see {@link Extension#getVersion()}
@return delete command
*/
static ExtensionDeleteCommand ofId(final String id, final Long version) {
final Versioned versioned = Versioned.of("id=" + urlEncode(id), version);//hack for simple reuse
return of(versioned);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy