portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shinsuke SUGAYA (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Resolved: (JS2-311) Header Resource component
Date Thu, 21 Jul 2005 14:02:46 GMT
     [ http://issues.apache.org/jira/browse/JS2-311?page=all ]
     
Shinsuke SUGAYA resolved JS2-311:
---------------------------------

    Fix Version: 2.0-dev/cvs
     Resolution: Fixed

> Header Resource component
> -------------------------
>
>          Key: JS2-311
>          URL: http://issues.apache.org/jira/browse/JS2-311
>      Project: Jetspeed 2
>         Type: New Feature
>   Components: Other
>     Versions: 2.0-dev/cvs
>  Environment: Linux, J2SE
>     Reporter: Shinsuke SUGAYA
>     Assignee: Shinsuke SUGAYA
>      Fix For: 2.0-dev/cvs

>
> ===============
> Header Resource
> ===============
>   Overviews:
>   ----------
>    Header Resource component allows user to add tags, such as <link> and
>    <script> tag into <head> tag. Currently, Jetspeed2 puts only decorators
>    stylesheet tag into <head> tag. But, using Header Resource Component,
>    user can put user-defined stylesheet and javascript file from portal or
>    portlet.
>   Design:
>   -------
>    i) Process to add tags to HeaderResource component
>                       --------------------------- 
>                       |JetspeedPortletServices..|
>                       --------------------------- 
>                                  |
>                                  V
>                -------------------------------------------- 
>                |o.a.j.headerresource.HeaderResourceFactory|
>                -------------------------------------------- 
>                                  | getHeaderResouce(RequestContext requestContext)
>                                  V
>                   ------------------------------------- 
>                   |o.a.j.headerresource.HeaderResource|
>                   ------------------------------------- 
>                                  A Add tag into Set for HeaderResource
>                                  | addHeaderInfo(), addJavaScript(), addStyleSheet()
>                        Tag (<link> and <script>)
>               
>    ii) Process to get tags from HeaderResource component
>                       --------------------------- 
>                       |JetspeedPortletServices..|
>                       --------------------------- 
>                                  |
>                                  V
>                -------------------------------------------- 
>                |o.a.j.headerresource.HeaderResourceFactory|
>                -------------------------------------------- 
>                                  | getHeaderResouce(RequestContext requestContext)
>                                  V
>                   ------------------------------------- 
>                   |o.a.j.headerresource.HeaderResource|
>                   ------------------------------------- 
>                                  | toString()
>                                  V
>                        Template file(ex. decorator-tom.vm)
>   Task Lists:
>   -----------
>    Added Interfaces
>    ----------------
>    o org.apache.jetspeed.headerresource.HeaderResource
>      public abstract HeaderResource getHeaderResouce(RequestContext requestContext);
>      public abstract HeaderResource getHeaderResouce(PortletRequest request);
>    o org.apache.jetspeed.headerresource.HeaderResourceFactory
>      public abstract String toString();
>      public abstract void addHeaderInfo(String elementName, Map attributes);
>      public abstract void addJavaScript(String path, boolean defer);
>      public abstract void addJavaScript(String path);
>      public abstract void addStyleSheet(String path);
>    Added Classes
>    -------------
>     components/src/java/org/apache/jetspeed/headerresource/impl/HeaderResourceFactoryImpl.java
>     components/src/java/org/apache/jetspeed/headerresource/impl/HeaderResourceImpl.java
>     - HeaderResourceImpl class creates LinkedHashSet and put it into
>       RequestContext#setAttribute(). LinkedHashSet has tags info to put
>       them into <head> tag.
>   Usage
>   -----
>    In Portal
>    ---------
>     Example:
>       HeaderResourceFactory headerResourceFactory
>            = (HeaderResourceFactory)Jetspeed.getComponentManager().getComponent(HeaderResourceFactory.class);
>       HeaderResource headerResource = headerResourceFactory.getHeaderResouce(requestContext);
>       headerResource.addStyleSheet("content/css/styles.css");
>    In Portlet
>    ----------
>     Example:
>       HeaderResourceFactory headerResourceFactory
>         = getPortletContext().getAttribute(CommonPortletServices.CPS_HEADER_RESOURCE_FACTORY);
>       HeaderResource headerResource = headerResourceFactory.getHeaderResouce(request);
>       headerResource.addJavascript("script.js");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message