01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.jetspeed.profiler.impl;
18:
19: import org.apache.commons.logging.Log;
20: import org.apache.commons.logging.LogFactory;
21: import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
22: import org.apache.jetspeed.pipeline.PipelineException;
23: import org.apache.jetspeed.pipeline.valve.AbstractValve;
24: import org.apache.jetspeed.pipeline.valve.Valve;
25: import org.apache.jetspeed.pipeline.valve.ValveContext;
26: import org.apache.jetspeed.request.RequestContext;
27:
28: /**
29: * ProfilerValveImpl
30: *
31: * @author <a href="mailto:taylor@apache.org">David Sean Taylor </a>
32: * @version $Id: ProfilerValveImpl.java 388733 2006-03-25 09:03:58Z rwatler $
33: */
34: public class CreatePageValveImpl extends AbstractValve implements Valve {
35: protected Log log = LogFactory.getLog(CreatePageValveImpl.class);
36:
37: private PortletActionSecurityBehavior securityBehavior;
38:
39: /**
40: * CreatePageValveImpl - constructor
41: *
42: * @param securityBehavior the behavior to create new page for new user
43: */
44: public CreatePageValveImpl(PortletActionSecurityBehavior behavior) {
45: this .securityBehavior = behavior;
46: }
47:
48: /*
49: * (non-Javadoc)
50: *
51: * @see org.apache.jetspeed.pipeline.valve.Valve#invoke(org.apache.jetspeed.request.RequestContext,
52: * org.apache.jetspeed.pipeline.valve.ValveContext)
53: */
54: public void invoke(RequestContext request, ValveContext context)
55: throws PipelineException {
56: securityBehavior.createNewPageOnEdit(request);
57: context.invokeNext(request);
58: }
59:
60: }
|