Jetspeed 2
  1. Jetspeed 2
  2. JS2-351

fallback profiling rule for multiple devices

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Incomplete
    • Affects Version/s: 2.0-dev/cvs
    • Fix Version/s: 2.2.1
    • Labels:
      None
    • Environment:
      J2SE 1.4.2 on Linux

      Description

      The current j2 profiling rule is mediatype -> group.role.user. In this rule, for example, using mobile phone as browser, the page which should not be displayed is displayed. So, new j2 profiling rule or other solution are needed for multiple device support.

      1. genapp_type.patch
        4 kB
        Shinsuke Sugaya

        Activity

        Hide
        Ate Douma added a comment -

        Shinsuke I'm resolving this issue now as incomplete. If you want to pick it up again sometime later you can always reopen it again.

        Show
        Ate Douma added a comment - Shinsuke I'm resolving this issue now as incomplete. If you want to pick it up again sometime later you can always reopen it again.
        Hide
        Ate Douma added a comment -

        Shinsuke, please provide more input what you'd like to do with this issue.
        I'm downgrading it (for now) to minor until there is a better view on what we should do with this one (if at all).

        Show
        Ate Douma added a comment - Shinsuke, please provide more input what you'd like to do with this issue. I'm downgrading it (for now) to minor until there is a better view on what we should do with this one (if at all).
        Hide
        Shinsuke Sugaya added a comment -

        We may need more discussion.. I summarized the option:

        [ ] Change existing PSML structure and j2 profiling rule(ex. the above Option 1)
        [ ] Switch portal type in j2:portal.genapp goal(apply genapp_type.patch)
        [ ] Others?

        Please provide your vote/opinion.

        Show
        Shinsuke Sugaya added a comment - We may need more discussion.. I summarized the option: [ ] Change existing PSML structure and j2 profiling rule(ex. the above Option 1) [ ] Switch portal type in j2:portal.genapp goal(apply genapp_type.patch) [ ] Others? Please provide your vote/opinion.
        Hide
        David Sean Taylor added a comment -

        I'd prefer to have the same site handle all media types.
        Thats a basic function of a portal
        I dont want to have to swap my site configuration just to add a new device type
        Anyway its just a demo site

        Show
        David Sean Taylor added a comment - I'd prefer to have the same site handle all media types. Thats a basic function of a portal I dont want to have to swap my site configuration just to add a new device type Anyway its just a demo site
        Hide
        Shinsuke Sugaya added a comment -

        Attached patch to support separate PSML, SQL, decorations files.

        Changes by this fix

        • Add org.apache.jetspeed.portal.genapp.type property to specify the portal
          type. Currently, J2 has j2:portal.genapp and j2:portal.genapp.minimal goal
          to switch the portal type. With this fix, J2 calls j2:portal.genapp with
          org.apache.jetspeed.portal.genapp.type. (I'll add standard, minimal and
          mobile as the property value.)
        • Change the directory structure as below:

        o decorations, pages and templates directoris in src/webapp/WEB-INF/ are
        moved to:

        src/resources
        src/resources/standard
        src/resources/standard/decorations
        src/resources/standard/pages
        src/resources/standard/templates
        src/resources/minimal
        src/resources/minimal/decorations
        src/resources/minimal/pages
        src/resources/minimal/templates
        src/resources/mobile
        src/resources/mobile/decorations
        src/resources/mobile/pages
        src/resources/mobile/templates

        o files and directories in etc/sql is moved to:

        etc/sql/standard
        etc/sql/minimal
        etc/sql/mobile

        Any comments/suggestions are highly appreciated.

        Show
        Shinsuke Sugaya added a comment - Attached patch to support separate PSML, SQL, decorations files. Changes by this fix Add org.apache.jetspeed.portal.genapp.type property to specify the portal type. Currently, J2 has j2:portal.genapp and j2:portal.genapp.minimal goal to switch the portal type. With this fix, J2 calls j2:portal.genapp with org.apache.jetspeed.portal.genapp.type. (I'll add standard, minimal and mobile as the property value.) Change the directory structure as below: o decorations, pages and templates directoris in src/webapp/WEB-INF/ are moved to: src/resources src/resources/standard src/resources/standard/decorations src/resources/standard/pages src/resources/standard/templates src/resources/minimal src/resources/minimal/decorations src/resources/minimal/pages src/resources/minimal/templates src/resources/mobile src/resources/mobile/decorations src/resources/mobile/pages src/resources/mobile/templates o files and directories in etc/sql is moved to: etc/sql/standard etc/sql/minimal etc/sql/mobile Any comments/suggestions are highly appreciated.
        Hide
        Shinsuke Sugaya added a comment -

        I think it would be great if maven plugin supports it. In the current implementation, the plugin supports only psml files. So, I think plugin.jelly and some directory structure need to be changed. Anyway I'll look into it.

        Show
        Shinsuke Sugaya added a comment - I think it would be great if maven plugin supports it. In the current implementation, the plugin supports only psml files. So, I think plugin.jelly and some directory structure need to be changed. Anyway I'll look into it.
        Hide
        Randy Watler added a comment -

        I understand the desire to have J2 work out of the box for mobile devices, but I fear that further complicating the existing demo and PSML layout is not desirable. Instead, I wonder if it makes more sense to build a new site to clearly demo the mobile configurations? I'd like to propose that we use the new plugin gen-app to build different demo portals to meet our needs heading into a final release.

        IMO, the existing demo site/portlet suite needs to be simplified and we should build a simple site to mirror the base configuration we expect to be most common for typical web users. We could also strip down some of the portlet wars we package in this configuration. We should then build a new dedicated demo-mobile site without restriction, using the profiling rules proposed above with complete PSML content to match. Finally, we should have a demo-full site that includes everything that one could imagine... similar to what we have now for those searching for an example of a bridge or a cool new decorator.

        The only possible functional issue I see here is that we might have to make the gen-app plugin smart enough to support different SQL, PSML, and possibly decorator resources... but it does this already, no? Is this too difficult to consider for reasons I have not thought of?

        Show
        Randy Watler added a comment - I understand the desire to have J2 work out of the box for mobile devices, but I fear that further complicating the existing demo and PSML layout is not desirable. Instead, I wonder if it makes more sense to build a new site to clearly demo the mobile configurations? I'd like to propose that we use the new plugin gen-app to build different demo portals to meet our needs heading into a final release. IMO, the existing demo site/portlet suite needs to be simplified and we should build a simple site to mirror the base configuration we expect to be most common for typical web users. We could also strip down some of the portlet wars we package in this configuration. We should then build a new dedicated demo-mobile site without restriction, using the profiling rules proposed above with complete PSML content to match. Finally, we should have a demo-full site that includes everything that one could imagine... similar to what we have now for those searching for an example of a bridge or a cool new decorator. The only possible functional issue I see here is that we might have to make the gen-app plugin smart enough to support different SQL, PSML, and possibly decorator resources... but it does this already, no? Is this too difficult to consider for reasons I have not thought of?
        Hide
        Shinsuke Sugaya added a comment -

        Summarized some options to fix this issue. My +1 is Option 2. Because the
        change is minimum, and I do not think it affects an existing system.

        Option 1: j2 profiling rule is changed to mediatype base rule

        • psml files are moved from / to /_mediatype/XXX folders
        • j2 profiling rule is:

        insert into RULE_CRITERION values (18, 'j2', 0, 'path.session', 'page', 'default-page', 0);
        insert into RULE_CRITERION values (19, 'j2', 2, 'group.role.user', 'user', null, 0);
        insert into RULE_CRITERION values (20, 'j2', 1, 'mediatype', 'mediatype', null, 0);

        Option 2: add j2-ext profiling rule which has mediatype rule and apply it
        to only guest

        • existing psml files are not moved
        • j2 profiling rule is(it does not have mediatype rule):

        insert into RULE_CRITERION values (18, 'j2', 0, 'path.session', 'page', 'default-page', 0);
        insert into RULE_CRITERION values (19, 'j2', 1, 'group.role.user', 'user', null, 0);

        • add j2-ext profiling rule. j2-ext profiling rule is:

        insert into RULE_CRITERION values (20, 'j2-ext', 0, 'path.session', 'page', 'default-page', 0);
        insert into RULE_CRITERION values (21, 'j2-ext', 1, 'group.role.user', 'user', null, 0);
        insert into RULE_CRITERION values (22, 'j2-ext', 2, 'mediatype', 'mediatype', null, 0);

        • apply j2-ext to only "guest" user(and also add "mobile" user for demo,
          which has j2-ext profiling rule).
        • do not apply j2-ext to others, such as admin, tomcat..

        Option 3: add j2-ext profiling rule which has mediatype base rule and apply
        it to only guest

        • Basically, same as Option 2. The difference is j2-ext profiling rule and
          the psml file location. The rule is:

        insert into RULE_CRITERION values (20, 'j2-ext', 0, 'path.session', 'page', 'default-page', 0);
        insert into RULE_CRITERION values (21, 'j2-ext', 2, 'group.role.user', 'user', null, 0);
        insert into RULE_CRITERION values (22, 'j2-ext', 1, 'mediatype', 'mediatype', null, 0);

        • psml files for "guest" are moved to /_mediatype/html and
          /_mediatype/xhtml-basic.

        Option 4: Others

        • If you have other solutions, please add it.
        Show
        Shinsuke Sugaya added a comment - Summarized some options to fix this issue. My +1 is Option 2. Because the change is minimum, and I do not think it affects an existing system. Option 1: j2 profiling rule is changed to mediatype base rule psml files are moved from / to /_mediatype/XXX folders j2 profiling rule is: insert into RULE_CRITERION values (18, 'j2', 0, 'path.session', 'page', 'default-page', 0); insert into RULE_CRITERION values (19, 'j2', 2, 'group.role.user', 'user', null, 0); insert into RULE_CRITERION values (20, 'j2', 1, 'mediatype', 'mediatype', null, 0); Option 2: add j2-ext profiling rule which has mediatype rule and apply it to only guest existing psml files are not moved j2 profiling rule is(it does not have mediatype rule): insert into RULE_CRITERION values (18, 'j2', 0, 'path.session', 'page', 'default-page', 0); insert into RULE_CRITERION values (19, 'j2', 1, 'group.role.user', 'user', null, 0); add j2-ext profiling rule. j2-ext profiling rule is: insert into RULE_CRITERION values (20, 'j2-ext', 0, 'path.session', 'page', 'default-page', 0); insert into RULE_CRITERION values (21, 'j2-ext', 1, 'group.role.user', 'user', null, 0); insert into RULE_CRITERION values (22, 'j2-ext', 2, 'mediatype', 'mediatype', null, 0); apply j2-ext to only "guest" user(and also add "mobile" user for demo, which has j2-ext profiling rule). do not apply j2-ext to others, such as admin, tomcat.. Option 3: add j2-ext profiling rule which has mediatype base rule and apply it to only guest Basically, same as Option 2. The difference is j2-ext profiling rule and the psml file location. The rule is: insert into RULE_CRITERION values (20, 'j2-ext', 0, 'path.session', 'page', 'default-page', 0); insert into RULE_CRITERION values (21, 'j2-ext', 2, 'group.role.user', 'user', null, 0); insert into RULE_CRITERION values (22, 'j2-ext', 1, 'mediatype', 'mediatype', null, 0); psml files for "guest" are moved to /_mediatype/html and /_mediatype/xhtml-basic. Option 4: Others If you have other solutions, please add it.

          People

          • Assignee:
            Unassigned
            Reporter:
            Shinsuke Sugaya
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development