Details

      Description

      Subpages should be supported.

      (This might need to be pushed to 3.1 due to the workload, but 3.0 should at least be designed so that it does not prevent this to be implemented.)

      Attachments are already a kind of subpages, so once JCR unifies content handling, this should be rather trivial.

        Activity

        Janne Jalkanen made changes -
        Field Original Value New Value
        Remaining Estimate 0h [ 0 ]
        Assignee Janne Jalkanen [ jalkanen ]
        Original Estimate 0h [ 0 ]
        Hide
        Janne Jalkanen added a comment -

        On the other hand, since the JCR interface is based around Strings, there will be a need to convert back and forth anyway.

        They would certainly make parsing easier... And we could still keep WikiPage.getName() (to return a String), while the internal core would use WikiPage.getPath().

        Though care must be taken to make sure that we don't mix Wiki paths and JCR paths in the developer's mind - JCR paths are internal to the system.

        public class WikiPath
        {
            /** Constructs a WikiPath from a full string */
            public WikiPath( String path );
        
            /** Resolves a Wikipath relative to a current path.  For example, if currPath = "MyWiki:Foo", 
            * and path = "Bar" returns "MyWiki:Bar".  If path = "/Bar" returns "MyWiki:Foo/Bar".
            */
            public WikiPath resolve( WikiPath currPath, String path );
        
            /** Resolves a path with respect to the current context */
            public WikiPath resolve( WikiContext context, String path );
        
            /** Returns the WikiPath as a full path ("MyWiki:MainPage/SubPage") */
            public String toString();
        }
        
        Show
        Janne Jalkanen added a comment - On the other hand, since the JCR interface is based around Strings, there will be a need to convert back and forth anyway. They would certainly make parsing easier... And we could still keep WikiPage.getName() (to return a String), while the internal core would use WikiPage.getPath(). Though care must be taken to make sure that we don't mix Wiki paths and JCR paths in the developer's mind - JCR paths are internal to the system. public class WikiPath { /** Constructs a WikiPath from a full string */ public WikiPath( String path ); /** Resolves a Wikipath relative to a current path. For example, if currPath = "MyWiki:Foo" , * and path = "Bar" returns "MyWiki:Bar" . If path = "/Bar" returns "MyWiki:Foo/Bar" . */ public WikiPath resolve( WikiPath currPath, String path ); /** Resolves a path with respect to the current context */ public WikiPath resolve( WikiContext context, String path ); /** Returns the WikiPath as a full path ( "MyWiki:MainPage/SubPage" ) */ public String toString(); }
        Hide
        Andrew Jaquith added a comment -

        We should probably have a path-like class, and a factory class that creates them for supplied strings. This would allow caching, which is a good thing.

        For access-control purposes (calculating whether one permission implies another, for example), paths will be essential. I'm sure other features in JSPWiki 3 would benefit from them too.

        Show
        Andrew Jaquith added a comment - We should probably have a path-like class, and a factory class that creates them for supplied strings. This would allow caching, which is a good thing. For access-control purposes (calculating whether one permission implies another, for example), paths will be essential. I'm sure other features in JSPWiki 3 would benefit from them too.
        Hide
        Janne Jalkanen added a comment -

        Yup, all the APIs that currently take in a page name as a string will need to start accepting paths.

        Opinions: should we use an actual Path-like structure (like a WikiPath class) or just Strings?

        Show
        Janne Jalkanen added a comment - Yup, all the APIs that currently take in a page name as a string will need to start accepting paths. Opinions: should we use an actual Path-like structure (like a WikiPath class) or just Strings?
        Hide
        Andrew Jaquith added a comment -

        This will require some extensions to the Permission classes, because they do not at the moment support nested page syntax (e.g., path-like structures).

        Show
        Andrew Jaquith added a comment - This will require some extensions to the Permission classes, because they do not at the moment support nested page syntax (e.g., path-like structures).
        Janne Jalkanen created issue -

          People

          • Assignee:
            Janne Jalkanen
            Reporter:
            Janne Jalkanen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development