You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by an...@apache.org on 2011/03/11 17:03:08 UTC
svn commit: r1080631 -
/myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeManagerWrapper.java
Author: andys
Date: Fri Mar 11 16:03:07 2011
New Revision: 1080631
URL: http://svn.apache.org/viewvc?rev=1080631&view=rev
Log:
TRINIDAD-2055 Introduce ChangeManager wrapper class
Added org.apache.myfaces.trinidad.change.ChangeManagerWrapper API.
Added:
myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeManagerWrapper.java
Added: myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeManagerWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeManagerWrapper.java?rev=1080631&view=auto
==============================================================================
--- myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeManagerWrapper.java (added)
+++ myfaces/trinidad/branches/trinidad-1.2.x/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeManagerWrapper.java Fri Mar 11 16:03:07 2011
@@ -0,0 +1,94 @@
+/*
+ * 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.trinidad.change;
+
+import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.trinidad.change.ChangeManager;
+import org.apache.myfaces.trinidad.change.ComponentChange;
+import org.apache.myfaces.trinidad.change.DocumentChange;
+
+/**
+ * Base class for ChangeManager implementations that wrap other ChangeManagers.
+ */
+abstract public class ChangeManagerWrapper extends ChangeManager
+{
+ /**
+ * Delegates the addComponentChange() implementation to the wrapped
+ * ChangeManager.
+ */
+ @Override
+ public void addComponentChange(
+ FacesContext context,
+ UIComponent component,
+ ComponentChange change)
+ {
+ getWrappedChangeManager().addComponentChange(context, component, change);
+ }
+
+ /**
+ * Delegates the addDocumentChange() implementation to the wrapped
+ * ChangeManager.
+ */
+ @Override
+ public void addDocumentChange(
+ FacesContext context,
+ UIComponent component,
+ DocumentChange change)
+ {
+ getWrappedChangeManager().addDocumentChange(context, component, change);
+ }
+
+ /**
+ * Delegates the applyComponentChangesForCurrentView() implementation to
+ * the wrapped ChangeManager.
+ */
+ @Override
+ public void applyComponentChangesForCurrentView(FacesContext context)
+ {
+ getWrappedChangeManager().applyComponentChangesForCurrentView(context);
+ }
+
+ /**
+ * Delegates the applyComponentChangesForSubtree() implementation to the
+ * wrapped ChangeManager.
+ */
+ @Override
+ public void applyComponentChangesForSubtree(FacesContext context, NamingContainer root)
+ {
+ getWrappedChangeManager().applyComponentChangesForSubtree(context, root);
+ }
+
+ /**
+ * Delegates the applySimpleComponentChanges() implementation to the wrapped
+ * ChangeManager.
+ */
+ @Override
+ public void applySimpleComponentChanges(FacesContext context, UIComponent component)
+ {
+ getWrappedChangeManager().applySimpleComponentChanges(context, component);
+ }
+
+ /**
+ * Returns the wrapped ChangeManager.
+ */
+ abstract protected ChangeManager getWrappedChangeManager();
+}