Skip to content

Commit 8063000

Browse files
committed
Fixes tests.
1 parent 6caff36 commit 8063000

File tree

6 files changed

+18
-10
lines changed

6 files changed

+18
-10
lines changed

structr-base/src/main/java/org/structr/web/entity/AbstractFile.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.structr.api.schema.JsonSchema;
2727
import org.structr.common.PropertyView;
2828
import org.structr.common.SecurityContext;
29+
import org.structr.common.View;
2930
import org.structr.common.error.ErrorBuffer;
3031
import org.structr.common.error.FrameworkException;
3132
import org.structr.common.error.SemanticErrorToken;
@@ -61,6 +62,8 @@ public interface AbstractFile extends NodeInterface {
6162
Property<Folder> parentProperty = new StartNode<>("parent", FolderCONTAINSAbstractFile.class).partOfBuiltInSchema();
6263
Property<String> parentIdProperty = new EntityIdProperty("parentId", AbstractFile.parentProperty).format("parent, {},").partOfBuiltInSchema();
6364

65+
View uiView = new View(AbstractFile.class, PropertyView.Ui, parentProperty, storageConfigurationProperty);
66+
6467
static class Impl { static {
6568

6669
final JsonSchema schema = SchemaService.getDynamicSchema();

structr-base/src/main/java/org/structr/web/entity/File.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public interface File extends AbstractFile, Indexable, Linkable, JavaScriptSourc
9090

9191
Property<Folder> fileParentProperty = new StartNode<>("fileParent", FolderCONTAINSFile.class).partOfBuiltInSchema();
9292

93+
9394
static class Impl { static {
9495

9596
final JsonSchema schema = SchemaService.getDynamicSchema();

structr-base/src/main/java/org/structr/web/entity/Folder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
import org.structr.api.schema.JsonObjectType;
2222
import org.structr.api.schema.JsonSchema;
2323
import org.structr.api.util.Iterables;
24-
import org.structr.common.ConstantBooleanTrue;
25-
import org.structr.common.ContextAwareEntity;
26-
import org.structr.common.PropertyView;
27-
import org.structr.common.SecurityContext;
24+
import org.structr.common.*;
2825
import org.structr.common.error.ErrorBuffer;
2926
import org.structr.common.error.FrameworkException;
3027
import org.structr.core.Services;
@@ -48,6 +45,9 @@ public interface Folder extends AbstractFile, ContextAwareEntity {
4845
Property<User> homeFolderOfUserProperty = new StartNode<>("homeFolderOfUser", UserHOME_DIRFolder.class).partOfBuiltInSchema();
4946
Property<Iterable<User>> workFolderOfUsersProperty = new StartNodes<>("workFolderOfUsers", UserWORKING_DIRFolder.class).partOfBuiltInSchema();
5047

48+
View defaultView = new View(Folder.class, PropertyView.Public, filesProperty, foldersProperty, parentIdProperty);
49+
View uiView = new View(Folder.class, PropertyView.Ui, filesProperty, foldersProperty, imagesProperty);
50+
5151
static class Impl { static {
5252

5353
final JsonSchema schema = SchemaService.getDynamicSchema();

structr-base/src/main/java/org/structr/web/entity/Image.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@
2626
import org.structr.api.schema.JsonObjectType;
2727
import org.structr.api.schema.JsonSchema;
2828
import org.structr.api.schema.JsonSchema.Cascade;
29-
import org.structr.common.ConstantBooleanTrue;
30-
import org.structr.common.Permission;
31-
import org.structr.common.PropertyView;
32-
import org.structr.common.SecurityContext;
29+
import org.structr.common.*;
3330
import org.structr.common.error.ErrorBuffer;
3431
import org.structr.common.error.FrameworkException;
3532
import org.structr.core.app.App;
@@ -64,6 +61,9 @@ public interface Image extends File {
6461
Property<Iterable<Image>> thumbnailsProperty = new EndNodes<>("thumbnails", ImageTHUMBNAILImage.class).partOfBuiltInSchema();
6562
Property<Image> originalImageProperty = new StartNode<>("originalImage", ImageTHUMBNAILImage.class).partOfBuiltInSchema();
6663

64+
View publicView = new View(Image.class, PropertyView.Public, parentProperty);
65+
View uiView = new View(Image.class, PropertyView.Ui, parentProperty);
66+
6767
final static String STRUCTR_THUMBNAIL_FOLDER = "._structr_thumbnails/";
6868

6969
static class Impl { static {

structr-modules/structr-media-module/src/main/java/org/structr/media/VideoFile.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.structr.common.ConstantBooleanTrue;
2626
import org.structr.common.PropertyView;
2727
import org.structr.common.SecurityContext;
28+
import org.structr.common.View;
2829
import org.structr.common.error.FrameworkException;
2930
import org.structr.core.GraphObjectMap;
3031
import org.structr.core.JsonInput;
@@ -53,6 +54,9 @@ public interface VideoFile extends File {
5354
Property<Image> posterImageProperty = new EndNode<>("posterImage", VideoFileHAS_POSTER_IMAGEImage.class).partOfBuiltInSchema();
5455
Property<VideoFile> originalVideoProperty = new StartNode<>("originalVideo", VideoFileHAS_CONVERTED_VIDEOVideoFile.class).partOfBuiltInSchema();
5556

57+
View defaultView = new View(VideoFile.class, PropertyView.Public, convertedVideosProperty, parentProperty, posterImageProperty);
58+
View uiView = new View(VideoFile.class, PropertyView.Ui, convertedVideosProperty, originalVideoProperty, posterImageProperty);
59+
5660
static class Impl { static {
5761

5862
final JsonSchema schema = SchemaService.getDynamicSchema();

structr-ui/src/test/java/org/structr/test/console/ConsoleTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ public void testRebuildCommand() {
151151

152152
final Console console = new Console(securityContext, ConsoleMode.JavaScript, Collections.emptyMap());
153153

154-
final int nodeCount = 205;
155-
final int relCount = 321;
154+
final int nodeCount = 197;
155+
final int relCount = 307;
156156
final int resourceAccessCount = 0;
157157

158158
final String fullIndexRebuildOutput =

0 commit comments

Comments
 (0)