You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2009/10/19 08:17:06 UTC
svn commit: r826588 - in
/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting:
jsf/dynamicdecorators/implemetations/ jsf2/annotation/
jsf2/annotation/purged/
Author: werpu
Date: Mon Oct 19 06:17:05 2009
New Revision: 826588
URL: http://svn.apache.org/viewvc?rev=826588&view=rev
Log:
https://issues.apache.org/jira/browse/EXTSCRIPT-26
starting works on the other annotatioins so that you can move them around as well!
Added:
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ResourceHandlerProxy.java (with props)
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedBehavior.java (with props)
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedConverter.java (with props)
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedELResolver.java (with props)
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java (with props)
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedNavigationHandler.java (with props)
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderer.java (with props)
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderkit.java (with props)
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedResourceHandler.java (with props)
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedValidator.java (with props)
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedVariableResolver.java (with props)
Modified:
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ApplicationProxy.java
myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ValidatorImplementationListener.java
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ApplicationProxy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ApplicationProxy.java?rev=826588&r1=826587&r2=826588&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ApplicationProxy.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ApplicationProxy.java Mon Oct 19 06:17:05 2009
@@ -21,6 +21,7 @@
import org.apache.myfaces.scripting.api.Decorated;
import org.apache.myfaces.scripting.api.ScriptingConst;
import org.apache.myfaces.scripting.core.util.ProxyUtils;
+import org.apache.myfaces.scripting.jsf2.annotation.purged.PurgedResourceHandler;
import javax.el.*;
import javax.faces.FacesException;
@@ -80,7 +81,7 @@
ELResolver retVal = _delegate.getELResolver();
if (!(retVal instanceof ELResolverProxy)) {
retVal = new ELResolverProxy(retVal);
- }
+ }
return retVal;
}
@@ -96,17 +97,20 @@
System.out.println("create1");
UIComponent component = _delegate.createComponent(valueExpression, facesContext, s);
+ //We can replace annotated components on the fly via
+ //ApplicationImpl.addComponent(final String componentType, final String componentClassName)
+
/*we are reweaving on the fly because we cannot be sure if
- * the class is not recycled all the time in the creation
- * code, in the renderer we do it on method base
- * due to the fact that our renderers are recycled via
- * a flyweight pattern
- *
- *
- * Also we cannot proxy here because there is no UIComponent interface
- * maybe in the long run we can make a decorator here instead
- * but for now lets try it this way
- */
+ * the class is not recycled all the time in the creation
+ * code, in the renderer we do it on method base
+ * due to the fact that our renderers are recycled via
+ * a flyweight pattern
+ *
+ *
+ * Also we cannot proxy here because there is no UIComponent interface
+ * maybe in the long run we can make a decorator here instead
+ * but for now lets try it this way
+ */
if (ProxyUtils.isDynamic(component.getClass()) && !alreadyWovenInRequest(component.toString())) {
/*once it was tainted we have to recreate all the time*/
component = (UIComponent) ProxyUtils.getWeaver().reloadScriptingInstance(component);
@@ -262,16 +266,16 @@
_delegate.setStateManager(stateManager);
}
- public void addComponent(String s, String s1) {
+ public void addComponent(String componentType, String componentClass) {
weaveDelegate();
- _delegate.addComponent(s, s1);
+ _delegate.addComponent(componentType, componentClass);
}
- public UIComponent createComponent(String s) throws FacesException {
+ public UIComponent createComponent(String componentType) throws FacesException {
weaveDelegate();
//the components are generated anew very often
//we cannot do an on object weaving here
- UIComponent component = _delegate.createComponent(s);
+ UIComponent component = _delegate.createComponent(componentType);
/*we are reweaving on the fly because we cannot be sure if
* the class is not recycled all the time in the creation
@@ -281,9 +285,9 @@
return (UIComponent) reloadInstance(component);
}
- public UIComponent createComponent(ValueBinding valueBinding, FacesContext facesContext, String s) throws FacesException {
+ public UIComponent createComponent(ValueBinding valueBinding, FacesContext facesContext, String componentType) throws FacesException {
weaveDelegate();
- UIComponent component = _delegate.createComponent(valueBinding, facesContext, s);
+ UIComponent component = _delegate.createComponent(valueBinding, facesContext, componentType);
/*we are reweaving on the fly because we cannot be sure if
* the class is not recycled all the time in the creation
@@ -298,19 +302,19 @@
return _delegate.getComponentTypes();
}
- public void addConverter(String s, String s1) {
+ public void addConverter(String converterId, String converterClass) {
weaveDelegate();
- _delegate.addConverter(s, s1);
+ _delegate.addConverter(converterId, converterClass);
}
- public void addConverter(Class aClass, String s) {
+ public void addConverter(Class targetClass, String converterClass) {
weaveDelegate();
- _delegate.addConverter(aClass, s);
+ _delegate.addConverter(targetClass, converterClass);
}
- public Converter createConverter(String s) {
+ public Converter createConverter(String converterId) {
weaveDelegate();
- Converter retVal = _delegate.createConverter(s);
+ Converter retVal = _delegate.createConverter(converterId);
/**
* since createConverter is called only once
* we have to work with method reloading proxies
@@ -388,24 +392,23 @@
return _delegate.createValueBinding(s);
}
- //TODO add new implementation stuff here
@Override
- public void addBehavior(String s, String s1) {
+ public void addBehavior(String behaviorId, String behaviorClass) {
weaveDelegate();
- _delegate.addBehavior(s, s1);
+ _delegate.addBehavior(behaviorId, behaviorClass);
}
@Override
- public void addDefaultValidatorId(String s) {
+ public void addDefaultValidatorId(String behaviorId) {
weaveDelegate();
- _delegate.addDefaultValidatorId(s);
+ _delegate.addDefaultValidatorId(behaviorId);
}
@Override
- public Behavior createBehavior(String s) throws FacesException {
+ public Behavior createBehavior(String behaviorId) throws FacesException {
weaveDelegate();
- Behavior retVal = _delegate.createBehavior(s);
+ Behavior retVal = _delegate.createBehavior(behaviorId);
//in case of a descendend of BehaviorBase we probably
//can count on additional functionality within the codebase we avoid
//therefore the interface reloading and work directly on the object
@@ -478,6 +481,12 @@
public ResourceHandler getResourceHandler() {
weaveDelegate();
ResourceHandler retVal = _delegate.getResourceHandler();
+ if (retVal instanceof PurgedResourceHandler) {
+ //TODO if resource handler purged then do a recompile
+ retVal = _delegate.getResourceHandler();
+ return retVal;
+ }
+
return (ResourceHandler) reloadInstance(retVal);
}
Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ResourceHandlerProxy.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ResourceHandlerProxy.java?rev=826588&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ResourceHandlerProxy.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ResourceHandlerProxy.java Mon Oct 19 06:17:05 2009
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.myfaces.scripting.jsf.dynamicdecorators.implemetations;
+
+import org.apache.myfaces.scripting.core.util.ProxyUtils;
+
+import javax.faces.application.Resource;
+import javax.faces.application.ResourceHandler;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class ResourceHandlerProxy extends ResourceHandler {
+ private ResourceHandler _delegate;
+
+ public ResourceHandlerProxy(ResourceHandler delegate) {
+ _delegate = delegate;
+ }
+
+ public Resource createResource(String resourceName) {
+ weaveDelegate();
+ return _delegate.createResource(resourceName);
+ }
+
+ public Resource createResource(String resourceName, String libraryName) {
+ weaveDelegate();
+ return _delegate.createResource(resourceName, libraryName);
+ }
+
+ public Resource createResource(String resourceName, String libraryName, String contentType) {
+ weaveDelegate();
+ return _delegate.createResource(resourceName, libraryName, contentType);
+ }
+
+ public String getRendererTypeForResourceName(String resourceName) {
+ weaveDelegate();
+ return _delegate.getRendererTypeForResourceName(resourceName);
+ }
+
+ public void handleResourceRequest(FacesContext context) {
+ weaveDelegate();
+ _delegate.handleResourceRequest(context);
+ }
+
+ public boolean isResourceRequest(FacesContext context) {
+ return _delegate.isResourceRequest(context);
+ }
+
+ public boolean libraryExists(String libraryName) {
+ return _delegate.libraryExists(libraryName);
+ }
+
+ private final void weaveDelegate() {
+ _delegate = (ResourceHandler) ProxyUtils.getWeaver().reloadScriptingInstance(_delegate);
+ }
+}
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ResourceHandlerProxy.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf/dynamicdecorators/implemetations/ResourceHandlerProxy.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ValidatorImplementationListener.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ValidatorImplementationListener.java?rev=826588&r1=826587&r2=826588&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ValidatorImplementationListener.java (original)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/ValidatorImplementationListener.java Mon Oct 19 06:17:05 2009
@@ -20,9 +20,12 @@
import com.thoughtworks.qdox.model.JavaClass;
import org.apache.myfaces.scripting.api.AnnotationScanListener;
+import org.apache.myfaces.scripting.jsf2.annotation.purged.PurgedValidator;
import javax.faces.validator.FacesValidator;
import java.util.Map;
+import java.util.Iterator;
+import java.util.concurrent.ConcurrentHashMap;
/**
* @author Werner Punz (latest modification by $Author$)
@@ -30,10 +33,13 @@
*/
public class ValidatorImplementationListener extends MapEntityAnnotationScanner implements AnnotationScanListener {
+
private static final String PAR_VALUE = "value";
private static final String PAR_DEFAULT = "default";
+
public ValidatorImplementationListener() {
+ /*supported annotation parameters value and default*/
super(PAR_VALUE, PAR_DEFAULT);
}
@@ -87,7 +93,7 @@
AnnotationEntry entry = new AnnotationEntry(value, theDefault);
_alreadyRegistered.put(clazz.getName(), entry);
- getApplication().addConverter(entry.getValue(), clazz.getName());
+ getApplication().addValidator(entry.getValue(), clazz.getName());
}
@Override
@@ -98,7 +104,7 @@
AnnotationEntry entry = new AnnotationEntry(value, theDefault);
_alreadyRegistered.put(clazz.getFullyQualifiedName(), entry);
- getApplication().addConverter(entry.getValue(), clazz.getFullyQualifiedName());
+ getApplication().addValidator(entry.getValue(), clazz.getFullyQualifiedName());
}
@Override
@@ -130,4 +136,16 @@
return alreadyRegistered.equals(entry);
}
+
+
+ @Override
+ public void purge(String className) {
+ super.purge(className);
+ AnnotationEntry entry = (AnnotationEntry) _alreadyRegistered.get(className);
+ if (entry == null) {
+ return;
+ }
+ _alreadyRegistered.remove(className);
+ getApplication().addValidator(entry.getValue(), PurgedValidator.class.getName());
+ }
}
Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedBehavior.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedBehavior.java?rev=826588&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedBehavior.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedBehavior.java Mon Oct 19 06:17:05 2009
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.myfaces.scripting.jsf2.annotation.purged;
+
+import javax.faces.component.behavior.Behavior;
+import javax.faces.event.BehaviorEvent;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class PurgedBehavior implements Behavior {
+ public void broadcast(BehaviorEvent event) {
+ throw new RuntimeException("Behavior does not exist");
+ }
+}
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedBehavior.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedBehavior.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedConverter.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedConverter.java?rev=826588&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedConverter.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedConverter.java Mon Oct 19 06:17:05 2009
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.myfaces.scripting.jsf2.annotation.purged;
+
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+import javax.faces.context.FacesContext;
+import javax.faces.component.UIComponent;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class PurgedConverter implements Converter {
+ private static final String DOES_NOT_EXIST = "Converter does not exist";
+
+ public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+}
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedConverter.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedELResolver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedELResolver.java?rev=826588&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedELResolver.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedELResolver.java Mon Oct 19 06:17:05 2009
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.myfaces.scripting.jsf2.annotation.purged;
+
+import javax.el.ELResolver;
+import javax.el.ELContext;
+import java.util.Iterator;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class PurgedELResolver extends ELResolver {
+
+ private final String DOES_NOT_EXIST = "EL Resolver does not exist";
+
+ @Override
+ public Object getValue(ELContext elContext, Object o, Object o1) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public Class getType(ELContext elContext, Object o, Object o1) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public void setValue(ELContext elContext, Object o, Object o1, Object o2) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext elContext, Object o, Object o1) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public Iterator getFeatureDescriptors(ELContext elContext, Object o) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public Class getCommonPropertyType(ELContext elContext, Object o) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+}
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedELResolver.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedELResolver.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java?rev=826588&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java Mon Oct 19 06:17:05 2009
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.myfaces.scripting.jsf2.annotation.purged;
+
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.event.PhaseListener;
+import javax.faces.context.FacesContext;
+import javax.faces.FacesException;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class PurgedLifecycle extends Lifecycle {
+
+ private static final String DOES_NOT_EXIST = "Lifecycle does not exist";
+
+ @Override
+ public void addPhaseListener(PhaseListener listener) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public void execute(FacesContext context) throws FacesException {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public PhaseListener[] getPhaseListeners() {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public void removePhaseListener(PhaseListener listener) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public void render(FacesContext context) throws FacesException {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+}
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedLifecycle.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedNavigationHandler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedNavigationHandler.java?rev=826588&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedNavigationHandler.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedNavigationHandler.java Mon Oct 19 06:17:05 2009
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.myfaces.scripting.jsf2.annotation.purged;
+
+import javax.faces.application.NavigationHandler;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class PurgedNavigationHandler extends NavigationHandler {
+ @Override
+ public void handleNavigation(FacesContext context, String fromAction, String outcome) {
+ throw new RuntimeException("Navigation handler does not exist");
+ }
+}
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedNavigationHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedNavigationHandler.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderer.java?rev=826588&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderer.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderer.java Mon Oct 19 06:17:05 2009
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.myfaces.scripting.jsf2.annotation.purged;
+
+import javax.faces.render.Renderer;
+import javax.faces.context.FacesContext;
+import javax.faces.component.UIComponent;
+import javax.faces.convert.ConverterException;
+import java.io.IOException;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class PurgedRenderer extends Renderer {
+ private static final String DOES_NOT_EXIST = "Renderer does not exist";
+
+ public PurgedRenderer() {
+ super();
+ }
+
+ @Override
+ public void decode(FacesContext context, UIComponent component) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public String convertClientId(FacesContext context, String clientId) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public boolean getRendersChildren() {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue) throws ConverterException {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+}
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderer.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderkit.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderkit.java?rev=826588&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderkit.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderkit.java Mon Oct 19 06:17:05 2009
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.myfaces.scripting.jsf2.annotation.purged;
+
+import javax.faces.render.RenderKit;
+import javax.faces.render.Renderer;
+import javax.faces.render.ResponseStateManager;
+import javax.faces.context.ResponseStream;
+import javax.faces.context.ResponseWriter;
+import java.io.OutputStream;
+import java.io.Writer;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class PurgedRenderkit extends RenderKit {
+
+ private static final String DOES_NOT_EXIST = "Renderkit does not exist";
+
+ @Override
+ public void addRenderer(String family, String rendererType, Renderer renderer) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public ResponseStream createResponseStream(OutputStream out) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public ResponseWriter createResponseWriter(Writer writer, String contentTypeList, String characterEncoding) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public Renderer getRenderer(String family, String rendererType) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public ResponseStateManager getResponseStateManager() {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+}
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderkit.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedRenderkit.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedResourceHandler.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedResourceHandler.java?rev=826588&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedResourceHandler.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedResourceHandler.java Mon Oct 19 06:17:05 2009
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.myfaces.scripting.jsf2.annotation.purged;
+
+import javax.faces.application.ResourceHandler;
+import javax.faces.application.Resource;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class PurgedResourceHandler extends ResourceHandler {
+
+ private static final String DOES_NOT_EXIST = "Resource Handler does not exist";
+
+ public PurgedResourceHandler() {
+ super();
+ }
+
+ @Override
+ public Resource createResource(String resourceName) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public Resource createResource(String resourceName, String libraryName) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public Resource createResource(String resourceName, String libraryName, String contentType) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public String getRendererTypeForResourceName(String resourceName) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public void handleResourceRequest(FacesContext context) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public boolean isResourceRequest(FacesContext context) {
+ throw new RuntimeException(DOES_NOT_EXIST);
+ }
+
+ @Override
+ public boolean libraryExists(String libraryName) {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+}
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedResourceHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedResourceHandler.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedValidator.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedValidator.java?rev=826588&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedValidator.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedValidator.java Mon Oct 19 06:17:05 2009
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.myfaces.scripting.jsf2.annotation.purged;
+
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+import javax.faces.context.FacesContext;
+import javax.faces.component.UIComponent;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ * <p/>
+ * Purged validator class to enable validator
+ * purging despite the fact
+ * that the original code does not allow it
+ */
+
+public class PurgedValidator implements Validator {
+ public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
+ throw new RuntimeException("Validator does not exist");
+ }
+}
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedValidator.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedValidator.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedVariableResolver.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedVariableResolver.java?rev=826588&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedVariableResolver.java (added)
+++ myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedVariableResolver.java Mon Oct 19 06:17:05 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.myfaces.scripting.jsf2.annotation.purged;
+
+import javax.faces.el.VariableResolver;
+import javax.faces.el.EvaluationException;
+import javax.faces.context.FacesContext;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ */
+
+public class PurgedVariableResolver extends VariableResolver {
+ @Override
+ public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException {
+ throw new RuntimeException("VariableResolver does not exist");
+ }
+}
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedVariableResolver.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/extensions/scripting/trunk/core/myfaces2-extensions/src/main/java/org/apache/myfaces/scripting/jsf2/annotation/purged/PurgedVariableResolver.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL