org.eclipse.jst.jsf.common.runtime_1.1.0.v20100510

16:45:48.844 INFO  jd.cli.Main - Decompiling org.eclipse.jst.jsf.common.runtime_1.1.0.v20100510.jar
package org.eclipse.jst.jsf.common.runtime.internal;

import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
import org.osgi.framework.BundleContext;

public class JSFCommonRuntimePlugin
  extends Plugin
{
  public static final String PLUGIN_ID = "CommonComponentPlugin";
  private static JSFCommonRuntimePlugin plugin;
  
  public void start(BundleContext context)
    throws Exception
  {
    super.start(context);
    plugin = this;
  }
  
  public void stop(BundleContext context)
    throws Exception
  {
    plugin = null;
    super.stop(context);
  }
  
  public static JSFCommonRuntimePlugin getDefault()
  {
    return plugin;
  }
  
  public static void log(String message, Throwable t)
  {
    ILog log = getDefault().getLog();
    IStatus status = new Status(4, "CommonComponentPlugin", message, t);
    log.log(status);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.JSFCommonRuntimePlugin
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.debug;

import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo;

public class ComponentTreeMessage
  extends JSFMonitorMessage
{
  private static final long serialVersionUID = -6282344329821994209L;
  private String _viewId;
  private ComponentInfo _treeRoot;
  private RenderNode _renderRoot;
  
  public final String getViewId()
  {
    return _viewId;
  }
  
  public final ComponentInfo getTreeRoot()
  {
    return _treeRoot;
  }
  
  public final RenderNode getRenderRoot()
  {
    return _renderRoot;
  }
  
  final void setRenderRoot(RenderNode renderRoot)
  {
    _renderRoot = renderRoot;
  }
  
  final void setTreeRoot(ComponentInfo treeRoot)
  {
    _treeRoot = treeRoot;
  }
  
  final void setViewId(String viewId)
  {
    _viewId = viewId;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.debug.ComponentTreeMessage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.debug;

import java.io.Serializable;

public abstract class JSFMonitorMessage
  implements Serializable
{
  private static final long serialVersionUID = -5417558019077000040L;
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.debug.JSFMonitorMessage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.debug;

import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentInfo;

public class MonitorMessageFactory
{
  public static ComponentTreeMessage createTreeMessage(String viewId, ComponentInfo root, RenderNode renderRoot)
  {
    ComponentTreeMessage message = new ComponentTreeMessage();
    message.setViewId(viewId);
    message.setTreeRoot(root);
    message.setRenderRoot(renderRoot);
    return message;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.debug.MonitorMessageFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.debug;

public class RenderAttribute
  extends JSFMonitorMessage
{
  private static final long serialVersionUID = -4601065346261130623L;
  private final String _name;
  private final String _value;
  private final String _propertyName;
  
  public RenderAttribute(String name, String value, String propertyName)
  {
    _name = name;
    _propertyName = propertyName;
    _value = value;
  }
  
  public final String getName()
  {
    return _name;
  }
  
  public final String getValue()
  {
    return _value;
  }
  
  public final String getPropertyName()
  {
    return _propertyName;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.debug.RenderAttribute
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.debug;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class RenderNode
  extends JSFMonitorMessage
{
  private static final long serialVersionUID = -2843929405836710015L;
  private final String _componentId;
  private final String _renderedNodeName;
  private final List _renderedAttributes;
  private final List _children;
  
  public RenderNode(String componentId, String renderedNodeName)
  {
    _componentId = componentId;
    _renderedNodeName = renderedNodeName;
    
    _children = new ArrayList();
    _renderedAttributes = new ArrayList();
  }
  
  public final String getComponentId()
  {
    return _componentId;
  }
  
  public final List getChildren()
  {
    return _children;
  }
  
  public final String getRenderedNodeName()
  {
    return _renderedNodeName;
  }
  
  public final List getRenderedAttributes()
  {
    return _renderedAttributes;
  }
  
  public String toString()
  {
    String toString = "Root node: " + _renderedNodeName + ", attributes: [";
    for (Iterator it = _renderedAttributes.iterator(); it.hasNext();)
    {
      RenderAttribute attribute = (RenderAttribute)it.next();
      toString = toString + attribute.getName() + "=" + attribute.getValue();
      
      toString = toString + (it.hasNext() ? ", " : "]");
    }
    return toString;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.debug.RenderNode
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model;

public abstract interface IDesigntimeAdapter
{
  public abstract String[] getInterfaces();
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.IDesigntimeAdapter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model;

import java.io.Serializable;

public abstract class ViewObject$ProtectedDataObject
  implements Serializable
{
  private static final long serialVersionUID = 4470279408370430399L;
  private boolean _isProtected;
  
  public ViewObject$ProtectedDataObject(boolean isProtected)
  {
    _isProtected = isProtected;
  }
  
  protected final synchronized void enforceProtection()
    throws UnsupportedOperationException
  {
    if (isProtected()) {
      throw new UnsupportedOperationException("Object " + toString() + " is locked for modification");
    }
  }
  
  public final synchronized boolean isProtected()
  {
    return _isProtected;
  }
  
  protected void doBeforeProtecting() {}
  
  public final synchronized void setLocked()
  {
    doBeforeProtecting();
    _isProtected = true;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.ViewObject.ProtectedDataObject
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.Decorator;

public class ViewObject$ViewObjectData
  extends ViewObject.ProtectedDataObject
{
  private static final long serialVersionUID = -4216980607447926035L;
  private Map _decorators;
  private Map _adapters;
  private Object _owner;
  
  public ViewObject$ViewObjectData(boolean isProtected)
  {
    super(isProtected);
  }
  
  private void setOwner(ViewObject viewObject)
  {
    _owner = viewObject;
  }
  
  public boolean removeDecorator(Decorator decorator, Class associatedType)
  {
    enforceProtection();
    if ((decorator == null) || (associatedType == null)) {
      throw new IllegalArgumentException("Arguments must not be null");
    }
    List decoratorsByType = (List)getDecoratorMap().get(
      associatedType);
    if (decoratorsByType != null) {
      return decoratorsByType.remove(decorator);
    }
    return false;
  }
  
  public void addAdapter(Class adapterType, Object adapter)
  {
    enforceProtection();
    if ((adapterType == null) || (adapter == null)) {
      throw new IllegalArgumentException("Arguments must not be null");
    }
    if (!adapterType.isInstance(adapter)) {
      throw new IllegalArgumentException("adapter: " + adapter + 
        " must be cast compatible to class: " + adapterType);
    }
    if (adapterType.isInstance(_owner)) {
      throw new IllegalArgumentException("this: " + _owner + 
        " must not already be an instance of class: " + 
        adapterType);
    }
    getAdapterMap().put(adapterType, adapter);
  }
  
  public void addDecorator(Decorator decorator)
  {
    enforceProtection();
    if (decorator == null) {
      throw new IllegalArgumentException("Arguments must not be null");
    }
    Class associationType = decorator.getClass();
    addDecorator(decorator, associationType);
  }
  
  public void addDecorator(Decorator decorator, Class associatedType)
  {
    enforceProtection();
    if ((decorator == null) || (associatedType == null)) {
      throw new IllegalArgumentException("Arguments must not be null");
    }
    List decoratorsByType = (List)getDecoratorMap().get(associatedType);
    if (decoratorsByType == null)
    {
      decoratorsByType = new ArrayList(2);
      getDecoratorMap().put(associatedType, decoratorsByType);
    }
    decoratorsByType.add(decorator);
  }
  
  protected synchronized Map getDecoratorMap()
  {
    if (_decorators == null)
    {
      if (isProtected()) {
        _decorators = Collections.EMPTY_MAP;
      }
      _decorators = new HashMap(4);
    }
    return _decorators;
  }
  
  protected synchronized Map getAdapterMap()
  {
    if (_adapters == null) {
      _adapters = new HashMap(4);
    }
    return _adapters;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.ViewObject.ViewObjectData
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.Decorator;

public abstract class ViewObject
  implements Serializable
{
  private final ViewObjectData _data;
  private static final long serialVersionUID = 1592205691642453075L;
  
  protected ViewObject()
  {
    this(new ViewObjectData(false));
  }
  
  protected ViewObject(ViewObjectData delegate)
  {
    _data = delegate;
    _data.setOwner(this);
  }
  
  protected ViewObjectData getData()
  {
    return _data;
  }
  
  public final boolean isModifiable()
  {
    return !getData().isProtected();
  }
  
  public final void setProtected()
  {
    getData().setLocked();
  }
  
  public List getAllDecorators()
  {
    int size = getDecoratorMap().size();
    if (size == 0) {
      return Collections.EMPTY_LIST;
    }
    List allDecorators = new ArrayList();
    for (Iterator entryIt = getDecoratorMap().entrySet().iterator(); entryIt
          .hasNext();)
    {
      Map.Entry entry = (Map.Entry)entryIt.next();
      List decorators = (List)entry.getValue();
      allDecorators.addAll(decorators);
    }
    return Collections.unmodifiableList(allDecorators);
  }
  
  public List getDecorators(Class decoratorType)
  {
    List decorators = (List)getDecoratorMap().get(decoratorType);
    if (decorators == null) {
      return Collections.EMPTY_LIST;
    }
    return Collections.unmodifiableList(decorators);
  }
  
  public void addDecorator(Decorator decorator)
  {
    _data.addDecorator(decorator);
  }
  
  public void addDecorator(Decorator decorator, Class associatedType)
  {
    _data.addDecorator(decorator, associatedType);
  }
  
  public boolean removeDecorator(Decorator decorator, Class associatedType)
  {
    return _data.removeDecorator(decorator, associatedType);
  }
  
  public Object getAdapter(Class adapterType)
  {
    if (adapterType == null) {
      return null;
    }
    Object adapter = getAdapterMap().get(adapterType);
    if (adapter == null) {
      if (adapterType.isInstance(this)) {
        adapter = this;
      }
    }
    return adapter;
  }
  
  public void addAdapter(Class adapterType, Object adapter)
  {
    _data.addAdapter(adapterType, adapter);
  }
  
  public Object removeAdapter(Class adapterType)
  {
    return getAdapterMap().remove(adapterType);
  }
  
  public Map getAllAdapters()
  {
    if (getAdapterMap().size() == 0) {
      return Collections.EMPTY_MAP;
    }
    return Collections.unmodifiableMap(getAdapterMap());
  }
  
  protected Map getDecoratorMap()
  {
    return _data.getDecoratorMap();
  }
  
  protected Map getAdapterMap()
  {
    return _data.getAdapterMap();
  }
  
  public final boolean equals(Object obj)
  {
    return super.equals(obj);
  }
  
  public final int hashCode()
  {
    return super.hashCode();
  }
  
  public static class ViewObjectData
    extends ViewObject.ProtectedDataObject
  {
    private static final long serialVersionUID = -4216980607447926035L;
    private Map _decorators;
    private Map _adapters;
    private Object _owner;
    
    public ViewObjectData(boolean isProtected)
    {
      super();
    }
    
    private void setOwner(ViewObject viewObject)
    {
      _owner = viewObject;
    }
    
    public boolean removeDecorator(Decorator decorator, Class associatedType)
    {
      enforceProtection();
      if ((decorator == null) || (associatedType == null)) {
        throw new IllegalArgumentException("Arguments must not be null");
      }
      List decoratorsByType = (List)getDecoratorMap().get(
        associatedType);
      if (decoratorsByType != null) {
        return decoratorsByType.remove(decorator);
      }
      return false;
    }
    
    public void addAdapter(Class adapterType, Object adapter)
    {
      enforceProtection();
      if ((adapterType == null) || (adapter == null)) {
        throw new IllegalArgumentException("Arguments must not be null");
      }
      if (!adapterType.isInstance(adapter)) {
        throw new IllegalArgumentException("adapter: " + adapter + 
          " must be cast compatible to class: " + adapterType);
      }
      if (adapterType.isInstance(_owner)) {
        throw new IllegalArgumentException("this: " + _owner + 
          " must not already be an instance of class: " + 
          adapterType);
      }
      getAdapterMap().put(adapterType, adapter);
    }
    
    public void addDecorator(Decorator decorator)
    {
      enforceProtection();
      if (decorator == null) {
        throw new IllegalArgumentException("Arguments must not be null");
      }
      Class associationType = decorator.getClass();
      addDecorator(decorator, associationType);
    }
    
    public void addDecorator(Decorator decorator, Class associatedType)
    {
      enforceProtection();
      if ((decorator == null) || (associatedType == null)) {
        throw new IllegalArgumentException("Arguments must not be null");
      }
      List decoratorsByType = (List)getDecoratorMap().get(associatedType);
      if (decoratorsByType == null)
      {
        decoratorsByType = new ArrayList(2);
        getDecoratorMap().put(associatedType, decoratorsByType);
      }
      decoratorsByType.add(decorator);
    }
    
    protected synchronized Map getDecoratorMap()
    {
      if (_decorators == null)
      {
        if (isProtected()) {
          _decorators = Collections.EMPTY_MAP;
        }
        _decorators = new HashMap(4);
      }
      return _decorators;
    }
    
    protected synchronized Map getAdapterMap()
    {
      if (_adapters == null) {
        _adapters = new HashMap(4);
      }
      return _adapters;
    }
  }
  
  public static abstract class ProtectedDataObject
    implements Serializable
  {
    private static final long serialVersionUID = 4470279408370430399L;
    private boolean _isProtected;
    
    public ProtectedDataObject(boolean isProtected)
    {
      _isProtected = isProtected;
    }
    
    protected final synchronized void enforceProtection()
      throws UnsupportedOperationException
    {
      if (isProtected()) {
        throw new UnsupportedOperationException("Object " + toString() + " is locked for modification");
      }
    }
    
    public final synchronized boolean isProtected()
    {
      return _isProtected;
    }
    
    protected void doBeforeProtecting() {}
    
    public final synchronized void setLocked()
    {
      doBeforeProtecting();
      _isProtected = true;
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.ViewObject
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.bean;

import java.io.Serializable;

public class DataModelInfo
  implements Serializable
{
  private static final long serialVersionUID = 6461056497382677871L;
  private final boolean _rowAvailable;
  private final int _rowCount;
  private final SerializableObject _rowData;
  private final int _rowIndex;
  private final SerializableObject _wrappedData;
  
  public DataModelInfo(boolean rowAvailable, int rowCount, Object rowData, int rowIndex, Object wrappedData)
  {
    _rowAvailable = rowAvailable;
    _rowCount = rowCount;
    _rowData = new SerializableObject(rowData);
    _rowIndex = rowIndex;
    _wrappedData = new SerializableObject(wrappedData);
  }
  
  public final boolean isRowAvailable()
  {
    return _rowAvailable;
  }
  
  public final int getRowCount()
  {
    return _rowCount;
  }
  
  public final Object getRowData()
  {
    return _rowData.getMaybeSerializable();
  }
  
  public final int getRowIndex()
  {
    return _rowIndex;
  }
  
  public final Object getWrappedData()
  {
    return _wrappedData.getMaybeSerializable();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.bean.DataModelInfo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.bean;

import java.io.IOException;
import java.io.NotSerializableException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

public class SerializableObject
  implements Serializable
{
  private static final long serialVersionUID = 9133733048469500692L;
  private Object _maybeSerializable;
  
  public SerializableObject(Object maybeSerializable)
  {
    _maybeSerializable = maybeSerializable;
  }
  
  public final Object getMaybeSerializable()
  {
    return _maybeSerializable;
  }
  
  private void writeObject(ObjectOutputStream out)
    throws IOException
  {
    try
    {
      out.writeObject(_maybeSerializable);
    }
    catch (NotSerializableException localNotSerializableException)
    {
      out.writeObject(null);
    }
  }
  
  private void readObject(ObjectInputStream in)
    throws IOException, ClassNotFoundException
  {
    _maybeSerializable = in.readObject();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.bean.SerializableObject
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.jst.jsf.common.runtime.internal.model.IDesigntimeAdapter;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ActionListenerDecorator;

public class ActionSourceInfo
  implements IActionSourceInfo, IDesigntimeAdapter
{
  private static final long serialVersionUID = 6531166406473466685L;
  private static final String[] INTERFACE = { "javax.faces.component.ActionSource" };
  private final String _action;
  private final String _actionListener;
  private final boolean _immediate;
  private List _actionListeners;
  
  public ActionSourceInfo(String action, String actionListener, boolean immediate)
  {
    _action = action;
    _actionListener = actionListener;
    _immediate = immediate;
  }
  
  public void addActionListener(ActionListenerDecorator actionListener)
  {
    if (_actionListeners == null) {
      _actionListeners = new ArrayList(2);
    }
    _actionListeners.add(actionListener);
  }
  
  public String getAction()
  {
    return _action;
  }
  
  public String getActionListener()
  {
    return _actionListener;
  }
  
  public List getActionListeners()
  {
    if (_actionListeners == null) {
      return Collections.EMPTY_LIST;
    }
    return Collections.unmodifiableList(_actionListeners);
  }
  
  public boolean isImmediate()
  {
    return _immediate;
  }
  
  public String[] getInterfaces()
  {
    return INTERFACE;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.ActionSourceInfo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural;

import org.eclipse.jst.jsf.common.runtime.internal.model.IDesigntimeAdapter;

public class ActionSourceInfo2
  extends ActionSourceInfo
  implements IActionSource2Info, IDesigntimeAdapter
{
  private static final long serialVersionUID = 5811194815559772378L;
  private static final String[] INTERFACE = { "javax.faces.component.ActionSource2" };
  private final String _actionExpression;
  
  public ActionSourceInfo2(String action, String actionListener, boolean immediate, String actionExpression)
  {
    super(action, actionListener, immediate);
    _actionExpression = actionExpression;
  }
  
  public String getActionExpression()
  {
    return _actionExpression;
  }
  
  public String[] getInterfaces()
  {
    return INTERFACE;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.ActionSourceInfo2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.jst.jsf.common.runtime.internal.model.IDesigntimeAdapter;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDecorator;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorDecorator;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValueChangeListenerDecorator;

public class EditableValueHolderInfo
  extends ValueHolderInfo
  implements IEditableValueHolderInfo, IDesigntimeAdapter
{
  private static final long serialVersionUID = -2115990809157328451L;
  private static final String[] INTERFACE = { "javax.faces.component.EditableValueHolder" };
  private final boolean _localSetValue;
  private final Object _submittedValue;
  private final String _validator;
  private final String _valueChangeListener;
  private final boolean _isImmediate;
  private final boolean _isRequired;
  private final boolean _isValid;
  private List _validators;
  private List _valueChangeListeners;
  
  public EditableValueHolderInfo(ConverterDecorator converterDecorator, Object localValue, Object value, boolean isImmediate, boolean isRequired, boolean isValid, boolean localSetValue, Object submittedValue, String validator, String valueChangeListener)
  {
    super(converterDecorator, localValue, value);
    _isImmediate = isImmediate;
    _isRequired = isRequired;
    _isValid = isValid;
    _localSetValue = localSetValue;
    _submittedValue = submittedValue;
    _validator = validator;
    _valueChangeListener = valueChangeListener;
  }
  
  public final boolean isLocalSetValue()
  {
    return _localSetValue;
  }
  
  public final Object getSubmittedValue()
  {
    return _submittedValue;
  }
  
  public final String getValidator()
  {
    return _validator;
  }
  
  public final String getValueChangeListener()
  {
    return _valueChangeListener;
  }
  
  public final boolean isImmediate()
  {
    return _isImmediate;
  }
  
  public final boolean isRequired()
  {
    return _isRequired;
  }
  
  public final boolean isValid()
  {
    return _isValid;
  }
  
  public void addValidator(ValidatorDecorator validator)
  {
    if (_validators == null) {
      _validators = new ArrayList(2);
    }
    _validators.add(validator);
  }
  
  public void addValueChangeListener(ValueChangeListenerDecorator valueChangeListenerInfo)
  {
    if (_valueChangeListeners == null) {
      _valueChangeListeners = new ArrayList(2);
    }
    _valueChangeListeners.add(valueChangeListenerInfo);
  }
  
  public List getValidators()
  {
    if (_validators == null) {
      return Collections.EMPTY_LIST;
    }
    return Collections.unmodifiableList(_validators);
  }
  
  public List getValueChangeListeners()
  {
    if (_valueChangeListeners == null) {
      return Collections.EMPTY_LIST;
    }
    return Collections.unmodifiableList(_valueChangeListeners);
  }
  
  public String[] getInterfaces()
  {
    return INTERFACE;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.EditableValueHolderInfo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural;

public abstract interface IActionSource2Info
  extends IActionSourceInfo
{
  public abstract String getActionExpression();
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IActionSource2Info
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural;

import java.io.Serializable;
import java.util.List;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ActionListenerDecorator;

public abstract interface IActionSourceInfo
  extends Serializable
{
  public abstract boolean isImmediate();
  
  public abstract void addActionListener(ActionListenerDecorator paramActionListenerDecorator);
  
  public abstract List getActionListeners();
  
  public abstract String getAction();
  
  public abstract String getActionListener();
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IActionSourceInfo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural;

import java.util.List;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorDecorator;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValueChangeListenerDecorator;

public abstract interface IEditableValueHolderInfo
  extends IValueHolderInfo
{
  public abstract boolean isImmediate();
  
  public abstract boolean isLocalSetValue();
  
  public abstract boolean isRequired();
  
  public abstract Object getSubmittedValue();
  
  public abstract boolean isValid();
  
  public abstract String getValidator();
  
  public abstract String getValueChangeListener();
  
  public abstract void addValidator(ValidatorDecorator paramValidatorDecorator);
  
  public abstract List getValidators();
  
  public abstract void addValueChangeListener(ValueChangeListenerDecorator paramValueChangeListenerDecorator);
  
  public abstract List getValueChangeListeners();
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IEditableValueHolderInfo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural;

import org.eclipse.jst.jsf.common.runtime.internal.model.IDesigntimeAdapter;

public class INamingContainerInfo$NamingContainerInfo
  implements INamingContainerInfo, IDesigntimeAdapter
{
  private static final long serialVersionUID = 7214529928361444126L;
  
  public String[] getInterfaces()
  {
    return new String[] { "javax.faces.component.NamingContainer" };
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.INamingContainerInfo.NamingContainerInfo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural;

import java.io.Serializable;
import org.eclipse.jst.jsf.common.runtime.internal.model.IDesigntimeAdapter;

public abstract interface INamingContainerInfo
  extends Serializable
{
  public static final INamingContainerInfo ADAPTER = new NamingContainerInfo();
  
  public static class NamingContainerInfo
    implements INamingContainerInfo, IDesigntimeAdapter
  {
    private static final long serialVersionUID = 7214529928361444126L;
    
    public String[] getInterfaces()
    {
      return new String[] { "javax.faces.component.NamingContainer" };
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.INamingContainerInfo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural;

import java.io.Serializable;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDecorator;

public abstract interface IValueHolderInfo
  extends Serializable
{
  public abstract Object getValue();
  
  public abstract Object getLocalValue();
  
  public abstract ConverterDecorator getConverter();
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IValueHolderInfo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural;

import org.eclipse.jst.jsf.common.runtime.internal.model.IDesigntimeAdapter;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDecorator;

public class ValueHolderInfo
  implements IValueHolderInfo, IDesigntimeAdapter
{
  private static final long serialVersionUID = 5000699728360703727L;
  protected final Object _value;
  protected final Object _localValue;
  protected final ConverterDecorator _converterDecorator;
  
  public ValueHolderInfo(ConverterDecorator converterDecorator, Object localValue, Object value)
  {
    _converterDecorator = converterDecorator;
    _localValue = localValue;
    _value = value;
  }
  
  public final Object getValue()
  {
    return _value;
  }
  
  public final Object getLocalValue()
  {
    return _localValue;
  }
  
  public final ConverterDecorator getConverter()
  {
    return _converterDecorator;
  }
  
  public String[] getInterfaces()
  {
    return new String[] { "javax.faces.component.ValueHolder" };
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.ValueHolderInfo
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.component;

public final class AbstractVisitor$VisitationPolicy
{
  public static final int VISIT_PARENT_FIRST = 0;
  public static final int VISIT_CHILDREN_FIRST = 1;
  public static final VisitationPolicy ParentFirstPolicy = new VisitationPolicy(
    0);
  public static final VisitationPolicy ChildrenFirstPolicy = new VisitationPolicy(
    1);
  private final int _ordering;
  
  public AbstractVisitor$VisitationPolicy(int ordering)
  {
    _ordering = ordering;
  }
  
  public final int getOrdering()
  {
    return _ordering;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.component.AbstractVisitor.VisitationPolicy
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.component;

public abstract class AbstractVisitor
{
  protected final VisitationPolicy _policy;
  
  protected AbstractVisitor(VisitationPolicy policy)
  {
    _policy = policy;
  }
  
  public abstract void visit(Object paramObject);
  
  public VisitationPolicy getPolicy()
  {
    return _policy;
  }
  
  public static final class VisitationPolicy
  {
    public static final int VISIT_PARENT_FIRST = 0;
    public static final int VISIT_CHILDREN_FIRST = 1;
    public static final VisitationPolicy ParentFirstPolicy = new VisitationPolicy(
      0);
    public static final VisitationPolicy ChildrenFirstPolicy = new VisitationPolicy(
      1);
    private final int _ordering;
    
    public VisitationPolicy(int ordering)
    {
      _ordering = ordering;
    }
    
    public final int getOrdering()
    {
      return _ordering;
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.jst.jsf.common.runtime.internal.model.component.AbstractVisitor
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.jst.jsf.common.runtime.internal.model.component;

import java.util.Map;
import org.eclipse.jst.jsf.common.runtime.internal.model.bean.DataModelInfo;
import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IActionSource2Info;
import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IActionSourceInfo;
import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IEditableValueHolderInfo;
import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.INamingContainerInfo;
import org.eclipse.jst.jsf.common.runtime.internal.model.behavioural.IValueHolderInfo;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDecorator;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.FacetDecorator;
import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ValidatorDecorator;
import org.eclipse.jst.jsf.common.runtime.internal.model.event.IActionListenerInfo;
import org.eclipse.jst.jsf.common.runtime.internal.model.event.IValueChangeListenerInfo;

public class ComponentFactory
{
  public static final Class VALUE_HOLDER = IValueHolderInfo.class;
  public static final Class EDITABLE_VALUE_HOLDER = IEditableValueHolderInfo.class;
  public static final Class ACTION_SOURCE = IActionSourceInfo.class;
  public static final Class ACTION_SOURCE2 = IActionSource2Info.class;
  public static final Class NAMING_CONTAINER = INamingContainerInfo.class;
  public static final Class CONVERTER = ConverterDecorator.class;
  public static final Class FACET = FacetDecorator.class;
  public static final Class VALIDATOR = ValidatorDecorator.class;
  public static final Class VALUE_CHANGE_LISTENER = IValueChangeListenerInfo.class;
  public static final Class ACTION_LISTENER = IActionListenerInfo.class;
  public static final String BASE_CLASS_UIINPUT = "javax.faces.component.UIInput";
  public static final String BASE_CLASS_UIOUTPUT = "javax.faces.component.UIOutput";
  public static final String BASE_CLASS_UICOMMAND = "javax.faces.component.UICommand";
  public static final String BASE_CLASS_UIDATA = "javax.faces.component.UIData";
  public static final String BASE_CLASS_UIFORM = "javax.faces.component.UIForm";
  public static final String INTERFACE_VALUEHOLDER = "javax.faces.component.ValueHolder";
  public static final String INTERFACE_EDITABLEVALUEHOLDER = "javax.faces.component.EditableValueHolder";
  public static final String INTERFACE_ACTIONSOURCE = "javax.faces.component.ActionSource";
  public static final String INTERFACE_ACTIONSOURCE2 = "javax.faces.component.ActionSource2";
  public static final String INTERFACE_NAMINGCONTAINER = "javax.faces.component.NamingContainer";
  
  public static ComponentInfo createComponentInfo(String id, ComponentInfo parent, ComponentTypeInfo typeInfo, boolean isRendered)
  {
    return new ComponentInfo(id, parent, typeInfo, isRendered);
  }
  
  public static void maybeDefaultRendered(Map attributes)
  {
    if (!(attributes.get("rendered") instanceof Boolean)) {
      attributes.put("rendered", Boolean.TRUE);
    }
  }
  
  public static ComponentInfo createComponentInfo(ComponentInfo parent, ComponentTypeInfo componentTypeInfo, Map attributes)
  {
    maybeDefaultRendered(attributes);
    return new ComponentInfo(parent, componentTypeInfo, attributes);
  }
  
  public static UIInputInfo createUIInputInfo(String id, ComponentInfo parent, ComponentTypeInfo typeInfo, IEditableValueHolderInfo editableValueHolder, boolean isRendered)
  {
    return new UIInputInfo(id, parent, typeInfo, editableValueHolder, 
      isRendered);
  }
  
  public static UIInputInfo createUIInputInfo(ComponentInfo parent, ComponentTypeInfo typeInfo, Map attributes)
  {
    maybeDefaultRendered(attributes);
    return new UIInputInfo(parent, typeInfo, attributes);
  }
  
  public static UIOutputInfo createUIOutputInfo(String id, ComponentInfo parent, ComponentTypeInfo typeInfo, IValueHolderInfo valueHolderInfo, boolean isRendered)
  {
    return new UIOutputInfo(id, parent, typeInfo, valueHolderInfo, 
      isRendered);
  }
  
  public static UIOutputInfo createUIOutputInfo(ComponentInfo parent, ComponentTypeInfo typeInfo, Map attributes)
  {
    maybeDefaultRendered(attributes);
    return new UIOutputInfo(parent, typeInfo, attributes);
  }
  
  public static UICommandInfo createUICommandInfo(String id, ComponentInfo parent, ComponentTypeInfo typeInfo, IActionSourceInfo actionSourceInfo, boolean isRendered)
  {
    return new UICommandInfo(id, parent, typeInfo, isRendered, 
      actionSourceInfo);
  }
  
  public static UICommandInfo createUICommandInfo(ComponentInfo parent, ComponentTypeInfo typeInfo, Map attributes)
  {
    maybeDefaultRendered(attributes);
    return new UICommandInfo(parent, typeInfo, attributes);
  }
  
  public static UIFormInfo createUIFormInfo(String id, ComponentInfo parent, ComponentTypeInfo typeInfo, boolean isRendered, boolean prependId, boolean submitted)
  {
    return new UIFormInfo(id, parent, typeInfo, isRendered, prependId, 
      submitted);
  }
  
  public static UIFormInfo createUIFormInfo(ComponentInfo parent, ComponentTypeInfo typeInfo, Map attributes)
  {
    maybeDefaultRendered(attributes);
    maybeDefaultPrependId(attributes);
    maybeDefaultSubmitted(attributes);
    return new UIFormInfo(parent, typeInfo, attributes);
  }
  
  private static void maybeDefaultSubmitted(Map attributes)
  {
    if (!(attributes.get("submitted") instanceof Boolean)) {
      attributes.put("submitted", Boolean.FALSE);
    }
  }
  
  private static void maybeDefaultPrependId(Map attributes)
  {
    if (!(attributes.get("prependId") instanceof Boolean)) {
      attributes.put("prependId", Boolean.FALSE);
    }
  }
  
  public static UIDataInfo createUIDataInfo(String id, ComponentInfo parent, ComponentTypeInfo typeInfo, boolean isRendered, DataModelInfo dataModel, int first, ComponentInfo footer, ComponentInfo header, int rowCount, boolean rowAvailable, Object rowData, int rowIndex, int rows, Object value, String var)
  {
    return new UIDataInfo(id, parent, typeInfo, isRendered, dataModel, 
      first, footer, header, rowCount, rowAvailable, rowData, 
      rowIndex, rows, value, var);
  }
  
  public static UIDataInfo createUIDataInfo(ComponentInfo parent, ComponentTypeInfo typeInfo, Map attributes)
  {
    maybeDefaultRendered(attributes);
    maybeDefaultFirst(attributes);
    maybeDefaultRowCount(attributes);
    maybeDefaultRowAvailable(attributes);
    maybeDefaultRowIndex(attributes);
    maybeDefaultRows(attributes);
    maybeDefaultVar(attributes);
    return new UIDataInfo(parent, typeInfo, attributes);
  }
  
  private static final Integer ZERO = new Integer(0);
  private static final Integer MINUS_ONE = new Integer(-1);
  
  private static void maybeDefaultFirst(Map attributes)
  {
    if (!(attributes.get("first") instanceof Integer)) {
      attributes.put("first", ZERO);
    }
  }
  
  private static void maybeDefaultRowCount(Map attributes)
  {
    if (!(attributes.get("rowCount") insta
1 2 3

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd