Skip to content

Commit

Permalink
#24738 adding doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fabrizzio-dotCMS committed Jun 22, 2023
1 parent cf1b8a4 commit d3c58a9
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.immutables.value.Value;

/**
* File Upload Params is a json representation of a file upload request
*/
@Value.Style(typeImmutable="*", typeAbstract="Abstract*")
@Value.Immutable
@JsonDeserialize(as = FileUploadParamsJson.Builder.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
import javax.annotation.Nullable;
import org.immutables.value.Value;

/**
* Folder And Asset is a json representation of a folder and asset
*/
@Value.Style(typeImmutable="*", typeAbstract="Abstract*")
@Value.Immutable
@JsonDeserialize(as = FolderAndAsset.Builder.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
import javax.annotation.Nullable;
import org.immutables.value.Value;

/**
* Resolved Asset And Path is a json representation of a resolved asset and path
*/
@Value.Style(typeImmutable="*", typeAbstract="Abstract*")
@Value.Immutable
@JsonDeserialize(as = ResolvedAssetAndPath.Builder.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;

/**
* Assets Request Form is a json representation of a request to get assets
*/
public class FileUploadData {

@FormDataParam("file")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* File Upload Detail is a json representation of a file upload request
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class FileUploadDetail {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,15 @@ void disposeTempFile(final DotTempFile tempFile){
}
}

/**
* checkin or publish the given contentlet
* @param checkout
* @param user
* @param live
* @return
* @throws DotDataException
* @throws DotSecurityException
*/
Contentlet checkinOrPublish(final Contentlet checkout, User user, final boolean live) throws DotDataException, DotSecurityException {
if(live){
contentletAPI.publish(checkout, user, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.dotmarketing.exception.DotSecurityException;
import com.dotmarketing.util.Logger;
import com.liferay.portal.model.User;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.io.File;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
Expand All @@ -32,6 +33,7 @@
* <p> An Asset is a File or Folder </p>
*/
@Path("/v1/assets")
@Tag(name = "Web Assets")
public class WebAssetResource {

private final WebAssetHelper helper = WebAssetHelper.newInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
import java.util.Map;
import org.immutables.value.Value;

/**
* Asset View is a json representation of an asset
*/
@Value.Style(typeImmutable="*", typeAbstract="Abstract*")
@Value.Immutable
@JsonDeserialize(as = AssetView.Builder.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
import javax.annotation.Nullable;
import org.immutables.value.Value;

/**
* Delete Asset View is a json representation of a delete asset request
*/
@Value.Style(typeImmutable="*", typeAbstract="Abstract*")
@Value.Immutable
@JsonDeserialize(as = DeleteAssetView.Builder.class)
Expand Down

0 comments on commit d3c58a9

Please sign in to comment.