Skip to content
Snippets Groups Projects
Commit be177308 authored by pkupczyk's avatar pkupczyk
Browse files

SP-48 / BIS-38: Provide access to CRC32 checksums in PathInfoDB - make it work via JSON API

SVN: 26288
parent edd08f61
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,8 @@ import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonProperty;
import ch.systemsx.cisd.base.annotation.JsonObject;
/**
......@@ -28,16 +30,17 @@ import ch.systemsx.cisd.base.annotation.JsonObject;
*
* @author Chandrasekhar Ramakrishnan
*/
@SuppressWarnings("unused")
@JsonObject("DataSetFileDTO")
public class DataSetFileDTO implements Serializable
{
private static final long serialVersionUID = 1L;
private final String dataSetCode;
private String dataSetCode;
private final String path;
private String path;
private final boolean isRecursive;
private boolean isRecursive;
public DataSetFileDTO(String dataSetCode, String path, boolean isRecursive)
{
......@@ -59,6 +62,7 @@ public class DataSetFileDTO implements Serializable
}
/** If true, this object includes sub folders */
@JsonProperty("isRecursive")
public boolean isRecursive()
{
return isRecursive;
......@@ -76,4 +80,28 @@ public class DataSetFileDTO implements Serializable
}
return sb.toString();
}
//
// JSON-RPC
//
private DataSetFileDTO()
{
}
private void setDataSetCode(String dataSetCode)
{
this.dataSetCode = dataSetCode;
}
private void setPath(String path)
{
this.path = path;
}
private void setIsRecursive(boolean isRecursive)
{
this.isRecursive = isRecursive;
}
}
......@@ -103,6 +103,7 @@ public class FileInfoDssDTO implements Serializable
* Note that the checksum will only be available when it is precomputed and available from some
* sort of database, i.e. if it is computationally "cheap" to provide the checksum.
*/
@JsonProperty("crc32Checksum")
public Integer tryGetCrc32Checksum()
{
return crc32Checksum;
......
......@@ -164,6 +164,9 @@
<constructor-arg ref="config-provider" />
</bean>
<bean id="objectMapper" class="ch.systemsx.cisd.openbis.generic.shared.api.json.GenericObjectMapper">
</bean>
<!--
// This discovers on-the-fly all <code>org.springframework.aop.Advisor</code> implementations.
-->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment