diff options
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural')
9 files changed, 0 insertions, 643 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/ActionSourceInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/ActionSourceInfo.java deleted file mode 100644 index 6e7348d65..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/ActionSourceInfo.java +++ /dev/null @@ -1,85 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -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.component.ComponentFactory; -import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ActionListenerDecorator; - -/** - * Implementation of the ActionSourceInfo. - * - * @author cbateman - * - */ -public class ActionSourceInfo implements IActionSourceInfo, IDesigntimeAdapter -{ - /** - * serializable id - */ - private static final long serialVersionUID = 6531166406473466685L; - private static final String[] INTERFACE = new String[]{ComponentFactory.INTERFACE_ACTIONSOURCE}; - private final String _action; - private final String _actionListener; - private final boolean _immediate; - private List/*<ActionListenerDecorator>*/ _actionListeners; - - /** - * @param action - * @param actionListener - * @param immediate - */ - public ActionSourceInfo(final String action, final String actionListener, - final boolean immediate) - { - super(); - _action = action; - _actionListener = actionListener; - _immediate = immediate; - } - - public void addActionListener(final 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; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/ActionSourceInfo2.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/ActionSourceInfo2.java deleted file mode 100644 index d36b95b76..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/ActionSourceInfo2.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -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.component.ComponentFactory; - -/** - * Implementation of the IActionSource2Info - * - * @author cbateman - * - */ -public class ActionSourceInfo2 extends ActionSourceInfo implements - IActionSource2Info, IDesigntimeAdapter -{ - /** - * serializable id - */ - private static final long serialVersionUID = 5811194815559772378L; - private static final String[] INTERFACE = new String[]{ComponentFactory.INTERFACE_ACTIONSOURCE2}; - - private final String _actionExpression; - - /** - * @param action - * @param actionListener - * @param immediate - * @param actionExpression - */ - public ActionSourceInfo2(final String action, final String actionListener, - final boolean immediate, final String actionExpression) { - super(action, actionListener, immediate); - _actionExpression = actionExpression; - } - - public String getActionExpression() { - return _actionExpression; - } - - public String[] getInterfaces() - { - return INTERFACE; - } - -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/EditableValueHolderInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/EditableValueHolderInfo.java deleted file mode 100644 index 8b07c45a5..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/EditableValueHolderInfo.java +++ /dev/null @@ -1,144 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -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.component.ComponentFactory; -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; - -/** - * Implementation of the IEditableValueHolderInfo - * - * @author cbateman - * - */ -public class EditableValueHolderInfo extends ValueHolderInfo implements - IEditableValueHolderInfo, IDesigntimeAdapter -{ - /** - * - */ - private static final long serialVersionUID = -2115990809157328451L; - private static final String[] INTERFACE = new String[] {ComponentFactory.INTERFACE_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; - - /** - * @param converterDecorator - * @param localValue - * @param value - * @param isImmediate - * @param isRequired - * @param isValid - * @param localSetValue - * @param submittedValue - * @param validator - * @param valueChangeListener - */ - public EditableValueHolderInfo(final ConverterDecorator converterDecorator, - final Object localValue, final Object value, final boolean isImmediate, - final boolean isRequired, final boolean isValid, final boolean localSetValue, - final Object submittedValue, final String validator, final 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(final ValidatorDecorator validator) - { - if (_validators == null) - { - _validators = new ArrayList(2); - } - _validators.add(validator); - } - - public void addValueChangeListener( - final 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; - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IActionSource2Info.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IActionSource2Info.java deleted file mode 100644 index 21966e118..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IActionSource2Info.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural; - -/** - * Design-time analog for the ActionSource2 interface. - * - * @author cbateman - * - */ -public interface IActionSource2Info extends IActionSourceInfo -{ - /** - * TODO: this method is similar to getAction on ActionSource from - * our perspective since the actual string rep of the EL is basically - * the same... - * - * @return an EL method expression that represents a call to - * an action method. - */ - String getActionExpression(); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IActionSourceInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IActionSourceInfo.java deleted file mode 100644 index 3d2dd2e61..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IActionSourceInfo.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -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; - -/** - * A design time analog for the runtime ActionSource interface. - * - * @author cbateman - * - */ -public interface IActionSourceInfo extends Serializable -{ - /** - * @return true if action listener associated with this action source - * should be executed immediately after the apply request values phase. - * Default is false. - */ - boolean isImmediate(); - - - /** - * Add the action listener to the list - * - * @param actionListener - */ - void addActionListener(ActionListenerDecorator actionListener); - - /** - * @return all action listeners registered. List should be considered - * immutable and may throw exceptions if modified. - */ - List/*<ActionListenerDecorator>*/ getActionListeners(); - - /** - * <b> NOTE: this method is deprecated in the runtime spec and exists for - * backward compatibility with JSF 1.1. You should avoid using it except in - * conjunction with JSF 1.1 tooling support. This method will be deprecated - * once the runtime spec removes the underlying API</b> - - * @return a method binding expression describing an action handler - */ - String getAction(); - - /** - * <b> NOTE: this method is deprecated in the runtime spec and exists for - * backward compatibility with JSF 1.1. You should avoid using it except in - * conjunction with JSF 1.1 tooling support. This method will be deprecated - * once the runtime spec removes the underlying API</b> - * - * @return a method binding expression describing an action listener - */ - String getActionListener(); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IEditableValueHolderInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IEditableValueHolderInfo.java deleted file mode 100644 index 53403d12a..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IEditableValueHolderInfo.java +++ /dev/null @@ -1,103 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -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; - -/** - * A design time analog for the JSF runtime EditableValueHolder interface. - * - * @author cbateman - * - */ -public interface IEditableValueHolderInfo extends IValueHolderInfo { - /** - * @return the flag indicating whether the value of the value holder should - * be evaluated in the apply request values phase instead of the - * process validations phase - */ - boolean isImmediate(); - - /** - * @return true if the value has been set - */ - boolean isLocalSetValue(); - - /** - * @return true if validation should consider this field required (must be - * non-empty). - */ - boolean isRequired(); - - /** - * @return the submitted, unconverted value of the component. - */ - Object getSubmittedValue(); - - /** - * @return false if validation has determined that the value property of - * this component is not valid. - */ - boolean isValid(); - - /** - * <b> NOTE: this method is deprecated in the runtime spec and exists for - * backward compatibility with JSF 1.1. You should avoid using it except in - * conjunction with JSF 1.1 tooling support. This method will be deprecated - * once the runtime spec removes the underlying API</b> - * - * @return a method binding expression that refers to a validator method - */ - String getValidator(); - - /** - * <b> NOTE: this method is deprecated in the runtime spec and exists for - * backward compatibility with JSF 1.1. You should avoid using it except in - * conjunction with JSF 1.1 tooling support. This method will be deprecated - * once the runtime spec removes the underlying API</b> - * - * @return a method binding expression that refers to a value change - * listener - */ - String getValueChangeListener(); - - /** - * Add validator to the list of validators for this component. Should be - * equivalent to - * {@link org.eclipse.jst.jsf.common.runtime.internal.model.ViewObject#addDecorator(org.eclipse.jst.jsf.common.runtime.internal.model.decorator.Decorator, Class)}. - * - * @param validator - */ - void addValidator(ValidatorDecorator validator); - - /** - * @return the list of validators for this component. Should be considered - * unmodifiable (may throw exception). - */ - List/* <ValidatorDecorator> */getValidators(); - - /** - * Add the value change listener to this component. - * - * @param valueChangeListenerInfo - */ - void addValueChangeListener( - ValueChangeListenerDecorator valueChangeListenerInfo); - - /** - * @return the list of value change listeners. Should be considered - * unmodifiable (may throw exception). - */ - List/* <ValueChangeListenerDecorator> */getValueChangeListeners(); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/INamingContainerInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/INamingContainerInfo.java deleted file mode 100644 index aeb1e985c..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/INamingContainerInfo.java +++ /dev/null @@ -1,51 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.jst.jsf.common.runtime.internal.model.behavioural; - -import java.io.Serializable; - -import org.eclipse.jst.jsf.common.runtime.internal.model.IDesigntimeAdapter; -import org.eclipse.jst.jsf.common.runtime.internal.model.component.ComponentFactory; - -/** - * Design time analog for the NamingContainer interface. - * - * @author cbateman - * - */ -public interface INamingContainerInfo extends Serializable -{ - // tagging interface - - /** - * Used as an adapter impl - */ - public final static INamingContainerInfo ADAPTER = new NamingContainerInfo(); - - /** - * A default naming container info - * @author cbateman - * - */ - public static class NamingContainerInfo implements INamingContainerInfo, IDesigntimeAdapter - { - /** - * - */ - private static final long serialVersionUID = 7214529928361444126L; - - public String[] getInterfaces() - { - return new String[] {ComponentFactory.INTERFACE_NAMINGCONTAINER}; - } - - } -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IValueHolderInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IValueHolderInfo.java deleted file mode 100644 index 661dd8192..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/IValueHolderInfo.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -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; - -/** - * Represents design time information about the ValueHolder behavioural - * interface. - * - * @author cbateman - * - */ -public interface IValueHolderInfo extends Serializable -{ - /** - * @return the value, may be null - */ - Object getValue(); - - /** - * @return the raw value without expression value evaluation. Note that - * {@link #getValue()} may return the same value in cases where this value - * holder is derived at design time without EL expression evaluation. May be null. - */ - Object getLocalValue(); - - /** - * @return the converter for this value holder or null if none. - */ - ConverterDecorator getConverter(); -} diff --git a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/ValueHolderInfo.java b/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/ValueHolderInfo.java deleted file mode 100644 index 25c8e2ea6..000000000 --- a/jsf/plugins/org.eclipse.jst.jsf.common.runtime/src/org/eclipse/jst/jsf/common/runtime/internal/model/behavioural/ValueHolderInfo.java +++ /dev/null @@ -1,68 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2008 Oracle Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Oracle Corporation - initial API and implementation - *******************************************************************************/ -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.component.ComponentFactory; -import org.eclipse.jst.jsf.common.runtime.internal.model.decorator.ConverterDecorator; - -/** - * Implementation of the IValueHolderInfo. - * - * @author cbateman - * - */ -public class ValueHolderInfo implements IValueHolderInfo, IDesigntimeAdapter -{ - /** - * - */ - private static final long serialVersionUID = 5000699728360703727L; - - /** - * the value (may include EL evaluation) - */ - protected final Object _value; - /** - * the raw value before EL evaluation. - */ - protected final Object _localValue; - /** - * the converter or null if none. - */ - protected final ConverterDecorator _converterDecorator; - - /** - * @param converterDecorator - * @param localValue - * @param value - */ - public ValueHolderInfo(final ConverterDecorator converterDecorator, - final Object localValue, final Object value) { - super(); - _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[] {ComponentFactory.INTERFACE_VALUEHOLDER}; - } -} |