-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for site variables in SiteResource (#28340)
* #28059 * #28059 Adding support for site variables when using the site related endpoints * #28059 Updating postman tests * #28059 Updating postman tests * #28059 Adding support for site variables in the CLI * #28059 Adding integration tests to the site variables functionality * #28059 Updating integrations tests * #28059 Applying sonarlint feedback --------- Co-authored-by: fabrizzio-dotCMS <fabrizzio@dotCMS.com>
- Loading branch information
1 parent
06347c0
commit 9a00a7a
Showing
24 changed files
with
3,880 additions
and
213 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
dotCMS/src/main/java/com/dotcms/rest/api/v1/site/AbstractSimpleSiteVarView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.dotcms.rest.api.v1.site; | ||
|
||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Style(typeImmutable = "*", typeAbstract = "Abstract*") | ||
@JsonSerialize(as = SimpleSiteVarView.class) | ||
@JsonDeserialize(as = SimpleSiteVarView.class) | ||
@Value.Immutable | ||
public interface AbstractSimpleSiteVarView { | ||
|
||
String id(); | ||
String name(); | ||
String key(); | ||
String value(); | ||
|
||
} |
50 changes: 50 additions & 0 deletions
50
dotCMS/src/main/java/com/dotcms/rest/api/v1/site/SimpleSiteVariableForm.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.dotcms.rest.api.v1.site; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class SimpleSiteVariableForm { | ||
|
||
private final String id; | ||
private final String name; | ||
private final String key; | ||
private final String value; | ||
|
||
@JsonCreator | ||
public SimpleSiteVariableForm(@JsonProperty("id") final String id, | ||
@JsonProperty("name") final String name, | ||
@JsonProperty("key") final String key, | ||
@JsonProperty("value") final String value) { | ||
|
||
this.id = id; | ||
this.name = name; | ||
this.key = key; | ||
this.value = value; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public String getKey() { | ||
return key; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "SiteVariableForm{" + | ||
"id='" + id + '\'' + | ||
", name='" + name + '\'' + | ||
", key='" + key + '\'' + | ||
", value='" + value + '\'' + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.