Skip to content
Snippets Groups Projects
Commit 2ae1c2b7 authored by Lucas Bertrand-Christen's avatar Lucas Bertrand-Christen
Browse files

feat:post2-dev-test-td4

parent b31f9ed0
No related branches found
No related tags found
No related merge requests found
...@@ -9,30 +9,83 @@ ...@@ -9,30 +9,83 @@
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<packaging>war</packaging> <packaging>war</packaging>
<name>The FileStore Application</name>
<developers>
<developer>
<id>beb</id>
<name>Lucas BERTRAND-CHRISTEN</name>
<email>l.b-c@hotmail.com</email>
<organization>Institut du Digital, du Management et de la Cognition</organization>
<organizationUrl>https://idmc.univ-lorraine.fr/</organizationUrl>
<roles>
<role>developer</role>
</roles>
<timezone>Europe/Paris</timezone>
</developer>
</developers>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.report.sourceEncoding>UTF-8</project.report.sourceEncoding> <project.report.sourceEncoding>UTF-8</project.report.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.release>17</maven.compiler.release> <maven.compiler.release>17</maven.compiler.release>
<jakartaee-api.version>10.0.0</jakartaee-api.version>
<wildfly.version>29.0.1.Final</wildfly.version> <path.wildfly>C:\Users\LB-C\Bureau\Logiciels\wildfly-29.0.1.Final</path.wildfly>
<compiler-plugin.version>3.11.0</compiler-plugin.version>
<war-plugin.version>3.4.0</war-plugin.version> <version.jakartaee-api>10.0.0</version.jakartaee-api>
<wildfly-plugin.version>4.2.0.Final</wildfly-plugin.version> <version.wildfly>29.0.1.Final</version.wildfly>
<version.compiler-plugin>3.11.0</version.compiler-plugin>
<version.war-plugin>3.4.0</version.war-plugin>
<version.wildfly-plugin>4.2.0.Final</version.wildfly-plugin>
<version.wildfly-bom>30.0.0.Final</version.wildfly-bom>
<version.tika>2.5.0</version.tika>
<version.apache-commons-io>2.11.0</version.apache-commons-io>
<version.apache-commons-codec>1.15</version.apache-commons-codec>
<version.freemarker>2.3.30</version.freemarker>
<version.resteasy>6.2.6.Final</version.resteasy>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>jakarta.platform</groupId> <groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId> <artifactId>jakarta.jakartaee-api</artifactId>
<version>${jakartaee-api.version}</version> <version>${version.jakartaee-api}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jboss.resteasy</groupId> <groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-multipart-provider</artifactId> <artifactId>resteasy-multipart-provider</artifactId>
<version>6.2.6.Final</version> <version>${version.resteasy}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>${version.freemarker}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${version.apache-commons-codec}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${version.apache-commons-io}</version>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>${version.tika}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.9</version> <!-- Utilisez la dernière version disponible -->
</dependency>
</dependencies> </dependencies>
<build> <build>
...@@ -41,12 +94,12 @@ ...@@ -41,12 +94,12 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version> <version>${version.compiler-plugin}</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<version>${war-plugin.version}</version> <version>${version.war-plugin}</version>
<configuration> <configuration>
<failOnMissingWebXml>false</failOnMissingWebXml> <failOnMissingWebXml>false</failOnMissingWebXml>
</configuration> </configuration>
...@@ -56,11 +109,11 @@ ...@@ -56,11 +109,11 @@
<plugin> <plugin>
<groupId>org.wildfly.plugins</groupId> <groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId> <artifactId>wildfly-maven-plugin</artifactId>
<version>${wildfly-plugin.version}</version> <version>${version.wildfly-plugin}</version>
<configuration> <configuration>
<version>${wildfly.version}</version> <version>${version.wildfly}</version>
<server-config>standalone-full.xml</server-config> <server-config>standalone-full.xml</server-config>
<jbossHome>C:\Users\LB-C\Bureau\Logiciels\wildfly-29.0.1.Final</jbossHome> <jbossHome>${path.wildfly}</jbossHome>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
......
...@@ -6,15 +6,12 @@ import java.util.ArrayList; ...@@ -6,15 +6,12 @@ import java.util.ArrayList;
public class CollectionDto<T> { public class CollectionDto<T> {
private List<T> values; private List<T> values;
private int limit; private int limit = -1;
private int offset; private int offset = -1;
private long size; private long size = -1;
public CollectionDto() { public CollectionDto() {
values = new ArrayList<>(); values = new ArrayList<>();
limit = -1;
offset = -1;
size = -1;
} }
public List<T> getValues() { public List<T> getValues() {
...@@ -25,6 +22,12 @@ public class CollectionDto<T> { ...@@ -25,6 +22,12 @@ public class CollectionDto<T> {
this.values = values; this.values = values;
} }
public void addValues(List<T> values) {
for (T value : values) {
this.values.add(value);
}
}
public int getLimit() { public int getLimit() {
return limit; return limit;
} }
......
...@@ -10,12 +10,13 @@ public class NodeDto { ...@@ -10,12 +10,13 @@ public class NodeDto {
@FormParam("name") @FormParam("name")
@PartType(MediaType.TEXT_PLAIN) @PartType(MediaType.TEXT_PLAIN)
private String name; private String name = null;
@FormParam("data") @FormParam("data")
@PartType(MediaType.APPLICATION_OCTET_STREAM) @PartType(MediaType.APPLICATION_OCTET_STREAM)
private InputStream data = null; private InputStream data = null;
public NodeDto() { public NodeDto() {
// Default constructor needed for JAX-RS
} }
public String getName() { public String getName() {
......
package fr.miage23.filestore.api.exceptions;public class IllegalArgumentExceptionMapper { package fr.miage23.filestore.api.exceptions;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.ExceptionMapper;
import jakarta.ws.rs.ext.Provider;
@Provider
public class IllegalArgumentExceptionMapper implements ExceptionMapper<IllegalArgumentException> {
@Override
public Response toResponse(IllegalArgumentException e) {
return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build();
}
} }
package fr.miage23.filestore.api.resources; package fr.miage23.filestore.api.resources;
import fr.miage23.filestore.api.dto.CreateNodeDto; import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import fr.miage23.filestore.api.dto.NodeDto;
import fr.miage23.filestore.files.FileService; import fr.miage23.filestore.files.FileService;
import fr.miage23.filestore.files.InMemoryFileServiceBean; import fr.miage23.filestore.files.InMemoryFileServiceBean;
import fr.miage23.filestore.files.entity.Node; import fr.miage23.filestore.files.entity.Node;
...@@ -8,6 +13,7 @@ import fr.miage23.filestore.files.exceptions.ContentException; ...@@ -8,6 +13,7 @@ import fr.miage23.filestore.files.exceptions.ContentException;
import fr.miage23.filestore.files.exceptions.NodeAlreadyExistsException; import fr.miage23.filestore.files.exceptions.NodeAlreadyExistsException;
import fr.miage23.filestore.files.exceptions.NodeNotFoundException; import fr.miage23.filestore.files.exceptions.NodeNotFoundException;
import fr.miage23.filestore.files.exceptions.NodeTypeException; import fr.miage23.filestore.files.exceptions.NodeTypeException;
import jakarta.validation.Valid;
import jakarta.ws.rs.*; import jakarta.ws.rs.*;
import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.MediaType;
...@@ -39,8 +45,15 @@ public class NodesResource { ...@@ -39,8 +45,15 @@ public class NodesResource {
*/ */
@GET @GET
public Response redirectToDefaultNode() { public Response redirectToDefaultNode() {
String defaultNodeUrl = uriInfo.getBaseUriBuilder().path("nodes/root").build().toString(); LOGGER.log(Level.INFO, "GET /api/nodes/root");
return Response.seeOther(URI.create(defaultNodeUrl)).build(); try {
Gson gson = new GsonBuilder()
.registerTypeAdapter(Node.Type.class, new EnumTypeAdapter())
.create();
return Response.ok(gson.toJson(service.get("root"), Node.class), MediaType.APPLICATION_JSON).build();
} catch (NodeNotFoundException e) {
return Response.status(Response.Status.NOT_FOUND).entity("Node not found.").build();
}
} }
/** /**
...@@ -48,84 +61,107 @@ public class NodesResource { ...@@ -48,84 +61,107 @@ public class NodesResource {
* *
* @param id The ID of the node to retrieve. * @param id The ID of the node to retrieve.
* @return The Node object representing the requested node. * @return The Node object representing the requested node.
* @throws NodeNotFoundException If the specified node is not found.
*/ */
@GET @GET
@Path("{id}") @Path("{id}")
@Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON}) @Produces({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON})
public Node getNode(@PathParam("id") String id) throws NodeNotFoundException { public Response getNode(@PathParam("id") String id) {
LOGGER.log(Level.INFO, "GET /api/nodes/" + id); LOGGER.log(Level.INFO, "GET /api/nodes/" + id);
return service.get(id); try{
Gson gson = new GsonBuilder()
.registerTypeAdapter(Node.Type.class, new EnumTypeAdapter())
.create();
return Response.ok(gson.toJson(service.get(id), Node.class), MediaType.APPLICATION_JSON).build();
} catch (NodeNotFoundException e) {
return Response.status(Response.Status.NOT_FOUND).entity("Node not found.").build();
}
} }
/** /**
* Creates a new node with the provided parameters. * Creates a new node with the provided parameters.
* *
* @param id The ID of the new node. * @param id The ID of the new node, input as a path parameter for a better url uses and transitions.
* @param name The name of the new node. * @param name The name of the new node.
* @param uriInfo The UriInfo object to access URI information. * @param info The UriInfo object to access URI information.
* @return Response object indicating the success of the operation. * @return Response object indicating the success or failure of the operation.
* @throws NodeNotFoundException If the specified parent node is not found.
* @throws NodeTypeException If there is an issue with the node type.
* @throws NodeAlreadyExistsException If a node with the specified ID already exists.
*/
@POST
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public Response createNode(@FormParam("id") String id, @FormParam("name") String name, @Context UriInfo uriInfo)
throws NodeNotFoundException, NodeTypeException, NodeAlreadyExistsException {
LOGGER.log(Level.INFO, "POST /api/nodes/" + id);
String newid = service.add(id, name);
return Response.created(uriInfo.getBaseUriBuilder().path(NodesResource.class).path(newid).build()).entity(newid).build();
}
/**
* Creates a new node with the provided parameters and a specified parent node ID.
*
* @param id The ID of the new node.
* @param name The name of the new node.
* @param uriInfo The UriInfo object to access URI information.
* @return Response object indicating the success of the operation.
* @throws NodeNotFoundException If the specified parent node is not found.
* @throws NodeTypeException If there is an issue with the node type.
* @throws NodeAlreadyExistsException If a node with the specified ID already exists.
*/ */
@POST @POST
@Path("{id}") @Path("{id}")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public Response createNodeWithPath(@PathParam("id") String id, @FormParam("name") String name, @Context UriInfo uriInfo) public Response createNode(@PathParam("id") String id, @FormParam("name") String name, @Context UriInfo info) {
throws NodeNotFoundException, NodeTypeException, NodeAlreadyExistsException {
LOGGER.log(Level.INFO, "POST /api/nodes/" + id); LOGGER.log(Level.INFO, "POST /api/nodes/" + id);
String newid = service.add(id, name); try {
return Response.created(uriInfo.getBaseUriBuilder().path(NodesResource.class).path(newid).build()).entity(newid).build(); String newid;
if (name != null) {
newid = service.add(id, name);
} else {
throw new IllegalArgumentException("A name must be provided");
}
Gson gson = new GsonBuilder()
.registerTypeAdapter(Node.Type.class, new EnumTypeAdapter())
.create();
return Response.ok(gson.toJson(service.get(newid), Node.class), MediaType.APPLICATION_JSON).build();
} catch (IllegalArgumentException e) {
// Transform the IllegalArgumentException into a 400 Bad Request response
return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build();
} catch (NodeNotFoundException e) {
return Response.status(Response.Status.NOT_FOUND).entity("Node not found.").build();
} catch (NodeTypeException | NodeAlreadyExistsException e) {
// Handle other exceptions as needed, possibly transforming them into different HTTP responses
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("An unexpected error occurred.").build();
}
} }
/** /**
* Creates a new node with the provided parameters and optionally uploads content. * Creates a new node with the provided parameters and optionally uploads content.
* *
* @param id The ID of the new node. * @param id The ID of the new node.
* @param dto The CreateNodeDto containing information about the new node. * @param dto The CreateNodeDto (DTO = Data Transfer Object) containing information about the new node.
* @param info The UriInfo object to access URI information. * @param info The UriInfo object to access URI information.
* @return Response object indicating the success of the operation. * @return Response object indicating the success or failure of the operation.
* @throws NodeNotFoundException If the specified parent node is not found.
* @throws NodeTypeException If there is an issue with the node type.
* @throws NodeAlreadyExistsException If a node with the specified ID already exists.
* @throws ContentException If there is an issue with the content.
* @throws IOException If an I/O error occurs.
*/ */
@POST @POST
@Path("{id}") @Path("{id}")
@Produces(MediaType.TEXT_HTML) @Produces(MediaType.TEXT_HTML)
@Consumes(MediaType.MULTIPART_FORM_DATA) @Consumes(MediaType.MULTIPART_FORM_DATA)
public Response createView(@PathParam("id") final String id, @MultipartForm CreateNodeDto dto, @Context UriInfo info) public Response createView(@PathParam("id") final String id, @MultipartForm @Valid NodeDto dto, @Context UriInfo info) {
throws NodeNotFoundException, NodeTypeException, NodeAlreadyExistsException, ContentException, IOException {
LOGGER.log(Level.INFO, "POST /api/nodes/" + id + " (html)"); LOGGER.log(Level.INFO, "POST /api/nodes/" + id + " (html)");
if (dto.getData() != null) { try {
service.add(id, dto.getName(), dto.getData()); String newid;
} else { if (dto.getName() != null && dto.getData() != null){
service.add(id, dto.getName()); newid = service.add(id, dto.getName(), dto.getData());
} else if (dto.getName() != null){
newid = service.add(id, dto.getName());
} else {
throw new IllegalArgumentException("A name must be provided");
}
Gson gson = new GsonBuilder()
.registerTypeAdapter(Node.Type.class, new EnumTypeAdapter())
.create();
return Response.ok(gson.toJson(service.get(newid), Node.class), MediaType.APPLICATION_JSON).build();
} catch (IllegalArgumentException e) {
// Transform the IllegalArgumentException into a 400 Bad Request response
return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build();
} catch (NodeNotFoundException e) {
return Response.status(Response.Status.NOT_FOUND).entity("Node not found.").build();
} catch (NodeTypeException | NodeAlreadyExistsException | ContentException e) {
// Handle other exceptions as needed, possibly transforming them into different HTTP responses
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("An unexpected error occurred.").build();
} }
URI createdUri = info.getBaseUriBuilder().path(NodesResource.class).path(id).path("content").build();
return Response.seeOther(createdUri).build();
} }
// Classe EnumTypeAdapter pour la gestion de la sérialisation/désérialisation de l'énumération Node.Type
private static class EnumTypeAdapter extends TypeAdapter<Node.Type> {
@Override
public void write(JsonWriter out, Node.Type value) throws IOException {
out.value(value.name());
}
@Override
public Node.Type read(JsonReader in) throws IOException {
return Node.Type.valueOf(in.nextString());
}
}
} }
...@@ -21,21 +21,45 @@ import java.util.Optional; ...@@ -21,21 +21,45 @@ import java.util.Optional;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
/**
* TemplateBodyWriter is a JAX-RS MessageBodyWriter responsible for processing instances of TemplateContent
* and rendering them as HTML using FreeMarker templates.
*
* The class is annotated with @Provider to indicate that it provides a service component for JAX-RS.
* It handles the production of HTML content with the specified media type TEXT_HTML.
*
* The TemplateBodyWriter utilizes FreeMarker for template processing. It loads templates from the "templates"
* directory using the class loader and renders them using the FreeMarker engine.
*/
@Provider @Provider
@Produces(MediaType.TEXT_HTML) @Produces(MediaType.TEXT_HTML)
public class TemplateBodyWriter implements MessageBodyWriter<TemplateContent> { public class TemplateBodyWriter implements MessageBodyWriter<TemplateContent> {
private static final Logger LOGGER = Logger.getLogger(TemplateBodyWriter.class.getName()); private static final Logger LOGGER = Logger.getLogger(TemplateBodyWriter.class.getName());
// FreeMarker configuration for template processing
private static final Configuration cfg = new Configuration(Configuration.VERSION_2_3_28); private static final Configuration cfg = new Configuration(Configuration.VERSION_2_3_28);
// Initialization block for configuring FreeMarker
{ {
cfg.setClassLoaderForTemplateLoading(TemplateBodyWriter.class.getClassLoader(), "templates"); cfg.setClassLoaderForTemplateLoading(TemplateBodyWriter.class.getClassLoader(), "templates");
cfg.setDefaultEncoding("UTF-8"); cfg.setDefaultEncoding("UTF-8");
cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER); cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
} }
/**
* Checks if the given type is writable by this MessageBodyWriter.
*
* @param type the class type
* @param genericType the generic type
* @param annotations array of annotations associated with the message body writer
* @param mediaType the media type of the data that will be written
* @return true if the type is writable, false otherwise
*/
@Override @Override
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) { public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
if ( annotations != null ) { if (annotations != null) {
// Check if the Template annotation is present
if (Arrays.stream(annotations).anyMatch(a -> a.annotationType().equals(Template.class))) { if (Arrays.stream(annotations).anyMatch(a -> a.annotationType().equals(Template.class))) {
LOGGER.log(Level.INFO, "Method contains template annotation"); LOGGER.log(Level.INFO, "Method contains template annotation");
return true; return true;
...@@ -44,29 +68,61 @@ public class TemplateBodyWriter implements MessageBodyWriter<TemplateContent> { ...@@ -44,29 +68,61 @@ public class TemplateBodyWriter implements MessageBodyWriter<TemplateContent> {
return false; return false;
} }
/**
* Get the size of the entity.
*
* @param model the instance to write
* @param type the class type
* @param genericType the generic type
* @param annotations array of annotations associated with the message body writer
* @param mediaType the media type of the data that will be written
* @return -1 to indicate that the size is unknown or not applicable
*/
@Override @Override
public long getSize(TemplateContent model, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) { public long getSize(TemplateContent model, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
return -1; return -1;
} }
/**
* Write a type to an HTTP response.
*
* @param model the instance to write
* @param type the class type
* @param genericType the generic type
* @param annotations array of annotations associated with the message body writer
* @param mediaType the media type of the data that will be written
* @param httpHeaders a map of the response headers
* @param entityStream the OutputStream for the response entity
* @throws IOException if an I/O exception occurs
* @throws WebApplicationException if a specific HTTP error response needs to be produced
*/
@Override @Override
public void writeTo(TemplateContent model, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException { public void writeTo(TemplateContent model, Class<?> type, Type genericType, Annotation[] annotations,
MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream)
throws IOException, WebApplicationException {
LOGGER.log(Level.INFO, "Template writing"); LOGGER.log(Level.INFO, "Template writing");
try { try {
Optional<Annotation> annotation = Arrays.stream(annotations).filter(a -> a.annotationType().equals(Template.class)).findFirst(); // Find the Template annotation
Optional<Annotation> annotation = Arrays.stream(annotations)
.filter(a -> a.annotationType().equals(Template.class)).findFirst();
if (annotation.isPresent()) { if (annotation.isPresent()) {
String name = ((Template) annotation.get()).name(); String name = ((Template) annotation.get()).name();
LOGGER.log(Level.FINE, "Applying template: " + name); LOGGER.log(Level.FINE, "Applying template: " + name);
LOGGER.log(Level.FINE, "using model: " + model); LOGGER.log(Level.FINE, "using model: " + model);
// Process the FreeMarker template
freemarker.template.Template temp = cfg.getTemplate(name + ".ftl", Locale.getDefault()); freemarker.template.Template temp = cfg.getTemplate(name + ".ftl", Locale.getDefault());
StringWriter out = new StringWriter(); StringWriter out = new StringWriter();
temp.process(model, out); temp.process(model, out);
// Write the processed template to the output stream
entityStream.write(out.toString().getBytes()); entityStream.write(out.toString().getBytes());
} else { } else {
throw new WebApplicationException("Template annotation not found."); throw new WebApplicationException("Template annotation not found.");
} }
} catch ( TemplateException e ) { } catch (TemplateException e) {
throw new WebApplicationException(e); throw new WebApplicationException(e);
} }
} }
} }
\ No newline at end of file
...@@ -149,22 +149,6 @@ public class Node implements Comparable<Node>, Serializable { ...@@ -149,22 +149,6 @@ public class Node implements Comparable<Node>, Serializable {
return Objects.hash(type, id, name, content, mimetype, creation, modification); return Objects.hash(type, id, name, content, mimetype, creation, modification);
} }
@Override
public String toString() {
return "Node{" +
"type=" + type +
", id='" + id + '\'' +
", version=" + version +
", parent='" + parent + '\'' +
", name='" + name + '\'' +
", mimetype='" + mimetype + '\'' +
", size=" + size +
", creation=" + creation +
", modification=" + modification +
", content='" + content + '\'' +
'}';
}
public static class NameComparatorAsc implements Comparator<Node> { public static class NameComparatorAsc implements Comparator<Node> {
@Override @Override
public int compare(Node o1, Node o2) { public int compare(Node o1, Node o2) {
......
invalid.filename=The filename contains forbidden characters invalid.filename_FR=Le nom du fichier contient des caractres interdits
\ No newline at end of file invalid.filename_EN=The filename contains forbidden characters
invalid.filename_ES=El nombre del archivo contiene caracteres no permitidos
invalid.filename_DE=Der Dateiname enthlt unzulssige Zeichen
invalid.filename_IT=Il nome del file contiene caratteri non consentiti
invalid.filename_NL=De bestandsnaam bevat verboden tekens
invalid.filename_PT=O nome do arquivo contm caracteres proibidos
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment