Class DefaultResourceActions.CopyImpl
java.lang.Object
com.inductiveautomation.ignition.gateway.config.actions.DefaultResourceActions.CopyImpl
- All Implemented Interfaces:
ResourceAction,ResourceAction.Copy
- Direct Known Subclasses:
DefaultResourceActions.Copy,DefaultResourceActions.ValidatingCopy
- Enclosing class:
- DefaultResourceActions
public static sealed class DefaultResourceActions.CopyImpl
extends Object
implements ResourceAction.Copy
permits DefaultResourceActions.Copy, DefaultResourceActions.ValidatingCopy<R>
Not for direct use
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordUsed internally by the Copy implementation for validation.Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.gateway.config.actions.ResourceAction
ResourceAction.ContextObject, ResourceAction.Copy, ResourceAction.Create, ResourceAction.CreateRequest, ResourceAction.Delete, ResourceAction.DeleteRequest, ResourceAction.ListResources, ResourceAction.Modify, ResourceAction.ModifyRequest, ResourceAction.Move, ResourceAction.Read, ResourceAction.Rename, ResourceAction.ValidationFailure -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull StructuralModificationResponsecopy(ConfigurationManager manager, ResourceType resourceType, @Nullable String fromName, @Nullable String toName, @Nullable String fromCollection, @Nullable String toCollection, ImmutableBytes signature, ResourceAction.ContextObject contextObject) Copies a resource from one location to another.protected Optional<ResourceAction.ValidationFailure>
-
Constructor Details
-
CopyImpl
public CopyImpl()
-
-
Method Details
-
copy
@NotNull public @NotNull StructuralModificationResponse copy(ConfigurationManager manager, ResourceType resourceType, @Nullable @Nullable String fromName, @Nullable @Nullable String toName, @Nullable @Nullable String fromCollection, @Nullable @Nullable String toCollection, ImmutableBytes signature, ResourceAction.ContextObject contextObject) Description copied from interface:ResourceAction.CopyCopies a resource from one location to another.- Specified by:
copyin interfaceResourceAction.Copy- Parameters:
manager- The configuration manager to use for copying the resource.resourceType- The type of the resource to copy.fromName- The name of the resource to copy from.toName- The name of the resource to copy to.fromCollection- The collection in which the source resource resides, if applicable.toCollection- The collection in which the destination resource will reside, if applicable.signature- The signature of the resource being copied.contextObject- The context object to associated with the change.- Returns:
- A response indicating the result of the copy operation.
-
validateResources
protected Optional<ResourceAction.ValidationFailure> validateResources(DefaultResourceActions.CopyImpl.CopyContext resources)
-