You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2004/11/08 07:06:07 UTC
cvs commit: jakarta-jetspeed/fusion/src/java/org/apache/jetspeed/fusion/profiler/impl FusionPage.java FusionProfilerValveImpl.java
taylor 2004/11/07 22:06:07
Added: fusion/src/java/org/apache/jetspeed/fusion/profiler/impl
FusionPage.java FusionProfilerValveImpl.java
Log:
added profiler valve to add the J1 page to the request in order to support new requirements from nav state
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.1 jakarta-jetspeed/fusion/src/java/org/apache/jetspeed/fusion/profiler/impl/FusionPage.java
Index: FusionPage.java
===================================================================
/*
* Copyright 2000-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.fusion.profiler.impl;
import java.util.Locale;
import org.apache.jetspeed.om.common.GenericMetadata;
import org.apache.jetspeed.om.page.Fragment;
import org.apache.jetspeed.om.page.Page;
import org.apache.jetspeed.page.document.Node;
/**
* FusionPage
*
* @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
* @version $Id: FusionPage.java,v 1.1 2004/11/08 06:06:07 taylor Exp $
*/
public class FusionPage implements Page
{
private String id;
public FusionPage(String id)
{
this.id = id;
}
public Object clone()
throws java.lang.CloneNotSupportedException
{
Object cloned = super.clone();
return cloned;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.page.Page#getDefaultSkin()
*/
public String getDefaultSkin()
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.page.Page#setDefaultSkin(java.lang.String)
*/
public void setDefaultSkin(String skinName)
{
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.page.Page#getDefaultDecorator(java.lang.String)
*/
public String getDefaultDecorator(String fragmentType)
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.page.Page#setDefaultDecorator(java.lang.String, java.lang.String)
*/
public void setDefaultDecorator(String decoratorName, String fragmentType)
{
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.page.Page#getRootFragment()
*/
public Fragment getRootFragment()
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.page.Page#setRootFragment(org.apache.jetspeed.om.page.Fragment)
*/
public void setRootFragment(Fragment fragment)
{
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.page.Page#getFragmentById(java.lang.String)
*/
public Fragment getFragmentById(String id)
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.page.document.Node#getParent()
*/
public Node getParent()
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.page.document.Node#setParent(org.apache.jetspeed.page.document.Node)
*/
public void setParent(Node parent)
{
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.apache.jetspeed.page.document.Node#getPath()
*/
public String getPath()
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.page.document.Node#getName()
*/
public String getName()
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.page.document.Node#setPath(java.lang.String)
*/
public void setPath(String path)
{
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.apache.jetspeed.page.document.Node#getMetadata()
*/
public GenericMetadata getMetadata()
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.page.document.Node#getTitle(java.util.Locale)
*/
public String getTitle(Locale locale)
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.page.document.Node#getType()
*/
public String getType()
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.page.document.Node#getUrl()
*/
public String getUrl()
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.page.document.Node#isHidden()
*/
public boolean isHidden()
{
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.page.BaseElement#getId()
*/
public String getId()
{
return id;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.page.BaseElement#setId(java.lang.String)
*/
public void setId(String id)
{
this.id = id;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.page.BaseElement#getTitle()
*/
public String getTitle()
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.page.BaseElement#setTitle(java.lang.String)
*/
public void setTitle(String title)
{
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.common.SecuredResource#getAcl()
*/
public String getAcl()
{
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.apache.jetspeed.om.common.SecuredResource#setAcl(java.lang.String)
*/
public void setAcl(String acl)
{
// TODO Auto-generated method stub
}
}
1.1 jakarta-jetspeed/fusion/src/java/org/apache/jetspeed/fusion/profiler/impl/FusionProfilerValveImpl.java
Index: FusionProfilerValveImpl.java
===================================================================
/*
* Copyright 2001,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jetspeed.fusion.profiler.impl;
import org.apache.jetspeed.om.page.Page;
import org.apache.jetspeed.pipeline.PipelineException;
import org.apache.jetspeed.pipeline.valve.AbstractValve;
import org.apache.jetspeed.pipeline.valve.ValveContext;
import org.apache.jetspeed.request.RequestContext;
import org.apache.jetspeed.services.rundata.JetspeedRunData;
import org.apache.jetspeed.services.rundata.JetspeedRunDataService;
import org.apache.turbine.services.TurbineServices;
import org.apache.turbine.services.rundata.RunDataService;
/**
* Security Valve for use J2 and populating expected Principal and
* Subjects as expected by JSR 168 portlets from the J1 JetspeedUser
*
* @see TemplateSecureSessionValidator
* @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
* @version $Id: FusionProfilerValveImpl.java,v 1.1 2004/11/08 06:06:07 taylor Exp $
*/
public class FusionProfilerValveImpl
extends AbstractValve
{
private JetspeedRunDataService runDataService = null;
/* (non-Javadoc)
* @see org.apache.jetspeed.pipeline.valve.Valve#invoke(org.apache.jetspeed.request.RequestContext, org.apache.jetspeed.pipeline.valve.ValveContext)
*/
public void invoke(RequestContext request, ValveContext context)
throws PipelineException
{
JetspeedRunData data = getRunDataService().getCurrentRunData();
Page page = new FusionPage(data.getProfile().getId());
request.setPage(page);
// Pass control to the next Valve in the Pipeline
context.invokeNext(request);
}
private JetspeedRunDataService getRunDataService()
{
if (runDataService == null)
{
runDataService =
(JetspeedRunDataService) TurbineServices.getInstance().getService(RunDataService.SERVICE_NAME);
}
return runDataService;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org