Skip to content

Commit

Permalink
allow changing collection name
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbranham committed Aug 18, 2024
1 parent dc4492c commit 6b2ee65
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.savantly.nexus.flow.dom.destination;

import static org.apache.causeway.applib.annotation.SemanticsOf.IDEMPOTENT_ARE_YOU_SURE;
import static org.apache.causeway.applib.annotation.SemanticsOf.NON_IDEMPOTENT;

import java.util.Comparator;
import java.util.UUID;
Expand Down Expand Up @@ -80,15 +81,15 @@ public static Destination withName(Form form, DestinationType destinationType, S
@Title
@Name
@Column(length = Name.MAX_LEN, nullable = false)
@Property(editing = Editing.ENABLED)
@Property
@Getter
@Setter
@ToString.Include
@PropertyLayout(fieldSetId = "name", sequence = "1")
private String name;

@JoinColumn(name = "org_id", nullable = false)
@Property(editing = Editing.DISABLED)
@Property
@PropertyLayout(fieldSetId = "name", sequence = "1.1", hidden = Where.PARENTED_TABLES)
@Getter
@Setter
Expand Down Expand Up @@ -129,6 +130,20 @@ public int compareTo(final Destination other) {

// *** ACTIONS ***

@Action(semantics = NON_IDEMPOTENT, commandPublishing = Publishing.ENABLED, executionPublishing = Publishing.ENABLED)
@ActionLayout(associateWith = "name", describedAs = "Update name")
public Destination updateName(@ParameterLayout(named = "Name") String name) {
setName(name);
return this;
}

@Action(semantics = NON_IDEMPOTENT, commandPublishing = Publishing.ENABLED, executionPublishing = Publishing.ENABLED)
@ActionLayout(associateWith = "collectionName", describedAs = "Update collection name")
public Destination updateCollectionName(@ParameterLayout(named = "Collection Name") String collectionName) {
setCollectionName(collectionName);
return this;
}

@Action(semantics = SemanticsOf.NON_IDEMPOTENT, commandPublishing = Publishing.ENABLED, executionPublishing = Publishing.ENABLED)
@ActionLayout(associateWith = "transformScript", describedAs = "Update script")
public Destination updateTransformScript(@ParameterLayout(multiLine = 20) String transformScript) {
Expand Down

0 comments on commit 6b2ee65

Please sign in to comment.