-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from openviglet/0.3.2
0.3.2
- Loading branch information
Showing
26 changed files
with
479 additions
and
93 deletions.
There are no files selected for viewing
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
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
58 changes: 58 additions & 0 deletions
58
src/main/java/com/viglet/shiohara/component/form/ShFormConfiguration.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,58 @@ | ||
package com.viglet.shiohara.component.form; | ||
|
||
import java.util.UUID; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
import org.json.JSONObject; | ||
import org.springframework.http.HttpMethod; | ||
|
||
public class ShFormConfiguration { | ||
|
||
private HttpMethod method; | ||
private UUID pageLayout; | ||
private boolean createPost; | ||
private UUID folder; | ||
|
||
public ShFormConfiguration(JSONObject setting) { | ||
super(); | ||
this.setMethod(HttpMethod.valueOf(setting.getString("method"))); | ||
this.setPageLayout(UUID.fromString(setting.getString("pageLayout"))); | ||
this.setCreatePost(setting.getInt("createPost") == 1 ? true : false); | ||
this.setFolder( | ||
StringUtils.isNotBlank(setting.getString("folder")) ? UUID.fromString(setting.getString("folder")) | ||
: null); | ||
} | ||
|
||
public HttpMethod getMethod() { | ||
return method; | ||
} | ||
|
||
public void setMethod(HttpMethod method) { | ||
this.method = method; | ||
} | ||
|
||
public UUID getPageLayout() { | ||
return pageLayout; | ||
} | ||
|
||
public void setPageLayout(UUID pageLayout) { | ||
this.pageLayout = pageLayout; | ||
} | ||
|
||
public boolean isCreatePost() { | ||
return createPost; | ||
} | ||
|
||
public void setCreatePost(boolean createPost) { | ||
this.createPost = createPost; | ||
} | ||
|
||
public UUID getFolder() { | ||
return folder; | ||
} | ||
|
||
public void setFolder(UUID folder) { | ||
this.folder = folder; | ||
} | ||
|
||
} |
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
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.