-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0fea21
commit e0494d5
Showing
6 changed files
with
207 additions
and
36 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
dotCMS/src/main/java/com/dotcms/rest/api/v1/asset/AbstractFileUploadParamsJson.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,14 @@ | ||
package com.dotcms.rest.api.v1.asset; | ||
|
||
|
||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import org.immutables.value.Value; | ||
|
||
@Value.Style(typeImmutable="*", typeAbstract="Abstract*") | ||
@Value.Immutable | ||
@JsonDeserialize(as = FileUploadParamsJson.Builder.class) | ||
public interface AbstractFileUploadParamsJson { | ||
|
||
String id(); | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
dotCMS/src/main/java/com/dotcms/rest/api/v1/asset/FileUploadData.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,52 @@ | ||
package com.dotcms.rest.api.v1.asset; | ||
|
||
import java.io.InputStream; | ||
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; | ||
import org.glassfish.jersey.media.multipart.FormDataParam; | ||
|
||
public class FileUploadData { | ||
|
||
@FormDataParam("file") | ||
private InputStream fileInputStream; | ||
|
||
@FormDataParam("file") | ||
private FormDataContentDisposition contentDisposition; | ||
|
||
@FormDataParam("assetPath") | ||
private String assetPath; | ||
|
||
@FormDataParam("detail") | ||
private FileUploadDetail detail; | ||
|
||
public InputStream getFileInputStream() { | ||
return fileInputStream; | ||
} | ||
|
||
public void setFileInputStream(InputStream fileInputStream) { | ||
this.fileInputStream = fileInputStream; | ||
} | ||
|
||
public FormDataContentDisposition getContentDisposition() { | ||
return contentDisposition; | ||
} | ||
|
||
public void setContentDisposition(FormDataContentDisposition contentDisposition) { | ||
this.contentDisposition = contentDisposition; | ||
} | ||
|
||
public String getAssetPath() { | ||
return assetPath; | ||
} | ||
|
||
public void setAssetPath(String assetPath) { | ||
this.assetPath = assetPath; | ||
} | ||
|
||
public FileUploadDetail getDetail() { | ||
return detail; | ||
} | ||
|
||
public void setDetail(FileUploadDetail detail) { | ||
this.detail = detail; | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
dotCMS/src/main/java/com/dotcms/rest/api/v1/asset/FileUploadDetail.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,62 @@ | ||
package com.dotcms.rest.api.v1.asset; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class FileUploadDetail { | ||
|
||
@JsonCreator | ||
public FileUploadDetail(@JsonProperty("assetPath") final String assetPath, | ||
@JsonProperty("language") final String language, | ||
@JsonProperty("status") final String status, | ||
@JsonProperty("createNewVersion") final Boolean createNewVersion) { | ||
this.assetPath = assetPath; | ||
this.language = language; | ||
this.status = status; | ||
this.createNewVersion = createNewVersion; | ||
} | ||
|
||
@JsonProperty("assetPath") | ||
private String assetPath; | ||
|
||
@JsonProperty("language") | ||
private String language; | ||
|
||
@JsonProperty("status") | ||
private String status; | ||
|
||
@JsonProperty("createNewVersion") | ||
private Boolean createNewVersion; | ||
|
||
public String getAssetPath() { | ||
return assetPath; | ||
} | ||
|
||
public void setAssetPath(String assetPath) { | ||
this.assetPath = assetPath; | ||
} | ||
|
||
public String getLanguage() { | ||
return language; | ||
} | ||
|
||
public void setLanguage(String language) { | ||
this.language = language; | ||
} | ||
|
||
public String getStatus() { | ||
return status; | ||
} | ||
|
||
public void setStatus(String status) { | ||
this.status = status; | ||
} | ||
|
||
public Boolean getCreateNewVersion() { | ||
return createNewVersion; | ||
} | ||
|
||
public void setCreateNewVersion(Boolean createNewVersion) { | ||
this.createNewVersion = createNewVersion; | ||
} | ||
} |
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
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