ate         2005/04/21 00:52:15

  Modified:    portal/src/java/org/apache/jetspeed/container/url/impl
                        AbstractPortalURL.java
               jetspeed-api/src/java/org/apache/jetspeed/container/url
                        PortalURL.java
  Log:
  Enhanced PortalURL interface with getPageBasePath() and isSecure() methods.
  Although this is a jetspeed-api interface change, it should have no impact on 
custom implementations
  as long as these are based (extend) AbstractPortalURL which provides 
implementations of these methods.
  
  Revision  Changes    Path
  1.13      +22 -1     
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java
  
  Index: AbstractPortalURL.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AbstractPortalURL.java    17 Oct 2004 14:02:38 -0000      1.12
  +++ AbstractPortalURL.java    21 Apr 2005 07:52:15 -0000      1.13
  @@ -167,6 +167,27 @@
       {
           return path;
       }    
  +
  +    public String getPageBasePath()
  +    {
  +        if ( null == path || (1 == path.length() && '/' == path.charAt(0)) )
  +        {
  +            return basePath;
  +        }
  +        else if ( -1 != path.indexOf('/') && !path.endsWith("/") )
  +        {
  +            return basePath + path.substring(0, path.lastIndexOf('/') );
  +        }
  +        else
  +        {
  +            return basePath + path;
  +        }
  +    }
  +    
  +    public boolean isSecure()
  +    {
  +        return secure;
  +    }
           
       public NavigationalState getNavigationalState()
       {
  
  
  
  1.3       +16 -1     
jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/container/url/PortalURL.java
  
  Index: PortalURL.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/container/url/PortalURL.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PortalURL.java    15 Oct 2004 21:41:43 -0000      1.2
  +++ PortalURL.java    21 Apr 2005 07:52:15 -0000      1.3
  @@ -58,6 +58,21 @@
       String getPath();
       
       /**
  +     * Returns the current Portal Page base path without possible encoded
  +     * NavigationalState parameter.
  +     * <br>
  +     * This path can be used as base for page relative resources which don't 
need
  +     * the NavigationalState.
  +     * @return the current Portal Page base path without NavigationalState
  +     */
  +    String getPageBasePath();
  +
  +    /**
  +     * @return true if the current request is secure
  +     */
  +    boolean isSecure();
  +
  +    /**
        * Gets the NavigationalState for access to the current request portal 
control parameters
        * @return the NavigationalState of the PortalURL
        */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to