Skip to content
Snippets Groups Projects

Immutable

Merged Nicola Fulvio Calabria requested to merge immutable into master
5 files
+ 151
43
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -257,6 +257,7 @@ public class NodeDAO {
+ "n.creator_id <> ?) AS is_permission_denied,\n"
+ "n.type = 'container' AS is_container,\n"
+ "n.job_id IS NOT NULL AS busy_state\n"
+ "n.immutable AS is_immutable\n"
+ "FROM node n \n"
+ "LEFT JOIN location loc ON loc.location_id = n.location_id\n"
+ "WHERE n.node_id = id_from_vos_path(?)\n";
@@ -286,8 +287,9 @@ public class NodeDAO {
Boolean isBusy = rs.getBoolean("busy_state");
Boolean isPermissionDenied = rs.getBoolean("is_permission_denied");
Boolean isSticky = rs.getBoolean("is_sticky");
Boolean isImmutable = rs.getBoolean("is_immutable");
ShortNodeDescriptor result = new ShortNodeDescriptor(nodePath, isContainer, isWritable, isBusy, isPermissionDenied, isSticky);
ShortNodeDescriptor result = new ShortNodeDescriptor(nodePath, isContainer, isWritable, isBusy, isPermissionDenied, isSticky, isImmutable);
return Optional.of(result);
});
@@ -766,14 +768,16 @@ public class NodeDAO {
private final boolean busy;
private final boolean permissionDenied;
private final boolean sticky;
private final boolean immutable;
public ShortNodeDescriptor(String nodeLtreePath, boolean container, boolean writable, boolean busy, boolean permissionDenied, boolean sticky) {
public ShortNodeDescriptor(String nodeLtreePath, boolean container, boolean writable, boolean busy, boolean permissionDenied, boolean sticky, boolean immutable) {
this.nodeLtreePath = nodeLtreePath;
this.container = container;
this.writable = writable;
this.busy = busy;
this.permissionDenied = permissionDenied;
this.sticky = sticky;
this.immutable = immutable;
}
public String getDestinationNodeLtreePath() {
@@ -784,6 +788,10 @@ public class NodeDAO {
return container;
}
public boolean isImmutable() {
return immutable;
}
public boolean isWritable() {
return writable;
}
Loading