JBoss Tools SVN: r2575 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-07-20 17:09:58 -0400 (Fri, 20 Jul 2007)
New Revision: 2575
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/ServerStatePollerType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/JMXPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/ProcessTerminatedPoller.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TwiddlePoller.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerStatePoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.core/schema/pollers.exsd
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java
Log:
Additions of pollers and change to the preference page for servers to show the possible pollers.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java 2007-07-20 18:43:09 UTC (rev 2574)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java 2007-07-20 21:09:58 UTC (rev 2575)
@@ -23,12 +23,15 @@
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.jboss.ide.eclipse.as.core.runtime.server.IServerPollerTimeoutListener;
+import org.jboss.ide.eclipse.as.core.runtime.server.IServerStatePoller;
+import org.jboss.ide.eclipse.as.core.runtime.server.ServerStatePollerType;
/**
*
@@ -71,5 +74,46 @@
}
}
}
+
+ private HashMap pollers;
+ public void loadPollers() {
+ pollers = new HashMap();
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IConfigurationElement[] cf = registry.getConfigurationElementsFor(JBossServerCorePlugin.PLUGIN_ID, "pollers");
+ for( int i = 0; i < cf.length; i++ ) {
+ pollers.put(cf[i].getAttribute("id"), new ServerStatePollerType(cf[i]));
+ }
+ }
+ public ServerStatePollerType getPollerType(String id) {
+ if( pollers == null )
+ loadPollers();
+ return (ServerStatePollerType)pollers.get(id);
+ }
+ public ServerStatePollerType[] getStartupPollers() {
+ if( pollers == null )
+ loadPollers();
+ ArrayList list = new ArrayList();
+ Iterator i = pollers.values().iterator();
+ ServerStatePollerType type;
+ while(i.hasNext()) {
+ type = (ServerStatePollerType)i.next();
+ if( type.supportsStartup())
+ list.add(type);
+ }
+ return (ServerStatePollerType[]) list.toArray(new ServerStatePollerType[list.size()]);
+ }
+ public ServerStatePollerType[] getShutdownPollers() {
+ if( pollers == null )
+ loadPollers();
+ ArrayList list = new ArrayList();
+ Iterator i = pollers.values().iterator();
+ ServerStatePollerType type;
+ while(i.hasNext()) {
+ type = (ServerStatePollerType)i.next();
+ if( type.supportsShutdown() )
+ list.add(type);
+ }
+ return (ServerStatePollerType[]) list.toArray(new ServerStatePollerType[list.size()]);
+ }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerStatePoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerStatePoller.java 2007-07-20 18:43:09 UTC (rev 2574)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerStatePoller.java 2007-07-20 21:09:58 UTC (rev 2575)
@@ -39,9 +39,6 @@
public void cancel(int type); // cancel the polling
public void cleanup(); // clean up any resources / processes. Will ALWAYS be called
- public boolean supportsStartup();
- public boolean supportsShutdown();
-
public class PollingException extends Exception {
public PollingException(String message) {super(message);}
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/ServerStatePollerType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/ServerStatePollerType.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/ServerStatePollerType.java 2007-07-20 21:09:58 UTC (rev 2575)
@@ -0,0 +1,29 @@
+package org.jboss.ide.eclipse.as.core.runtime.server;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+
+public class ServerStatePollerType {
+ private IConfigurationElement el;
+ public ServerStatePollerType(IConfigurationElement el) {
+ this.el = el;
+ }
+ public boolean supportsStartup() {
+ return Boolean.parseBoolean(el.getAttribute("supportsStartup"));
+ }
+ public boolean supportsShutdown() {
+ return Boolean.parseBoolean(el.getAttribute("supportsShutdown"));
+ }
+ public String getName() {
+ return el.getAttribute("name");
+ }
+ public String getId() {
+ return el.getAttribute("id");
+ }
+ public IServerStatePoller createPoller() {
+ try {
+ return (IServerStatePoller)el.createExecutableExtension("class");
+ } catch( Exception e ) {
+ }
+ return null;
+ }
+}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/JMXPoller.java (from rev 2565, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TwiddlePoller.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/JMXPoller.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/JMXPoller.java 2007-07-20 21:09:58 UTC (rev 2575)
@@ -0,0 +1,211 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+* This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ide.eclipse.as.core.runtime.server.polling;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.Principal;
+import java.util.Date;
+import java.util.Properties;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.naming.InitialContext;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.model.EventLogModel.EventLogTreeItem;
+import org.jboss.ide.eclipse.as.core.runtime.server.IServerStatePoller;
+import org.jboss.ide.eclipse.as.core.server.JBossServerLaunchConfiguration;
+import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.core.util.SimpleTreeItem;
+
+public class JMXPoller implements IServerStatePoller {
+
+ public static final String STATUS = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.status";
+
+ public static final String TYPE_TERMINATED = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.TYPE_TERMINATED";
+ public static final String TYPE_RESULT = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.TYPE_RESULT";
+
+ public static final int STATE_STARTED = 1;
+ public static final int STATE_STOPPED = 0;
+ public static final int STATE_TRANSITION = -1;
+
+ private boolean expectedState;
+ private int started;
+ private boolean canceled;
+ private boolean done;
+ private IServer server;
+ private PollingException pollingException = null;
+
+ private EventLogTreeItem event;
+ public void beginPolling(IServer server, boolean expectedState, PollThread pt) {
+ this.expectedState = expectedState;
+ this.canceled = false;
+ this.done = false;
+ this.server = server;
+ event = pt.getActiveEvent();
+ launchJMXPoller();
+ }
+
+ private class PollerRunnable implements Runnable {
+ public void run() {
+ ClassLoader currentLoader = Thread.currentThread().getContextClassLoader();
+ ClassLoader twiddleLoader = getClassLoader();
+ if( twiddleLoader != null ) {
+ int port = ServerConverter.getJBossServer(server).getJNDIPort();
+
+ Thread.currentThread().setContextClassLoader(twiddleLoader);
+ Properties props = new Properties();
+ props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
+ props.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
+ props.put("java.naming.provider.url","jnp://" + server.getHost() + ":" + port);
+
+ setCredentials();
+
+ while( !done && !canceled ) {
+ InitialContext ic;
+ try {
+ ic = new InitialContext(props);
+ Object obj = ic.lookup("jmx/invoker/RMIAdaptor");
+ ic.close();
+ if( obj instanceof MBeanServerConnection ) {
+ MBeanServerConnection connection = (MBeanServerConnection)obj;
+ Object attInfo = connection.getAttribute(new ObjectName("jboss.system:type=Server"), "Started");
+ boolean b = ((Boolean)attInfo).booleanValue();
+ started = b ? STATE_STARTED : STATE_TRANSITION;
+ if( b && expectedState )
+ done = true;
+ }
+ } catch( SecurityException se ) {
+ pollingException = new PollingSecurityException("Security Exception: " + se.getMessage());
+ done = true;
+ } catch( Exception e ) {
+ started = STATE_STOPPED;
+ if( !expectedState )
+ done = true;
+ }
+
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ } // end while
+ }
+
+ Thread.currentThread().setContextClassLoader(currentLoader);
+ }
+
+ protected void setCredentials() {
+ try {
+ ILaunchConfiguration lc = server.getLaunchConfiguration(true, new NullProgressMonitor());
+ String twiddleArgs = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS
+ + JBossServerLaunchConfiguration.PRGM_ARGS_TWIDDLE_SUFFIX, (String)null);
+ String user = ArgsUtil.getValue(twiddleArgs, "-u", "--user");
+ String password = ArgsUtil.getValue(twiddleArgs, "-p", "--password");
+
+ // get our methods
+ Class simplePrincipal = Thread.currentThread().getContextClassLoader().loadClass("org.jboss.security.SimplePrincipal");
+ Class securityAssoc = Thread.currentThread().getContextClassLoader().loadClass("org.jboss.security.SecurityAssociation");
+ securityAssoc.getMethods(); // force-init the methods since the class hasn't been initialized yet.
+
+ Constructor newSimplePrincipal = simplePrincipal.getConstructor(new Class[] { String.class });
+ Object newPrincipalInstance = newSimplePrincipal.newInstance(new Object[] {user});
+
+
+ // set the principal
+ Method setPrincipalMethod = securityAssoc.getMethod("setPrincipal", new Class[] {Principal.class});
+ setPrincipalMethod.invoke(null, new Object[] {newPrincipalInstance});
+
+ // set the credential
+ Method setCredentialMethod = securityAssoc.getMethod("setCredential", new Class[] {Object.class});
+ setCredentialMethod.invoke(null, new Object[] {password});
+ } catch( Exception e ) {
+ e.printStackTrace();
+ }
+ }
+ protected ClassLoader getClassLoader() {
+ try {
+ IRuntime rt = server.getRuntime();
+ IPath loc = rt.getLocation();
+ URL url = loc.append("client").append("jbossall-client.jar").toFile().toURI().toURL();
+ URL url2 = loc.append("bin").append("twiddle.jar").toFile().toURI().toURL();
+ URLClassLoader loader = new URLClassLoader(new URL[] {url, url2}, Thread.currentThread().getContextClassLoader());
+ return loader;
+ } catch( MalformedURLException murle) {
+ murle.printStackTrace();
+ }
+ return null;
+ }
+ }
+ private void launchJMXPoller() {
+ PollerRunnable run = new PollerRunnable();
+ Thread t = new Thread(run, "JMX Poller");
+ t.start();
+ }
+ public void cancel(int type) {
+ canceled = true;
+ }
+
+ public void cleanup() {
+ }
+
+ public class PollingSecurityException extends PollingException {
+ public PollingSecurityException(String msg) {super(msg);}
+ }
+
+ public boolean getState() throws PollingException {
+ if( pollingException != null ) throw pollingException;
+ if( started == 0 ) return SERVER_DOWN;
+ if( started == 1 ) return SERVER_UP;
+
+ if( !done && !canceled )
+ return !expectedState; // Not there yet.
+
+ return expectedState; // done or canceled, doesnt matter
+ }
+
+ public boolean isComplete() throws PollingException {
+ if( pollingException != null )
+ throw pollingException;
+ return done;
+ }
+
+ public class JMXPollerEvent extends EventLogTreeItem {
+ public JMXPollerEvent(SimpleTreeItem parent, String type, int status, boolean expectedState) {
+ super(parent, PollThread.SERVER_STATE_MAJOR_TYPE, type);
+ setProperty(PollThread.EXPECTED_STATE, new Boolean(expectedState));
+ setProperty(STATUS, new Integer(status));
+ setProperty(DATE, new Long(new Date().getTime()));
+ }
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java 2007-07-20 18:43:09 UTC (rev 2574)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java 2007-07-20 21:09:58 UTC (rev 2575)
@@ -24,7 +24,9 @@
import java.util.Date;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerAttributes;
import org.eclipse.wst.server.core.internal.ServerType;
+import org.jboss.ide.eclipse.as.core.ExtensionManager;
import org.jboss.ide.eclipse.as.core.model.EventLogModel;
import org.jboss.ide.eclipse.as.core.model.EventLogModel.EventLogRoot;
import org.jboss.ide.eclipse.as.core.model.EventLogModel.EventLogTreeItem;
@@ -34,6 +36,7 @@
import org.jboss.ide.eclipse.as.core.server.JBossServerBehavior;
import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.server.attributes.IServerPollingAttributes;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.core.util.SimpleTreeItem;
/**
@@ -63,15 +66,24 @@
private PollThreadEvent activeEvent;
- public PollThread(String name, IServerStatePoller poller, boolean expectedState, JBossServerBehavior behavior) {
+ public PollThread(String name, boolean expectedState, JBossServerBehavior behavior) {
super(name);
this.expectedState = expectedState;
- this.poller = poller;
this.abort = false;
this.behavior = behavior;
eventRoot = EventLogModel.getModel(behavior.getServer()).getRoot();
+
+ poller = discoverPoller(behavior, expectedState);
}
+ protected IServerStatePoller discoverPoller(JBossServerBehavior behavior, boolean expectedState) {
+ JBossServer s = ServerConverter.getJBossServer(behavior.getServer());
+ ServerAttributeHelper helper = s.getAttributeHelper();
+ String key = expectedState == IServerStatePoller.SERVER_UP ? IServerPollingAttributes.STARTUP_POLLER_KEY : IServerPollingAttributes.SHUTDOWN_POLLER_KEY;
+ String pollerId = helper.getAttribute(key, IServerPollingAttributes.DEFAULT_POLLER);
+ return ExtensionManager.getDefault().getPollerType(pollerId).createPoller();
+ }
+
public void cancel() {
abort = true;
}
@@ -155,8 +167,9 @@
} else {
if( currentState == IServerStatePoller.SERVER_UP )
behavior.setServerStarted();
- else
- behavior.setServerStopped();
+ else {
+ behavior.stop(true);
+ }
if( finalAlert ) alertEventLogSuccess(currentState);
}
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/ProcessTerminatedPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/ProcessTerminatedPoller.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/ProcessTerminatedPoller.java 2007-07-20 21:09:58 UTC (rev 2575)
@@ -0,0 +1,39 @@
+package org.jboss.ide.eclipse.as.core.runtime.server.polling;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.runtime.server.IServerStatePoller;
+import org.jboss.ide.eclipse.as.core.server.JBossServerBehavior;
+
+/**
+ * Essentially does nothing because the process already has a listener
+ * on it that sets the server state to stopped once the process dies.
+ *
+ * It's here to make the shutdown include no polling though, thus
+ * more efficient.
+ * @author rob
+ *
+ */
+public class ProcessTerminatedPoller implements IServerStatePoller {
+
+ private JBossServerBehavior server;
+ public void beginPolling(IServer server, boolean expectedState,
+ PollThread pt) {
+ this.server = (JBossServerBehavior)server.loadAdapter(JBossServerBehavior.class, new NullProgressMonitor());
+ }
+
+ public void cancel(int type) {
+ }
+
+ public void cleanup() {
+ }
+
+ public boolean getState() throws PollingException {
+ return !isComplete();
+ }
+
+ public boolean isComplete() throws PollingException {
+ return server.getProcess() == null || server.getProcess().isTerminated();
+ }
+
+}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TwiddlePoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TwiddlePoller.java 2007-07-20 18:43:09 UTC (rev 2574)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TwiddlePoller.java 2007-07-20 21:09:58 UTC (rev 2575)
@@ -1,245 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.runtime.server.polling;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.security.Principal;
-import java.util.Date;
-import java.util.Properties;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.model.EventLogModel;
-import org.jboss.ide.eclipse.as.core.model.EventLogModel.EventLogTreeItem;
-import org.jboss.ide.eclipse.as.core.model.legacy.DescriptorModel;
-import org.jboss.ide.eclipse.as.core.runtime.server.IServerStatePoller;
-import org.jboss.ide.eclipse.as.core.server.JBossServerLaunchConfiguration;
-import org.jboss.ide.eclipse.as.core.server.TwiddleLauncher;
-import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
-import org.jboss.ide.eclipse.as.core.util.SimpleTreeItem;
-
-public class TwiddlePoller implements IServerStatePoller {
-
- public static final String STATUS = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.status";
-
- public static final String TYPE_TERMINATED = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.TYPE_TERMINATED";
- public static final String TYPE_RESULT = "org.jboss.ide.eclipse.as.core.runtime.server.internal.TwiddlePoller.TYPE_RESULT";
-
- public static final int STATE_STARTED = 1;
- public static final int STATE_STOPPED = 0;
- public static final int STATE_TRANSITION = -1;
-
- private boolean expectedState;
- private int started;
- private boolean canceled;
- private boolean done;
- private IServer server;
- private PollingException pollingException = null;
-
- private EventLogTreeItem event;
- public void beginPolling(IServer server, boolean expectedState, PollThread pt) {
- this.expectedState = expectedState;
- this.canceled = false;
- this.done = false;
- this.server = server;
- event = pt.getActiveEvent();
- launchTwiddlePoller();
- }
-
- private class PollerRunnable implements Runnable {
- private TwiddleLauncher launcher;
- public void run() {
- ClassLoader currentLoader = Thread.currentThread().getContextClassLoader();
- ClassLoader twiddleLoader = getClassLoader();
- if( twiddleLoader != null ) {
- int port = ServerConverter.getJBossServer(server).getJNDIPort();
-
- Thread.currentThread().setContextClassLoader(twiddleLoader);
- Properties props = new Properties();
- props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
- props.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
- props.put("java.naming.provider.url","jnp://" + server.getHost() + ":" + port);
-
- setCredentials();
-
- while( !done && !canceled ) {
- InitialContext ic;
- try {
- ic = new InitialContext(props);
- Object obj = ic.lookup("jmx/invoker/RMIAdaptor");
- ic.close();
- if( obj instanceof MBeanServerConnection ) {
- MBeanServerConnection connection = (MBeanServerConnection)obj;
- Object attInfo = connection.getAttribute(new ObjectName("jboss.system:type=Server"), "Started");
- boolean b = ((Boolean)attInfo).booleanValue();
- started = b ? STATE_STARTED : STATE_TRANSITION;
- if( b && expectedState )
- done = true;
- }
- } catch( SecurityException se ) {
- pollingException = new PollingSecurityException("Security Exception: " + se.getMessage());
- done = true;
- } catch( Exception e ) {
- started = STATE_STOPPED;
- if( !expectedState )
- done = true;
- }
-
- try {
- Thread.sleep(500);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- } // end while
- }
-
- Thread.currentThread().setContextClassLoader(currentLoader);
-
- }
-
- protected void setCredentials() {
- try {
- ILaunchConfiguration lc = server.getLaunchConfiguration(true, new NullProgressMonitor());
- String twiddleArgs = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS
- + JBossServerLaunchConfiguration.PRGM_ARGS_TWIDDLE_SUFFIX, (String)null);
- String user = ArgsUtil.getValue(twiddleArgs, "-u", "--user");
- String password = ArgsUtil.getValue(twiddleArgs, "-p", "--password");
-
- // get our methods
- Class simplePrincipal = Thread.currentThread().getContextClassLoader().loadClass("org.jboss.security.SimplePrincipal");
- Class securityAssoc = Thread.currentThread().getContextClassLoader().loadClass("org.jboss.security.SecurityAssociation");
- securityAssoc.getMethods(); // force-init the methods since the class hasn't been initialized yet.
-
- Constructor newSimplePrincipal = simplePrincipal.getConstructor(new Class[] { String.class });
- Object newPrincipalInstance = newSimplePrincipal.newInstance(new Object[] {user});
-
-
- // set the principal
- Method setPrincipalMethod = securityAssoc.getMethod("setPrincipal", new Class[] {Principal.class});
- setPrincipalMethod.invoke(null, new Object[] {newPrincipalInstance});
-
- // set the credential
- Method setCredentialMethod = securityAssoc.getMethod("setCredential", new Class[] {Object.class});
- setCredentialMethod.invoke(null, new Object[] {password});
- } catch( Exception e ) {
- e.printStackTrace();
- }
- }
- protected ClassLoader getClassLoader() {
- try {
- IRuntime rt = server.getRuntime();
- IPath loc = rt.getLocation();
- URL url = loc.append("client").append("jbossall-client.jar").toFile().toURI().toURL();
- URL url2 = loc.append("bin").append("twiddle.jar").toFile().toURI().toURL();
- URLClassLoader loader = new URLClassLoader(new URL[] {url, url2}, Thread.currentThread().getContextClassLoader());
- return loader;
- } catch( MalformedURLException murle) {
- murle.printStackTrace();
- }
- return null;
- }
- public void setCanceled() {
- if( launcher != null ) {
- launcher.setCanceled();
- }
- }
- }
- public void eventTwiddleExecuted() {
- TwiddlePollerEvent tpe = new TwiddlePollerEvent(event, TYPE_RESULT, started, expectedState);
- EventLogModel.markChanged(event);
- }
- public void eventAllProcessesTerminated() {
- TwiddlePollerEvent tpe = new TwiddlePollerEvent(event, TYPE_TERMINATED, started, expectedState);
- EventLogModel.markChanged(event);
- }
-
- private void launchTwiddlePoller() {
- PollerRunnable run = new PollerRunnable();
- Thread t = new Thread(run, "Twiddle Poller");
- t.start();
- }
-
-
- public void cancel(int type) {
- canceled = true;
- }
-
- public void cleanup() {
- }
-
- public class PollingSecurityException extends PollingException {
- public PollingSecurityException(String msg) {super(msg);}
- }
-
- public boolean getState() throws PollingException {
- if( pollingException != null ) throw pollingException;
- if( started == 0 ) return SERVER_DOWN;
- if( started == 1 ) return SERVER_UP;
-
- if( !done && !canceled )
- return !expectedState; // Not there yet.
-
- return expectedState; // done or canceled, doesnt matter
- }
-
- public boolean isComplete() throws PollingException {
- if( pollingException != null )
- throw pollingException;
- return done;
- }
-
-
- public class TwiddlePollerEvent extends EventLogTreeItem {
- public TwiddlePollerEvent(SimpleTreeItem parent, String type, int status, boolean expectedState) {
- super(parent, PollThread.SERVER_STATE_MAJOR_TYPE, type);
- setProperty(PollThread.EXPECTED_STATE, new Boolean(expectedState));
- setProperty(STATUS, new Integer(status));
- setProperty(DATE, new Long(new Date().getTime()));
- }
- }
-
- public boolean supportsShutdown() {
- return true;
- }
-
- public boolean supportsStartup() {
- return true;
- }
-
-
-
-}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServerBehavior.java 2007-07-20 18:43:09 UTC (rev 2574)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/JBossServerBehavior.java 2007-07-20 21:09:58 UTC (rev 2575)
@@ -36,7 +36,7 @@
import org.jboss.ide.eclipse.as.core.model.EventLogModel.EventLogTreeItem;
import org.jboss.ide.eclipse.as.core.runtime.server.IServerStatePoller;
import org.jboss.ide.eclipse.as.core.runtime.server.polling.PollThread;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.TwiddlePoller;
+import org.jboss.ide.eclipse.as.core.runtime.server.polling.JMXPoller;
import org.jboss.ide.eclipse.as.core.server.stripped.DeployableServerBehavior;
public class JBossServerBehavior extends DeployableServerBehavior {
@@ -145,13 +145,15 @@
pollServer(IServerStatePoller.SERVER_DOWN);
}
+ public IProcess getProcess() {
+ return process;
+ }
-
protected void pollServer(final boolean expectedState) {
if( this.pollThread != null ) {
pollThread.cancel();
}
- this.pollThread = new PollThread("Server Poller", new TwiddlePoller(), expectedState, this);
+ this.pollThread = new PollThread("Server Poller", expectedState, this);
pollThread.start();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java 2007-07-20 18:43:09 UTC (rev 2574)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/attributes/IServerPollingAttributes.java 2007-07-20 21:09:58 UTC (rev 2575)
@@ -26,6 +26,9 @@
public static final String STOP_TIMEOUT = "org.jboss.ide.eclipse.as.core.server.attributes.stopTimeout";
public static final String TIMEOUT_BEHAVIOR = "org.jboss.ide.eclipse.as.core.server.attributes.timeoutBehavior";
+ public static final String STARTUP_POLLER_KEY = "org.jboss.ide.eclipse.as.core.server.attributes.startupPollerKey";
+ public static final String SHUTDOWN_POLLER_KEY = "org.jboss.ide.eclipse.as.core.server.attributes.shutdownPollerKey";
+ public static final String DEFAULT_POLLER = "org.jboss.ide.eclipse.as.core.runtime.server.twiddlepoller";
public static final boolean TIMEOUT_ABORT = true;
public static final boolean TIMEOUT_IGNORE = false;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-07-20 18:43:09 UTC (rev 2574)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-07-20 21:09:58 UTC (rev 2575)
@@ -290,11 +290,22 @@
<serverPoller
class="org.jboss.ide.eclipse.as.core.runtime.server.polling.TimeoutPoller"
id="org.jboss.ide.eclipse.as.core.runtime.server.timeoutpoller"
- name="Timeout Poller"/>
+ name="Timeout Poller"
+ supportsStartup="true"
+ supportsShutdown="true"/>
<serverPoller
- class="org.jboss.ide.eclipse.as.core.runtime.server.polling.TwiddlePoller"
- id="org.jboss.ide.eclipse.as.core.runtime.server.twiddlepoller"
- name="Twiddle Poller"/>
+ class="org.jboss.ide.eclipse.as.core.runtime.server.polling.JMXPoller"
+ id="org.jboss.ide.eclipse.as.core.runtime.server.JMXPoller"
+ name="JMX Poller"
+ supportsStartup="true"
+ supportsShutdown="true"/>
+ <serverPoller
+ class="org.jboss.ide.eclipse.as.core.runtime.server.polling.ProcessTerminatedPoller"
+ id="org.jboss.ide.eclipse.as.core.runtime.server.processTerminatedPoller"
+ name="Process Terminated Poller"
+ supportsShutdown="true"
+ supportsStartup="false">
+ </serverPoller>
</extension>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/schema/pollers.exsd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/schema/pollers.exsd 2007-07-20 18:43:09 UTC (rev 2574)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/schema/pollers.exsd 2007-07-20 21:09:58 UTC (rev 2575)
@@ -15,7 +15,6 @@
<sequence>
<element ref="serverPoller" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
-
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
@@ -69,6 +68,20 @@
</appInfo>
</annotation>
</attribute>
+ <attribute name="supportsStartup" type="boolean" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="supportsShutdown" type="boolean" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java 2007-07-20 18:43:09 UTC (rev 2574)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java 2007-07-20 21:09:58 UTC (rev 2575)
@@ -30,7 +30,6 @@
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -48,7 +47,9 @@
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
@@ -57,9 +58,13 @@
import org.eclipse.swt.widgets.Table;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.part.PageBook;
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.internal.ServerType;
import org.eclipse.wst.server.ui.ServerUICore;
+import org.jboss.ide.eclipse.as.core.ExtensionManager;
+import org.jboss.ide.eclipse.as.core.runtime.server.IServerStatePoller;
+import org.jboss.ide.eclipse.as.core.runtime.server.ServerStatePollerType;
import org.jboss.ide.eclipse.as.core.server.JBossServer;
import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.server.attributes.IServerPollingAttributes;
@@ -70,6 +75,16 @@
public class JBossServersPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
+ // for the main section
+ private JBossServer currentServer;
+ private Table serverTable;
+ private TableViewer serverTableViewer;
+ private HashMap workingCoppies;
+ private Group serverGroup, secondGroup;
+ private PageBook book;
+ private ServerPreferenceProvider[] groups;
+ int pageColumn = 55;
+
public JBossServersPreferencePage() {
super();
}
@@ -84,61 +99,26 @@
protected Control createContents(Composite parent) {
Composite main = new Composite(parent, SWT.BORDER);
-// main.setLayout(new GridLayout(1, false));
main.setLayout(new FormLayout());
-
createServerViewer(main);
- createTimeoutGroup(main);
+ createSecondGroup(main);
addListeners();
-
-
- // minimum width enforcer
-// Label l = new Label(main, SWT.NONE);
-// FormData lData = new FormData();
-// lData.left = new FormAttachment(0,0);
-// lData.right = new FormAttachment(0,600);
-// lData.bottom = new FormAttachment(100,0);
-// lData.top = new FormAttachment(100,0);
-// l.setLayoutData(lData);
-// main.layout();
-
-
return main;
}
- private JBossServer currentServer;
-
- private Group timeoutGroup;
- private Table serverTable;
- private TableViewer serverTableViewer;
- private Spinner stopSpinner, startSpinner;
- private Button abortOnTimeout, ignoreOnTimeout;
-
- private HashMap workingCoppies;
-
-
- // where the page fold is
- int pageColumn = 55;
-
- private Group serverGroup;
-
-
protected void createServerViewer(Composite main) {
serverGroup = new Group(main, SWT.NONE);
- // serverGroup.setLayout(new GridLayout(1, false));
FillLayout serverGroupLayout = new FillLayout();
serverGroupLayout.marginHeight = 5;
serverGroupLayout.marginWidth = 5;
serverGroup.setLayout(serverGroupLayout);
-// serverGroup.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
serverGroup.setText("Servers");
workingCoppies = new HashMap();
serverTable = new Table(serverGroup, SWT.BORDER);
-// serverTable.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
FormData lData = new FormData();
lData.left = new FormAttachment(0,5);
lData.right = new FormAttachment(100,-5);
@@ -188,96 +168,29 @@
}
- protected void createTimeoutGroup(Composite main) {
- timeoutGroup = new Group(main, SWT.NONE);
- timeoutGroup.setText(Messages.PreferencePageServerTimeouts);
-// timeoutGroup.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));
- FormData groupData = new FormData();
-
- groupData.left = new FormAttachment(0, 5);
- groupData.right = new FormAttachment(100, -5);
- groupData.top = new FormAttachment(serverGroup,5);
- timeoutGroup.setLayoutData(groupData);
+ protected void createSecondGroup(Composite main) {
+ secondGroup = new Group(main, SWT.NONE);
- timeoutGroup.setLayout(new FormLayout());
-
- // add two textboxes, two labels
- Label startTimeoutLabel, stopTimeoutLabel;
-
- startTimeoutLabel = new Label(timeoutGroup, SWT.NONE);
- stopTimeoutLabel = new Label(timeoutGroup, SWT.NONE);
-
- stopSpinner = new Spinner(timeoutGroup, SWT.BORDER);
- startSpinner = new Spinner(timeoutGroup, SWT.BORDER);
-
- FormData startTD = new FormData();
- startTD.left = new FormAttachment(0,5);
- startTD.top = new FormAttachment(0,5);
- startTimeoutLabel.setLayoutData(startTD);
- startTimeoutLabel.setText(Messages.PreferencePageStartTimeouts);
-
- FormData stopTD = new FormData();
- stopTD.left = new FormAttachment(0,5);
- stopTD.top = new FormAttachment(startSpinner,4);
- stopTimeoutLabel.setLayoutData(stopTD);
- stopTimeoutLabel.setText(Messages.PreferencePageStopTimeouts);
-
- timeoutGroup.layout();
- int startWidth = startTimeoutLabel.getSize().x;
- int stopWidth = stopTimeoutLabel.getSize().x;
-
- Label widest = startWidth > stopWidth ? startTimeoutLabel : stopTimeoutLabel;
-
- FormData startD = new FormData();
- startD.left = new FormAttachment(0,widest.getSize().x + widest.getLocation().x + 5);
- startD.right = new FormAttachment(100, -5);
- startD.top = new FormAttachment(0,5);
- startSpinner.setLayoutData(startD);
-
- FormData stopD = new FormData();
- stopD.left = new FormAttachment(0,widest.getSize().x + widest.getLocation().x + 5);
- stopD.right = new FormAttachment(100, -5);
- stopD.top = new FormAttachment(startSpinner,5);
- stopSpinner.setLayoutData(stopD);
-
-
- stopSpinner.setMinimum(0);
- startSpinner.setMinimum(0);
- stopSpinner.setIncrement(1);
- startSpinner.setIncrement(1);
- stopSpinner.setEnabled(false);
- startSpinner.setEnabled(false);
-
- Label uponTimeoutLabel = new Label(timeoutGroup, SWT.NONE);
- abortOnTimeout = new Button(timeoutGroup, SWT.RADIO);
- ignoreOnTimeout = new Button(timeoutGroup, SWT.RADIO);
-
- FormData utl = new FormData();
- utl.left = new FormAttachment(0,5);
- utl.right = new FormAttachment(100, -5);
- utl.top = new FormAttachment(stopSpinner,5);
- uponTimeoutLabel.setLayoutData(utl);
+ FormData lData = new FormData();
+ lData.left = new FormAttachment(0,5);
+ lData.right = new FormAttachment(100,-5);
+ lData.top = new FormAttachment(serverGroup,5);
+ lData.bottom = new FormAttachment(100,-5);
+ secondGroup.setLayoutData(lData);
- FormData b1D = new FormData();
- b1D.left = new FormAttachment(0,15);
- b1D.right = new FormAttachment(100, -5);
- b1D.top = new FormAttachment(uponTimeoutLabel,5);
- abortOnTimeout.setLayoutData(b1D);
- FormData b2D = new FormData();
- b2D.left = new FormAttachment(0,15);
- b2D.right = new FormAttachment(100, -5);
- b2D.top = new FormAttachment(abortOnTimeout,5);
- ignoreOnTimeout.setLayoutData(b2D);
- uponTimeoutLabel.setText(Messages.PreferencePageUponTimeout);
- abortOnTimeout.setText(Messages.PreferencePageUponTimeoutAbort);
- ignoreOnTimeout.setText(Messages.PreferencePageUponTimeoutIgnore);
- abortOnTimeout.setEnabled(false);
- ignoreOnTimeout.setEnabled(false);
-
+ secondGroup.setLayout(new FillLayout());
+ book = new PageBook(secondGroup, SWT.NONE);
+ groups = new ServerPreferenceProvider[] {
+ new TimeoutComposite(book)
+ };
+ book.showPage(groups[0]);
+ secondGroup.setText(groups[0].getName());
}
+
+
private void addListeners() {
serverTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
@@ -285,76 +198,17 @@
serverSelected(sel.getFirstElement() == null ? null : (JBossServer)sel.getFirstElement());
}
});
-
- startSpinner.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- getSelectedWC().setAttribute(IServerPollingAttributes.START_TIMEOUT, startSpinner.getSelection() * 1000);
- }
- });
- stopSpinner.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- getSelectedWC().setAttribute(IServerPollingAttributes.STOP_TIMEOUT, stopSpinner.getSelection() * 1000);
- }
- });
-
- abortOnTimeout.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- public void widgetSelected(SelectionEvent e) {
- if( getSelectedWC() != null )
- getSelectedWC().setAttribute(IServerPollingAttributes.TIMEOUT_BEHAVIOR, IServerPollingAttributes.TIMEOUT_ABORT);
- }
- });
- ignoreOnTimeout.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- public void widgetSelected(SelectionEvent e) {
- if( getSelectedWC() != null )
- getSelectedWC().setAttribute(IServerPollingAttributes.TIMEOUT_BEHAVIOR, IServerPollingAttributes.TIMEOUT_IGNORE);
- }
- });
-
}
-
+
private void serverSelected(JBossServer server) {
currentServer = server;
ServerAttributeHelper wcHelper = getWCHelper(server);
-
- /* Handle spinners */
- startSpinner.setMaximum(((ServerType)server.getServer().getServerType()).getStartTimeout() / 1000);
- stopSpinner.setMaximum(((ServerType)server.getServer().getServerType()).getStopTimeout() / 1000);
- startSpinner.setSelection(getStartTimeout(wcHelper));
- stopSpinner.setSelection(getStopTimeout(wcHelper));
-
- startSpinner.setEnabled(true);
- stopSpinner.setEnabled(true);
- abortOnTimeout.setEnabled(true);
- ignoreOnTimeout.setEnabled(true);
-
- boolean currentVal = wcHelper.getAttribute(IServerPollingAttributes.TIMEOUT_BEHAVIOR, IServerPollingAttributes.TIMEOUT_IGNORE);
- if( currentVal == IServerPollingAttributes.TIMEOUT_ABORT) {
- abortOnTimeout.setSelection(true);
- ignoreOnTimeout.setSelection(false);
- } else {
- abortOnTimeout.setSelection(false);
- ignoreOnTimeout.setSelection(true);
+ for( int i = 0; i < groups.length; i++ ) {
+ try {
+ groups[i].serverSelected(server, wcHelper);
+ } catch( Exception e ) {}
}
}
-
- public int getStartTimeout(ServerAttributeHelper helper) {
- int prop = helper.getAttribute(IServerPollingAttributes.START_TIMEOUT, -1);
- int max = ((ServerType)helper.getServer().getServerType()).getStartTimeout();
-
- if( prop <= 0 || prop > max ) return max / 1000;
- return prop / 1000;
- }
- public int getStopTimeout(ServerAttributeHelper helper) {
- int prop = helper.getAttribute(IServerPollingAttributes.STOP_TIMEOUT, -1);
- int max = ((ServerType)helper.getServer().getServerType()).getStopTimeout();
-
- if( prop <= 0 || prop > max ) return max / 1000;
- return prop / 1000;
- }
private ServerAttributeHelper getWCHelper(JBossServer server) {
@@ -368,28 +222,12 @@
}
private ServerAttributeHelper getSelectedWC() {
- IStructuredSelection sel = (IStructuredSelection)serverTableViewer.getSelection();
- if( sel != null && sel.getFirstElement() != null ) {
- return getWCHelper((JBossServer)sel.getFirstElement());
- }
- return null;
+ return currentServer == null ? null : getWCHelper(currentServer);
}
public void init(IWorkbench workbench) {
}
-
- public Object getFirstSelected(Viewer viewer) {
- ISelection sel = viewer.getSelection();
- if( sel instanceof IStructuredSelection) {
- Object o = ((IStructuredSelection)sel).getFirstElement();
- return o;
- }
- return null;
- }
-
-
-
-
+
public boolean performOk() {
super.performOk();
saveDirtyWorkingCoppies();
@@ -417,7 +255,275 @@
}
}
- public boolean performCancel() {
- return super.performCancel();
+ public static abstract class ServerPreferenceProvider extends Composite {
+ protected String name;
+ public ServerPreferenceProvider(Composite parent, int style,
+ String name) {
+ super(parent, style);
+ this.name = name;
+ }
+ public String getName() { return name; }
+ public abstract void serverSelected(JBossServer server, ServerAttributeHelper helper);
}
+
+ public static class TimeoutComposite extends ServerPreferenceProvider {
+
+ private Spinner stopSpinner, startSpinner;
+ private Button abortOnTimeout, ignoreOnTimeout;
+ private JBossServer server;
+ private ServerAttributeHelper helper;
+ private Composite durations, behavior, pollers;
+
+ // polling
+ private Combo startPollerCombo, stopPollerCombo;
+ private String[] startupTypesStrings, shutdownTypesStrings;
+ ServerStatePollerType[] startupTypes, shutdownTypes;
+
+ public TimeoutComposite(Composite parent) {
+ super(parent, SWT.NONE, Messages.PreferencePageServerTimeouts);
+
+ findPossiblePollers();
+
+ setLayout(new FormLayout());
+ createTimeoutDurations();
+ createTimeoutBehavior();
+ createPollerChoices();
+
+ durations.setLayoutData(createLayoutData(null));
+ behavior.setLayoutData(createLayoutData(durations));
+ pollers.setLayoutData(createLayoutData(behavior));
+ addTimeoutListeners();
+ }
+
+ protected void findPossiblePollers() {
+ startupTypes = ExtensionManager.getDefault().getStartupPollers();
+ shutdownTypes = ExtensionManager.getDefault().getShutdownPollers();
+ startupTypesStrings = new String[startupTypes.length];
+ shutdownTypesStrings = new String[shutdownTypes.length];
+
+ for( int i = 0; i < startupTypes.length; i++ ) {
+ startupTypesStrings[i] = startupTypes[i].getName();
+ }
+ for( int i = 0; i < shutdownTypes.length; i++ ) {
+ shutdownTypesStrings[i] = shutdownTypes[i].getName();
+ }
+ }
+
+ private FormData createLayoutData(Composite top) {
+ FormData data = new FormData();
+ if( top == null ) data.top = new FormAttachment(0,5);
+ else data.top = new FormAttachment(top, 5);
+ data.left = new FormAttachment(0,5);
+ data.right = new FormAttachment(100,-5);
+ return data;
+ }
+ public void serverSelected(JBossServer server,
+ ServerAttributeHelper helper) {
+ this.server = server;
+ this.helper = helper;
+ timeoutServerSelected();
+ }
+
+ protected void createTimeoutDurations() {
+ durations = new Composite(this, SWT.NONE);
+ durations.setLayout(new FormLayout());
+
+ // add two textboxes, two labels
+ Label startTimeoutLabel, stopTimeoutLabel;
+
+ startTimeoutLabel = new Label(durations, SWT.NONE);
+ stopTimeoutLabel = new Label(durations, SWT.NONE);
+
+ stopSpinner = new Spinner(durations, SWT.BORDER);
+ startSpinner = new Spinner(durations, SWT.BORDER);
+
+ FormData startTD = new FormData();
+ startTD.left = new FormAttachment(0,5);
+ startTD.top = new FormAttachment(0,7);
+ startTimeoutLabel.setLayoutData(startTD);
+ startTimeoutLabel.setText(Messages.PreferencePageStartTimeouts);
+
+ FormData stopTD = new FormData();
+ stopTD.left = new FormAttachment(0,5);
+ stopTD.top = new FormAttachment(startSpinner,7);
+ stopTimeoutLabel.setLayoutData(stopTD);
+ stopTimeoutLabel.setText(Messages.PreferencePageStopTimeouts);
+
+ durations.layout();
+ int startWidth = startTimeoutLabel.getSize().x;
+ int stopWidth = stopTimeoutLabel.getSize().x;
+
+ Label widest = startWidth > stopWidth ? startTimeoutLabel : stopTimeoutLabel;
+
+ FormData startD = new FormData();
+ startD.left = new FormAttachment(0,widest.getSize().x + widest.getLocation().x + 5);
+ startD.right = new FormAttachment(100, -5);
+ startD.top = new FormAttachment(0,5);
+ startSpinner.setLayoutData(startD);
+
+ FormData stopD = new FormData();
+ stopD.left = new FormAttachment(0,widest.getSize().x + widest.getLocation().x + 5);
+ stopD.right = new FormAttachment(100, -5);
+ stopD.top = new FormAttachment(startSpinner,5);
+ stopSpinner.setLayoutData(stopD);
+
+
+ stopSpinner.setMinimum(0);
+ startSpinner.setMinimum(0);
+ stopSpinner.setIncrement(1);
+ startSpinner.setIncrement(1);
+ stopSpinner.setEnabled(false);
+ startSpinner.setEnabled(false);
+
+ }
+
+ protected void createTimeoutBehavior() {
+ behavior = new Composite(this, SWT.NONE);
+ behavior.setLayout(new FormLayout());
+
+ Label uponTimeoutLabel = new Label(behavior, SWT.NONE);
+ abortOnTimeout = new Button(behavior, SWT.RADIO);
+ ignoreOnTimeout = new Button(behavior, SWT.RADIO);
+
+ FormData utl = new FormData();
+ utl.left = new FormAttachment(0,5);
+ utl.right = new FormAttachment(100, -5);
+ utl.top = new FormAttachment(0,5);
+ uponTimeoutLabel.setLayoutData(utl);
+
+ FormData b1D = new FormData();
+ b1D.left = new FormAttachment(0,15);
+ b1D.right = new FormAttachment(100, -5);
+ b1D.top = new FormAttachment(uponTimeoutLabel,5);
+ abortOnTimeout.setLayoutData(b1D);
+
+ FormData b2D = new FormData();
+ b2D.left = new FormAttachment(0,15);
+ b2D.right = new FormAttachment(100, -5);
+ b2D.top = new FormAttachment(abortOnTimeout,5);
+ ignoreOnTimeout.setLayoutData(b2D);
+
+ uponTimeoutLabel.setText(Messages.PreferencePageUponTimeout);
+ abortOnTimeout.setText(Messages.PreferencePageUponTimeoutAbort);
+ ignoreOnTimeout.setText(Messages.PreferencePageUponTimeoutIgnore);
+ abortOnTimeout.setEnabled(false);
+ ignoreOnTimeout.setEnabled(false);
+
+ }
+
+ protected void createPollerChoices() {
+ pollers = new Composite(this, SWT.NONE);
+ pollers.setLayout(new GridLayout(2, false));
+
+ // create widgets
+ Label start, stop;
+ start = new Label(pollers, SWT.NONE);
+ startPollerCombo = new Combo(pollers, SWT.READ_ONLY);
+ stop = new Label(pollers, SWT.NONE);
+ stopPollerCombo = new Combo(pollers, SWT.READ_ONLY);
+
+ start.setText("Startup Poller");
+ stop.setText("Shutdown Poller");
+
+ // set items
+ startPollerCombo.setItems(startupTypesStrings);
+ stopPollerCombo.setItems(shutdownTypesStrings);
+
+ startPollerCombo.setEnabled(false);
+ stopPollerCombo.setEnabled(false);
+ }
+
+ private void addTimeoutListeners() {
+ startSpinner.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ if( helper != null )
+ helper.setAttribute(IServerPollingAttributes.START_TIMEOUT, startSpinner.getSelection() * 1000);
+ }
+ });
+ stopSpinner.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ if( helper != null )
+ helper.setAttribute(IServerPollingAttributes.STOP_TIMEOUT, stopSpinner.getSelection() * 1000);
+ }
+ });
+
+ abortOnTimeout.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ public void widgetSelected(SelectionEvent e) {
+ if( helper != null )
+ helper.setAttribute(IServerPollingAttributes.TIMEOUT_BEHAVIOR, IServerPollingAttributes.TIMEOUT_ABORT);
+ }
+ });
+ ignoreOnTimeout.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ public void widgetSelected(SelectionEvent e) {
+ if( helper != null )
+ helper.setAttribute(IServerPollingAttributes.TIMEOUT_BEHAVIOR, IServerPollingAttributes.TIMEOUT_IGNORE);
+ }
+ });
+ startPollerCombo.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ public void widgetSelected(SelectionEvent e) {
+ if( helper != null )
+ helper.setAttribute(IServerPollingAttributes.STARTUP_POLLER_KEY, startupTypes[startPollerCombo.getSelectionIndex()].getId());
+ }
+ });
+ stopPollerCombo.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ public void widgetSelected(SelectionEvent e) {
+ if( helper != null )
+ helper.setAttribute(IServerPollingAttributes.SHUTDOWN_POLLER_KEY, shutdownTypes[stopPollerCombo.getSelectionIndex()].getId());
+ }
+ });
+ }
+
+ private void timeoutServerSelected() {
+ // Handle spinners
+ startSpinner.setMaximum(((ServerType)server.getServer().getServerType()).getStartTimeout() / 1000);
+ stopSpinner.setMaximum(((ServerType)server.getServer().getServerType()).getStopTimeout() / 1000);
+ startSpinner.setSelection(getStartTimeout(helper));
+ stopSpinner.setSelection(getStopTimeout(helper));
+
+ startSpinner.setEnabled(true);
+ stopSpinner.setEnabled(true);
+ abortOnTimeout.setEnabled(true);
+ ignoreOnTimeout.setEnabled(true);
+
+ boolean currentVal = helper.getAttribute(IServerPollingAttributes.TIMEOUT_BEHAVIOR, IServerPollingAttributes.TIMEOUT_IGNORE);
+ if( currentVal == IServerPollingAttributes.TIMEOUT_ABORT) {
+ abortOnTimeout.setSelection(true);
+ ignoreOnTimeout.setSelection(false);
+ } else {
+ abortOnTimeout.setSelection(false);
+ ignoreOnTimeout.setSelection(true);
+ }
+
+ // poller
+ stopPollerCombo.setEnabled(true);
+ startPollerCombo.setEnabled(true);
+ String currentStartId = helper.getAttribute(IServerPollingAttributes.STARTUP_POLLER_KEY, IServerPollingAttributes.DEFAULT_POLLER);
+ String currentStopId = helper.getAttribute(IServerPollingAttributes.SHUTDOWN_POLLER_KEY, IServerPollingAttributes.DEFAULT_POLLER);
+ startPollerCombo.select(startPollerCombo.indexOf(ExtensionManager.getDefault().getPollerType(currentStartId).getName()));
+ stopPollerCombo.select(stopPollerCombo.indexOf(ExtensionManager.getDefault().getPollerType(currentStopId).getName()));
+ }
+
+ public int getStartTimeout(ServerAttributeHelper helper) {
+ int prop = helper.getAttribute(IServerPollingAttributes.START_TIMEOUT, -1);
+ int max = ((ServerType)helper.getServer().getServerType()).getStartTimeout();
+
+ if( prop <= 0 || prop > max ) return max / 1000;
+ return prop / 1000;
+ }
+ public int getStopTimeout(ServerAttributeHelper helper) {
+ int prop = helper.getAttribute(IServerPollingAttributes.STOP_TIMEOUT, -1);
+ int max = ((ServerType)helper.getServer().getServerType()).getStopTimeout();
+
+ if( prop <= 0 || prop > max ) return max / 1000;
+ return prop / 1000;
+ }
+ }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java 2007-07-20 18:43:09 UTC (rev 2574)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java 2007-07-20 21:09:58 UTC (rev 2575)
@@ -37,7 +37,7 @@
import org.jboss.ide.eclipse.as.core.model.EventLogModel.EventLogTreeItem;
import org.jboss.ide.eclipse.as.core.runtime.server.IServerStatePoller;
import org.jboss.ide.eclipse.as.core.runtime.server.polling.PollThread;
-import org.jboss.ide.eclipse.as.core.runtime.server.polling.TwiddlePoller;
+import org.jboss.ide.eclipse.as.core.runtime.server.polling.JMXPoller;
import org.jboss.ide.eclipse.as.core.runtime.server.polling.PollThread.PollThreadEvent;
import org.jboss.ide.eclipse.as.core.server.JBossServerBehavior;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.IEventLogLabelProvider;
@@ -59,8 +59,8 @@
supported.add(PollThread.POLL_THREAD_TIMEOUT);
supported.add(PollThread.POLL_THREAD_EXCEPTION);
- supported.add(TwiddlePoller.TYPE_TERMINATED);
- supported.add(TwiddlePoller.TYPE_RESULT);
+ supported.add(JMXPoller.TYPE_TERMINATED);
+ supported.add(JMXPoller.TYPE_RESULT);
supported.add(JBossServerBehavior.FORCE_SHUTDOWN_EVENT_KEY);
}
@@ -84,15 +84,15 @@
return getErrorImage();
}
- if( element.getSpecificType().equals(TwiddlePoller.TYPE_TERMINATED)) return getErrorImage();
- if( element.getSpecificType().equals(TwiddlePoller.TYPE_RESULT)) {
- int state = ((Integer)element.getProperty(TwiddlePoller.STATUS)).intValue();
+ if( element.getSpecificType().equals(JMXPoller.TYPE_TERMINATED)) return getErrorImage();
+ if( element.getSpecificType().equals(JMXPoller.TYPE_RESULT)) {
+ int state = ((Integer)element.getProperty(JMXPoller.STATUS)).intValue();
boolean expectedState = ((Boolean)element.getProperty(PollThread.EXPECTED_STATE)).booleanValue();
- if( state == TwiddlePoller.STATE_STOPPED)
+ if( state == JMXPoller.STATE_STOPPED)
return getStoppedImage();
- if( state == TwiddlePoller.STATE_STARTED)
+ if( state == JMXPoller.STATE_STARTED)
return getStartedImage();
- if( state == TwiddlePoller.STATE_TRANSITION) {
+ if( state == JMXPoller.STATE_TRANSITION) {
if( expectedState == IServerStatePoller.SERVER_UP )
return getStartingImage();
return getStoppingImage();
@@ -119,15 +119,15 @@
if( element.getSpecificType().equals(PollThread.FAILURE)) return expectedString + " failed";
}
- if( element.getSpecificType().equals(TwiddlePoller.TYPE_TERMINATED)) return "All processes have been terminated";
- if( element.getSpecificType().equals(TwiddlePoller.TYPE_RESULT)) {
- int state = ((Integer)element.getProperty(TwiddlePoller.STATUS)).intValue();
+ if( element.getSpecificType().equals(JMXPoller.TYPE_TERMINATED)) return "All processes have been terminated";
+ if( element.getSpecificType().equals(JMXPoller.TYPE_RESULT)) {
+ int state = ((Integer)element.getProperty(JMXPoller.STATUS)).intValue();
boolean expectedState = ((Boolean)element.getProperty(PollThread.EXPECTED_STATE)).booleanValue();
- if( state == TwiddlePoller.STATE_STOPPED)
+ if( state == JMXPoller.STATE_STOPPED)
return "The server is down.";
- if( state == TwiddlePoller.STATE_STARTED)
+ if( state == JMXPoller.STATE_STARTED)
return "The server is up.";
- if( state == TwiddlePoller.STATE_TRANSITION) {
+ if( state == JMXPoller.STATE_TRANSITION) {
if( expectedState == IServerStatePoller.SERVER_UP )
return "The server is still starting";
return "The server is still stopping.";
@@ -168,13 +168,13 @@
protected void loadPropertyMap() {
// property names and their readable forms
propertyToMessageMap.put(EventLogTreeItem.DATE, "Time");
- propertyToMessageMap.put(TwiddlePoller.STATUS, "Status");
+ propertyToMessageMap.put(JMXPoller.STATUS, "Status");
propertyToMessageMap.put(PollThread.EXPECTED_STATE, "Expected State");
// now values and their readable forms
- propertyToMessageMap.put(TwiddlePoller.STATUS + DELIMITER + 0, "Server is Down");
- propertyToMessageMap.put(TwiddlePoller.STATUS + DELIMITER + 1, "Server is Up");
- propertyToMessageMap.put(TwiddlePoller.STATUS + DELIMITER + -1, "Server is in transition");
+ propertyToMessageMap.put(JMXPoller.STATUS + DELIMITER + 0, "Server is Down");
+ propertyToMessageMap.put(JMXPoller.STATUS + DELIMITER + 1, "Server is Up");
+ propertyToMessageMap.put(JMXPoller.STATUS + DELIMITER + -1, "Server is in transition");
propertyToMessageMap.put(PollThread.EXPECTED_STATE + DELIMITER + "true", "Up");
propertyToMessageMap.put(PollThread.EXPECTED_STATE + DELIMITER + "false", "Down");
}
17 years, 3 months
JBoss Tools SVN: r2574 - in trunk/seam/plugins: org.jboss.tools.seam.core/META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-07-20 14:43:09 -0400 (Fri, 20 Jul 2007)
New Revision: 2574
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidationHelper.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java
Removed:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidationHelper.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELCompletionEngine.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamExpressionResolver.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidator.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalComputer.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
Log:
http://jira.jboss.com/jira/browse/EXIN-327 EL Validation in XML
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF 2007-07-20 17:46:54 UTC (rev 2573)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF 2007-07-20 18:43:09 UTC (rev 2574)
@@ -23,7 +23,8 @@
org.eclipse.wst.validation,
org.eclipse.jst.j2ee.web,
org.eclipse.jst.j2ee,
- org.eclipse.jst.ws
+ org.eclipse.jst.ws,
+ org.eclipse.jface.text
Provide-Package: org.jboss.tools.seam.core,
org.jboss.tools.seam.internal.core,
org.jboss.tools.seam.internal.core.scanner,
@@ -32,6 +33,8 @@
Export-Package: org.jboss.tools.seam.core,
org.jboss.tools.seam.core.event,
org.jboss.tools.seam.internal.core,
+ org.jboss.tools.seam.internal.core.el,
+ org.jboss.tools.seam.internal.core.preferences,
org.jboss.tools.seam.internal.core.project.facet,
org.jboss.tools.seam.internal.core.scanner,
org.jboss.tools.seam.internal.core.scanner.java,
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2007-07-20 17:46:54 UTC (rev 2573)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2007-07-20 18:43:09 UTC (rev 2574)
@@ -141,10 +141,10 @@
objectClass="org.eclipse.core.resources.IFile"
nameFilter="*.xml"/>
<markerId
- markerIdValue="seamProblem">
+ markerIdValue="seamCoreProblem">
</markerId>
<helper
- class="org.jboss.tools.seam.internal.core.validation.SeamCoreValidationHelper">
+ class="org.jboss.tools.seam.internal.core.validation.SeamValidationHelper">
</helper>
<run
class="org.jboss.tools.seam.internal.core.validation.SeamCoreValidator"
@@ -153,15 +153,75 @@
/>
</validator>
</extension>
+ <extension
+ point="org.eclipse.wst.validation.validator"
+ id="SeamELValidator"
+ name="Seam EL Validator">
+ <validator>
+ <projectNature id="org.jboss.tools.seam.core.seamnature" />
+ <filter
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.java"/>
+ <filter
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.xml"/>
+ <filter
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.xhtml"/>
+ <filter
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.jsp">
+ </filter>
+ <filter
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.jspf">
+ </filter>
+ <filter
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.jsf">
+ </filter>
+ <filter
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.jsv">
+ </filter>
+ <filter
+ objectClass="org.eclipse.core.resources.IFile"
+ nameFilter="*.jtpl">
+ </filter>
+ <contentTypeBinding contentTypeId="org.eclipse.jst.jsp.core.jspsource"/>
+ <contentTypeBinding contentTypeId="org.eclipse.jst.jsp.core.jspfragmentsource"/>
+ <contentTypeBinding contentTypeId="org.eclipse.jst.jsp.core.tagsource"/>
+ <markerId
+ markerIdValue="seamELProblem">
+ </markerId>
+ <helper
+ class="org.jboss.tools.seam.internal.core.validation.SeamELValidationHelper">
+ </helper>
+ <run
+ class="org.jboss.tools.seam.internal.core.validation.SeamELValidator"
+ incremental="true"
+ fullBuild="true"
+ />
+ </validator>
+ </extension>
<extension
- id="seamProblem"
- name="Seam Problem"
+ id="seamCoreProblem"
+ name="Seam Core Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.wst.validation.problemmarker"/>
<persistent
value="true">
</persistent>
</extension>
+ <extension
+ id="seamELProblem"
+ name="Seam EL Problem"
+ point="org.eclipse.core.resources.markers">
+ <super type="org.eclipse.wst.validation.problemmarker"/>
+ <persistent
+ value="true">
+ </persistent>
+ </extension>
</plugin>
\ No newline at end of file
Copied: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java (from rev 2536, trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELCompletionEngine.java)
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -0,0 +1,830 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core.el;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.rules.IToken;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
+import org.jboss.tools.seam.core.ISeamComponent;
+import org.jboss.tools.seam.core.ISeamContextVariable;
+import org.jboss.tools.seam.core.ISeamProject;
+import org.jboss.tools.seam.core.ScopeType;
+import org.jboss.tools.seam.core.SeamCorePlugin;
+
+/**
+ * Utility class used to find Seam Project content assist proposals
+ *
+ * @author Jeremy
+ */
+public final class SeamELCompletionEngine {
+
+ /**
+ * Constructs SeamELCompletionEngine object
+ */
+ public SeamELCompletionEngine() {
+
+ }
+
+ /**
+ * Create the array of suggestions.
+ *
+ * @param project Seam project
+ * @param file File
+ * @param document
+ * @param prefix the prefix to search for
+ * @param position Offset of the prefix
+ * @return the list of all possible suggestions
+ * @throws BadLocationException if accessing the current document fails
+ */
+ public List<String> getCompletions(ISeamProject project, IFile file, IDocument document, CharSequence prefix,
+ int position) throws BadLocationException, StringIndexOutOfBoundsException {
+ String documentContent = null;
+ if(document!=null) {
+ documentContent = document.get();
+ }
+ return getCompletions(project, file, documentContent, prefix, position, false);
+ }
+
+ /**
+ * Create the array of suggestions.
+ * @param project Seam project
+ * @param file File
+ * @param document
+ * @param prefix the prefix to search for
+ * @param position Offset of the prefix
+ * @return the list of all possible suggestions
+ * @param returnCompletedVariablesOnly - if 'true' then returns only variables that equals prefix. It's useful for validation.
+ * for example:
+ * we have 'variableName.variableProperty', 'variableName.variableProperty1', 'variableName.variableProperty2'
+ * prefix is 'variableName.variableProperty'
+ * Result is {'variableProperty'}
+ * if 'false' then returns ends of variables that starts with prefix. It's useful for CA.
+ * for example:
+ * we have 'variableName.variableProperty', 'variableName.variableProperty1', 'variableName.variableProperty2'
+ * prefix is 'variableName.variableProperty'
+ * Result is {'1','2'}
+ */
+ public List<String> getCompletions(ISeamProject project, IFile file, String documentContent, CharSequence prefix,
+ int position, boolean returnEqualedVariablesOnly) throws BadLocationException, StringIndexOutOfBoundsException {
+
+ List<String> res= new ArrayList<String>();
+ SeamELTokenizer tokenizer = new SeamELTokenizer(documentContent, position + prefix.length());
+ List<ELToken> tokens = tokenizer.getTokens();
+
+ List<ELToken> resolvedExpressionPart = new ArrayList<ELToken>();
+ List<ISeamContextVariable> resolvedVariables = new ArrayList<ISeamContextVariable>();
+ ScopeType scope = getScope(project, file);
+ List<List<ELToken>> variations = getPossibleVarsFromPrefix(tokens);
+
+ if (variations.isEmpty()) {
+ resolvedVariables = resolveVariables(project, scope, tokens, tokens);
+ } else {
+ for (List<ELToken> variation : variations) {
+ List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
+ resolvedVars = resolveVariables(project, scope, variation, tokens);
+ if (resolvedVars != null && !resolvedVars.isEmpty()) {
+ resolvedVariables = resolvedVars;
+ resolvedExpressionPart = variation;
+ break;
+ }
+ }
+ }
+
+ // Here we have a list of vars for some part of expression
+ // OK. we'll proceed with members of these vars
+ if (areEqualExpressions(resolvedExpressionPart, tokens)) {
+ // First segment is the last one
+ for (ISeamContextVariable var : resolvedVariables) {
+ res.add(var.getName().substring(prefix.toString().length()));
+ }
+ return res;
+ }
+
+ // First segment is found - proceed with next tokens
+ int startTokenIndex = (resolvedExpressionPart == null ? 0 : resolvedExpressionPart.size());
+ Set<IMember> members = new HashSet<IMember>();
+ for (ISeamContextVariable var : resolvedVariables) {
+ IMember member = SeamExpressionResolver.getMemberByVariable(var);
+ if (member != null && !members.contains(member))
+ members.add(member);
+ }
+ for (int i = startTokenIndex;
+ tokens != null && i < tokens.size() &&
+ members != null && members.size() > 0;
+ i++) {
+ ELToken token = tokens.get(i);
+
+ if (i < tokens.size() - 1) { // inside expression
+ if (token.getType() == ELToken.EL_SEPARATOR_TOKEN)
+ // proceed with next token
+ continue;
+
+ if (token.getType() == ELToken.EL_NAME_TOKEN) {
+ // Find properties for the token
+ String name = token.getText();
+ Set<IMember> newMembers = new HashSet<IMember>();
+ for (IMember mbr : members) {
+ try {
+ IType type = (mbr instanceof IType ? (IType)mbr : EclipseJavaUtil.findType(mbr.getJavaProject(), EclipseJavaUtil.getMemberTypeAsString(mbr)));
+ Set<IMember> properties = SeamExpressionResolver.getProperties(type);
+ for (IMember property : properties) {
+ StringBuffer propertyName = new StringBuffer(property.getElementName());
+ if (property instanceof IMethod) { // Setter or getter
+ propertyName.delete(0, 3);
+ propertyName.setCharAt(0, Character.toLowerCase(propertyName.charAt(0)));
+ }
+ if (name.equals(propertyName.toString())) {
+ newMembers.add(property);
+ }
+ }
+ } catch (JavaModelException ex) {
+ SeamCorePlugin.getPluginLog().logError(ex);
+ }
+ }
+ members = newMembers;
+ }
+ if (token.getType() == ELToken.EL_METHOD_TOKEN) {
+ // Find methods for the token
+ String name = token.getText();
+ if (name.indexOf('(') != -1) {
+ name = name.substring(0, name.indexOf('('));
+ }
+ Set<IMember> newMembers = new HashSet<IMember>();
+ for (IMember mbr : members) {
+ try {
+ IType type = (mbr instanceof IType ? (IType)mbr : EclipseJavaUtil.findType(mbr.getJavaProject(), EclipseJavaUtil.getMemberTypeAsString(mbr)));
+ Set<IMember> methods = SeamExpressionResolver.getMethods(type);
+ for (IMember method : methods) {
+ if (name.equals(method.getElementName())) {
+ newMembers.add(method);
+ }
+ }
+ } catch (JavaModelException ex) {
+ SeamCorePlugin.getPluginLog().logError(ex);
+ }
+ }
+ members = newMembers;
+ }
+ } else { // Last segment
+ Set<String> proposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ if (token.getType() == ELToken.EL_SEPARATOR_TOKEN) {
+ // return all the methods + properties
+ for (IMember mbr : members) {
+ try {
+ IType type = (mbr instanceof IType ? (IType)mbr : EclipseJavaUtil.findType(mbr.getJavaProject(), EclipseJavaUtil.getMemberTypeAsString(mbr)));
+ proposals.addAll(SeamExpressionResolver.getMethodPresentations(type));
+ proposals.addAll(SeamExpressionResolver.getPropertyPresentations(type));
+ } catch (JavaModelException ex) {
+ SeamCorePlugin.getPluginLog().logError(ex);
+ }
+ }
+ } else if (token.getType() == ELToken.EL_NAME_TOKEN ||
+ token.getType() == ELToken.EL_METHOD_TOKEN) {
+ // return filtered methods + properties
+ Set<String> proposalsToFilter = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ for (IMember mbr : members) {
+ try {
+ IType type = null;
+ if(mbr instanceof IType) {
+ type = (IType)mbr;
+ } else {
+ type = EclipseJavaUtil.findType(mbr.getJavaProject(), EclipseJavaUtil.getMemberTypeAsString(mbr));
+ }
+ proposalsToFilter.addAll(SeamExpressionResolver.getMethodPresentations(type));
+ proposalsToFilter.addAll(SeamExpressionResolver.getPropertyPresentations(type));
+ } catch (JavaModelException ex) {
+ SeamCorePlugin.getPluginLog().logError(ex);
+ }
+ }
+ for (String proposal : proposalsToFilter) {
+ // We do expect nothing but name for method tokens (No round brackets)
+ String filter = token.getText();
+ if(returnEqualedVariablesOnly) {
+ // This is used for validation.
+ if (proposal.equals(filter)) {
+ proposals.add(proposal);
+ }
+ } else {
+ // This is used for CA.
+ if (proposal.startsWith(filter)) {
+ proposals.add(proposal.substring(filter.length()));
+ }
+ }
+ }
+ }
+ res.addAll(proposals);
+ }
+ }
+
+ return res;
+ }
+
+ private String computeVariableName(List<ELToken> tokens){
+ if (tokens == null)
+ tokens = new ArrayList<ELToken>();
+ StringBuffer sb = new StringBuffer();
+ for (ELToken token : tokens) {
+ if (token.getType() == ELToken.EL_NAME_TOKEN ||
+ token.getType() == ELToken.EL_METHOD_TOKEN ||
+ token.getType() == ELToken.EL_SEPARATOR_TOKEN) {
+ sb.append(token.getText());
+ }
+ }
+ return sb.toString();
+ }
+
+ /*
+ * Compares to tokenized expressions.
+ *
+ * @param first
+ * @param second
+ * @return boolean true if two expressions are equal
+ */
+ private boolean areEqualExpressions(List<ELToken>first, List<ELToken>second) {
+ if (first == null || second == null)
+ return (first == second);
+
+ if (first.size() != second.size())
+ return false;
+
+ for (int i = 0; i < first.size(); i++) {
+ if (!first.get(i).equals(second.get(i)))
+ return false;
+ }
+ return true;
+ }
+
+ /* Returns scope for the resource
+ *
+ * @param project
+ * @param resource
+ * @return
+ */
+ private ScopeType getScope(ISeamProject project, IResource resource) {
+ if (project == null || resource == null)
+ return null;
+
+ Set<ISeamComponent> components = project.getComponentsByPath(resource.getFullPath());
+
+ if (components.size() > 1) // Don't use scope in case of more than one component
+ return null;
+ for (ISeamComponent component : components) {
+ return component.getScope();
+ }
+ return null;
+ }
+
+ /*
+ * Tries to resolve variables by part of expression
+ *
+ * @param project
+ * @param scope
+ * @param part
+ * @param tokens
+ * @return
+ */
+ private List<ISeamContextVariable> resolveVariables(ISeamProject project, ScopeType scope, List<ELToken>part, List<ELToken> tokens) {
+ List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
+ String varName = computeVariableName(part);
+ if (varName != null) {
+ resolvedVars = SeamExpressionResolver.resolveVariables(project, scope, varName);
+ }
+ if (resolvedVars != null && resolvedVars.size() > 0) {
+ List<ISeamContextVariable> newResolvedVars = new ArrayList<ISeamContextVariable>();
+ for (ISeamContextVariable var : resolvedVars) {
+ if(!areEqualExpressions(part, tokens)) {
+ // Do filter by equals (name)
+ // In case of the last pass - do not filter by startsWith(name) instead of equals
+ if (varName.equals(var.getName())) {
+ newResolvedVars.add(var);
+ }
+ } else {
+ newResolvedVars.add(var);
+ }
+ }
+ return newResolvedVars;
+ }
+ return new ArrayList<ISeamContextVariable>();
+ }
+
+ /*
+ * Creates and returns list of possible variable name combinations from expression starting from the longest name
+ *
+ *
+ * @param prefix
+ * @return
+ */
+ private List<List<ELToken>> getPossibleVarsFromPrefix(List<ELToken>prefix) {
+ ArrayList<List<ELToken>> result = new ArrayList<List<ELToken>>();
+ for (int i = 0; prefix != null && i < prefix.size(); i++) {
+ ELToken lastToken = prefix.get(i);
+ if (lastToken.getType() != ELToken.EL_SEPARATOR_TOKEN) {
+ ArrayList<ELToken> prefixPart = new ArrayList<ELToken>();
+ for (int j = 0; j <= i; j++) {
+ prefixPart.add(prefix.get(j));
+ }
+ result.add(0, prefixPart);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Removes duplicates of completion strings
+ *
+ * @param suggestions a list of suggestions ({@link String}).
+ * @return a list of unique completion suggestions.
+ */
+ public List<String> makeUnique(List<String> suggestions) {
+ HashSet<String> present = new HashSet<String>();
+ ArrayList<String> unique= new ArrayList<String>();
+
+ if (suggestions == null)
+ return unique;
+
+ for (String item : suggestions) {
+ if (!present.contains(item)) {
+ present.add(item);
+ unique.add(item);
+ }
+ }
+
+ present.clear();
+ return unique;
+ }
+
+ /**
+ * EL string parser.
+ * Creates list of tokens for the name, method and separator parts
+ *
+ * @author Jeremy
+ */
+ public static class SeamELTokenizer {
+ static final int STATE_INITIAL = 0;
+ static final int STATE_VAR = 1;
+ static final int STATE_METHOD = 2;
+ static final int STATE_SEPARATOR = 3;
+
+// IDocument fDocument;
+ String documentContent;
+ List<ELToken> fTokens;
+ int index;
+
+ /**
+ * Constructs SeamELTokenizer object
+ *
+ * @param document
+ * @param offset
+ */
+ public SeamELTokenizer(IDocument document, int offset) {
+ if(document!=null) {
+ this.documentContent = document.get();
+ }
+ index = (documentContent == null || documentContent.length() < offset? -1 : offset);
+ fTokens = new ArrayList<ELToken>();
+ parseBackward();
+ }
+
+ /**
+ * Constructs SeamELTokenizer object
+ *
+ * @param document
+ * @param offset
+ */
+ public SeamELTokenizer(String documentContent, int offset) {
+ this.documentContent = documentContent;
+ index = (documentContent == null || documentContent.length() < offset? -1 : offset);
+ fTokens = new ArrayList<ELToken>();
+ parseBackward();
+ }
+
+ /**
+ * Returns list of tokens for the expression parsed
+ *
+ * @return
+ */
+ public List<ELToken> getTokens() {
+ return fTokens;
+ }
+
+ /*
+ * Performs backward parsing of document text for expression
+ */
+ private void parseBackward() {
+ ELToken token;
+ fState = STATE_INITIAL;
+ while ((token = getNextToken()) != ELToken.EOF) {
+
+ if (token.type == ELToken.EL_NAME_TOKEN ||
+ token.type == ELToken.EL_METHOD_TOKEN ||
+ token.type == ELToken.EL_SEPARATOR_TOKEN) {
+
+ fTokens.add(0, token);
+ }
+ }
+ }
+
+ int fState;
+ int fEndOfToken;
+
+ /*
+ * Calculates and returns next token for expression
+ *
+ * @return
+ */
+ private ELToken getNextToken() {
+ switch (fState) {
+ case STATE_INITIAL: // Just started
+ {
+ int ch = readCharBackward();
+ if (ch == -1) {
+ return ELToken.EOF;
+ }
+ if (Character.isJavaIdentifierPart((char)ch)) {
+ releaseChar();
+ return readVarToken();
+ }
+ if (ch == '.') {
+ releaseChar();
+ return readSeparatorToken();
+ }
+ if (ch == ')') {
+ releaseChar();
+ return readMethodToken();
+ }
+ return ELToken.EOF;
+ }
+ case STATE_VAR: // Variable name is read - expecting a separator
+ {
+ int ch = readCharBackward();
+ if (ch == -1) {
+ return ELToken.EOF;
+ }
+ if (ch == '.') {
+ releaseChar();
+ return readSeparatorToken();
+ }
+ return ELToken.EOF;
+ }
+ case STATE_METHOD: // Method name and parameters are read - expecting a separator
+ {
+ int ch = readCharBackward();
+ if (ch == -1) {
+ return ELToken.EOF;
+ }
+ if (ch == '.') {
+ releaseChar();
+ return readSeparatorToken();
+ }
+ return ELToken.EOF;
+ }
+ case STATE_SEPARATOR: // Separator is read - expecting a var or method
+ {
+ int ch = readCharBackward();
+ if (ch == -1) {
+ return ELToken.EOF;
+ }
+ if (Character.isJavaIdentifierPart((char)ch)) {
+ releaseChar();
+ return readVarToken();
+ }
+ if (ch == ')') {
+ releaseChar();
+ return readMethodToken();
+ }
+ return ELToken.EOF;
+ }
+ }
+ return ELToken.EOF;
+ }
+
+ /* Reads and returns the method token from the expression
+ *
+ * @return
+ */
+ ELToken readMethodToken() {
+ fState = STATE_METHOD;
+ int endOfToken = index;
+
+ // read the method parameters
+ if (!skipMethodParameters())
+ return ELToken.EOF;
+
+ // skip spaces between the method's name and it's parameters
+ if (!skipSpaceChars())
+ return ELToken.EOF;
+ // read the method name
+ if (!skipMethodName())
+ return ELToken.EOF;
+
+ return (endOfToken - index > 0 ? new ELToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELToken.EL_METHOD_TOKEN) : ELToken.EOF);
+ }
+
+ /*
+ * Returns the CharSequence object
+ *
+ * @param start
+ * @param length
+ * @return
+ */
+ private CharSequence getCharSequence(int start, int length) {
+ String text = "";
+ try {
+ text.substring(start, length);
+ } catch (StringIndexOutOfBoundsException e) {
+ text = ""; // For sure
+ }
+ return text.subSequence(0, text.length());
+ }
+
+
+ /*
+ * Skips the space characters in the document
+ */
+ boolean skipSpaceChars() {
+ int ch;
+ while ((ch = readCharBackward()) != -1) {
+ if (!Character.isSpaceChar(ch)) {
+ releaseChar();
+ break;
+ }
+ }
+ return true;
+ }
+
+ /*
+ * Skips the method name characters in the document
+ *
+ * @return boolean true if at least 1 character had been read
+ */
+ boolean skipMethodName() {
+ int endOfToken = index;
+ int ch;
+ while((ch = readCharBackward()) != -1) {
+ if (!Character.isJavaIdentifierPart(ch)) {
+ releaseChar();
+ return (endOfToken - index > 0);
+ }
+ }
+ return false;
+ }
+
+ /*
+ * Skips the method parameters characters in the document
+ *
+ * @return boolean true if complete parameters set had been read
+ */
+ boolean skipMethodParameters() {
+ int ch = readCharBackward();
+ if (ch != ')')
+ return false;
+ int pCount = 1;
+ while (pCount > 0) {
+ ch = readCharBackward();
+ if (ch == -1)
+ return false;
+
+ if (ch == '"' || ch == '\'') {
+ skipQuotedChars((char)ch);
+ continue;
+ }
+ if (ch == ')') {
+ pCount++;
+ continue;
+ }
+ if (ch == '(') {
+ pCount--;
+ continue;
+ }
+ }
+ return true;
+ }
+
+ /*
+ * Skips the quoted characters
+ *
+ */
+ void skipQuotedChars(char pair) {
+ int ch = readCharBackward();
+
+ while (ch != -1) {
+ if (ch == pair) {
+ ch = readCharBackward();
+ if (ch == '\\') {
+ int backSlashCount = 0;
+ while (ch == '\\') {
+ backSlashCount++;
+ ch = readCharBackward();
+ }
+ releaseChar(); // Return the last non-slash char to the buffer
+ if ((backSlashCount/2)*2 == backSlashCount) {
+ return;
+ }
+ }
+ }
+ ch = readCharBackward();
+ }
+ }
+
+ /* Reads and returns the separator token from the expression
+ *
+ * @return
+ */
+ ELToken readSeparatorToken() {
+ fState = STATE_SEPARATOR;
+ int ch = readCharBackward();
+
+ return (ch == '.' ? new ELToken(index, 1, getCharSequence(index, 1), ELToken.EL_SEPARATOR_TOKEN) :
+ ELToken.EOF);
+ }
+
+ /* Reads and returns the variable token from the expression
+ *
+ * @return
+ */
+ ELToken readVarToken() {
+ fState = STATE_VAR;
+ int endOfToken = index;
+ int ch;
+ while((ch = readCharBackward()) != -1) {
+ if (!Character.isJavaIdentifierPart(ch)) {
+ releaseChar();
+ return (endOfToken - index > 0 ? new ELToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELToken.EL_NAME_TOKEN) : ELToken.EOF);
+ }
+ }
+ releaseChar();
+ return (endOfToken - index > 0 ? new ELToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELToken.EL_NAME_TOKEN) : ELToken.EOF);
+ }
+
+ /* Reads the next character in the document
+ *
+ * @return
+ */
+ int readCharBackward() {
+ if (--index < 0 ||
+ documentContent == null ||
+ documentContent.length() <= index)
+ return -1;
+
+ try {
+ return documentContent.charAt(index);
+ } catch (StringIndexOutOfBoundsException e) {
+ return -1;
+ }
+ }
+
+ /*
+ * returns the character to the document
+ */
+ void releaseChar() {
+ if (index < documentContent.length())
+ index++;
+ }
+ }
+
+ /**
+ * Calculates the EX expression operand string
+ *
+ * @param viewer
+ * @param offset
+ * @return
+ * @throws BadLocationException
+ */
+ public static String getPrefix(ITextViewer viewer, int offset) throws StringIndexOutOfBoundsException {
+ IDocument doc= viewer.getDocument();
+ if (doc == null || offset > doc.getLength())
+ return null;
+ return getPrefix(doc.get(), offset);
+ }
+
+ /**
+ * Calculates the EX expression operand string
+ *
+ * @param viewer
+ * @param offset
+ * @return
+ * @throws BadLocationException
+ */
+ public static String getPrefix(String documentContent, int offset) throws StringIndexOutOfBoundsException {
+ if (documentContent == null || offset > documentContent.length())
+ return null;
+
+ SeamELTokenizer tokenizer = new SeamELTokenizer(documentContent, offset);
+ List<ELToken> tokens = tokenizer.getTokens();
+
+ if (tokens == null || tokens.size() == 0)
+ return null;
+
+ return documentContent.substring(tokens.get(0).start, offset - tokens.get(0).start);
+ }
+}
+
+/**
+ * Token for the EX expression
+ *
+ * @author Jeremy
+ */
+class ELToken implements IToken {
+ static final ELToken EOF = new ELToken(-1, -1, null, -1);
+ static final int EL_NAME_TOKEN = 1;
+ static final int EL_METHOD_TOKEN = 2;
+ static final int EL_SEPARATOR_TOKEN = 3;
+
+ int start;
+ int length;
+ CharSequence chars;
+ int type;
+
+ /**
+ * Constructs the ELToken object
+ *
+ * @param start
+ * @param length
+ * @param chars
+ * @param type
+ */
+ public ELToken(int start, int length, CharSequence chars, int type) {
+ this.start = start;
+ this.length = length;
+ this.chars = chars;
+ this.type = type;
+ }
+
+ /**
+ * Returns string representation for the token
+ */
+ public String toString() {
+ return "ELToken(" + start + ", " + length + ", " + type + ") [" + (chars == null ? "<Empty>" : chars.toString()) + "]";
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#getData()
+ */
+ public Object getData() {
+ return (chars == null ? null : chars.subSequence(start, start+length).toString());
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isEOF()
+ */
+ public boolean isEOF() {
+ return (start == -1 && length == -1 && chars == null);
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isOther()
+ */
+ public boolean isOther() {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isUndefined()
+ */
+ public boolean isUndefined() {
+ return false;
+ }
+
+ /*
+ * @see org.eclipse.jface.text.rules.IToken#isWhitespace()
+ */
+ public boolean isWhitespace() {
+ return false;
+ }
+
+ /*
+ * Returns the token type
+ */
+ public int getType(){
+ return type;
+ }
+
+ /*
+ * Returns the token text
+ */
+ public String getText() {
+ return chars.toString();
+ }
+}
\ No newline at end of file
Copied: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java (from rev 2501, trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamExpressionResolver.java)
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -0,0 +1,284 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.seam.internal.core.el;
+
+import java.lang.reflect.Modifier;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.seam.core.IBijectedAttribute;
+import org.jboss.tools.seam.core.ISeamComponent;
+import org.jboss.tools.seam.core.ISeamContextVariable;
+import org.jboss.tools.seam.core.ISeamElement;
+import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
+import org.jboss.tools.seam.core.ISeamJavaSourceReference;
+import org.jboss.tools.seam.core.ISeamProject;
+import org.jboss.tools.seam.core.ISeamXmlFactory;
+import org.jboss.tools.seam.core.ScopeType;
+
+/**
+ * Utility class used to resolve Seam project variables and to get the methods/properties and their presentation strings from type
+ *
+ * @author Jeremy
+ */
+public class SeamExpressionResolver {
+
+ /**
+ * Returns Seam project variables which names start from specified value
+ *
+ * @param project
+ * @param scope
+ * @param name
+ * @return
+ */
+ public static List<ISeamContextVariable> resolveVariables(ISeamProject project, ScopeType scope, String name) {
+ if (project == null || name == null) return null;
+ return (scope == null ? internalResolveVariables(project, name) :
+ internalResolveVariablesByScope(project, scope, name));
+ }
+
+ /**
+ * Returns Seam project variables which names start from specified value
+ * No scope used
+ *
+ * @param project
+ * @param name
+ * @return
+ */
+ private static List<ISeamContextVariable> internalResolveVariables(ISeamProject project, String name) {
+ List<ISeamContextVariable> resolvedVariables = new ArrayList<ISeamContextVariable>();
+ Set<ISeamContextVariable> variables = project.getVariables();
+ for (ISeamContextVariable variable : variables) {
+ if (variable.getName().startsWith(name)) {
+ resolvedVariables.add(variable);
+ }
+ }
+ return resolvedVariables;
+ }
+
+ /**
+ * Returns Seam project variables which names start from specified value
+ * Search is performed using scope
+ *
+ * @param project
+ * @param scope
+ * @param name
+ * @return
+ */
+ private static List<ISeamContextVariable> internalResolveVariablesByScope(ISeamProject project, ScopeType scope, String name) {
+ List<ISeamContextVariable> resolvedVariables = new ArrayList<ISeamContextVariable>();
+ Set<ISeamContextVariable> variables = project.getVariablesByScope(scope);
+ for (ISeamContextVariable variable : variables) {
+ if (variable.getName().startsWith(name)) {
+ resolvedVariables.add(variable);
+ }
+ }
+ return resolvedVariables;
+ }
+
+ /**
+ * Returns the IMember for the variable specified
+ *
+ * @param variable
+ * @return
+ */
+ public static IMember getMemberByVariable(ISeamContextVariable variable) {
+ IMember member = null;
+ if (variable instanceof ISeamComponent) {
+ ISeamComponent component = (ISeamComponent)variable;
+ ISeamJavaComponentDeclaration decl = component.getJavaDeclaration();
+ if (decl != null) {
+ member = decl.getSourceMember();
+ }
+ }
+ if (member == null && variable instanceof IBijectedAttribute) {
+ member = ((ISeamJavaSourceReference)variable).getSourceMember();
+ }
+ if (member == null && variable instanceof ISeamJavaSourceReference) {
+ member = ((ISeamJavaSourceReference)variable).getSourceMember();
+ }
+ if (member == null && variable instanceof ISeamXmlFactory) {
+ ISeamXmlFactory factory = (ISeamXmlFactory)variable;
+ String value = factory.getValue();
+ if (value != null && value.length() > 0) {
+ if (value.startsWith("#{") || value.startsWith("${"))
+ value = value.substring(2);
+ if (value.endsWith("}"))
+ value = value.substring(0, value.length() - 1);
+ }
+ if (value != null && value.length() > 0) {
+ // TODO: Need to make sure that it's correct way to get the project and
+ // the scope from the factory
+ ISeamProject project = ((ISeamElement)factory).getSeamProject();
+// ISeamProject project = getSeamProject(factory.getResource());
+ if (project != null) {
+ List<ISeamContextVariable> resolvedValues = resolveVariables(project, factory.getScope(), value);
+ for (ISeamContextVariable var : resolvedValues) {
+ if (var.getName().equals(value)) {
+ member = getMemberByVariable(var);
+ break;
+ }
+ }
+ }
+ }
+ }
+ return member;
+ }
+
+ /**
+ * Returns the methods for the type specified
+ *
+ * @param type
+ * @return
+ */
+ public static Set<IMember> getMethods(IType type) {
+ Set<IMember> methods = new HashSet<IMember>();
+ if (type != null) {
+ try {
+ IMethod[] mthds = type.getMethods();
+ for (int i = 0; mthds != null && i < mthds.length; i++) {
+ IMethod m = mthds[i];
+ if (Modifier.isPublic(m.getFlags()) &&
+ (!m.getElementName().startsWith("get") && !m.getElementName().startsWith("set")) ||
+ "get".equals(m.getElementName()) || "set".equals(m.getElementName())) {
+ methods.add(m);
+ }
+ }
+ } catch (JavaModelException e) {
+ }
+ }
+ return methods;
+ }
+
+ /**
+ * Returns the method presentation strings for the type specified
+ *
+ * @param type
+ * @return
+ */
+ public static Set<String> getMethodPresentations(IType type) {
+ Set<String> methods = new HashSet<String>();
+ if (type != null) {
+ try {
+ IMethod[] mthds = type.getMethods();
+ for (int i = 0; mthds != null && i < mthds.length; i++) {
+ IMethod m = mthds[i];
+ if (Modifier.isPublic(m.getFlags()) &&
+ (!m.getElementName().startsWith("get") && !m.getElementName().startsWith("set")) ||
+ "get".equals(m.getElementName()) || "set".equals(m.getElementName())) {
+
+ StringBuffer name = new StringBuffer(m.getElementName());
+
+ name.append('(');
+ String[] mParams = null;
+ mParams = m.getParameterNames();
+ for (int j = 0; mParams != null && j < mParams.length; j++) {
+ if (j > 0) name.append(", ");
+ name.append(mParams[j]);
+ }
+ name.append(')');
+
+ methods.add(name.toString());
+ }
+ }
+ } catch (JavaModelException e) {
+ }
+ }
+ return methods;
+ }
+
+ /**
+ * Returns the properties for the type specified
+ *
+ * @param type
+ * @return
+ */
+ public static Set<IMember> getProperties(IType type) {
+ Set<IMember> properties = new HashSet<IMember>();
+ if (type != null) {
+ try {
+ IMethod[] props = type.getMethods();
+ for (int i = 0; props != null && i < props.length; i++) {
+ IMethod m = props[i];
+ if (Modifier.isPublic(m.getFlags()) &&
+ (m.getElementName().startsWith("get") && !"get".equals(m.getElementName())) ||
+ (m.getElementName().startsWith("set") && !"set".equals(m.getElementName()))) {
+ properties.add(m);
+ }
+ }
+ } catch (JavaModelException e) {
+ }
+
+ try {
+ IField[] fields = type.getFields();
+ for (int i = 0; fields != null && i < fields.length; i++) {
+ IField f = fields[i];
+ if (Modifier.isPublic(f.getFlags())) {
+ properties.add(f);
+ }
+ }
+ } catch (JavaModelException e) {
+ }
+ }
+ return properties;
+ }
+
+ /**
+ * Returns the property presentation strings for the type specified
+ *
+ * @param type
+ * @return
+ */
+ public static Set<String> getPropertyPresentations(IType type) {
+ Set<String> properties = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ if (type != null) {
+ try {
+ IMethod[] props = type.getMethods();
+ for (int i = 0; props != null && i < props.length; i++) {
+ IMethod m = props[i];
+ if (Modifier.isPublic(m.getFlags()) &&
+ (m.getElementName().startsWith("get") && !"get".equals(m.getElementName())) ||
+ (m.getElementName().startsWith("set") && !"set".equals(m.getElementName()))) {
+
+ StringBuffer name = new StringBuffer(m.getElementName());
+ name.delete(0, 3);
+ name.setCharAt(0, Character.toLowerCase(name.charAt(0)));
+
+ properties.add(name.toString());
+ }
+ }
+ } catch (JavaModelException e) {
+ }
+
+ try {
+ IField[] fields = type.getFields();
+ for (int i = 0; fields != null && i < fields.length; i++) {
+ IField f = fields[i];
+ if (Modifier.isPublic(f.getFlags())) {
+ properties.add(f.getElementName());
+ }
+ }
+ } catch (JavaModelException e) {
+ }
+ }
+ return properties;
+ }
+}
Deleted: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidationHelper.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidationHelper.java 2007-07-20 17:46:54 UTC (rev 2573)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidationHelper.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -1,262 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.internal.core.validation;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.wst.validation.internal.operations.WorkbenchContext;
-import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.seam.core.ISeamComponent;
-import org.jboss.tools.seam.core.ISeamElement;
-import org.jboss.tools.seam.core.ISeamProject;
-import org.jboss.tools.seam.core.ISeamTextSourceReference;
-import org.jboss.tools.seam.core.SeamCorePlugin;
-import org.jboss.tools.seam.internal.core.AbstractContextVariable;
-import org.jboss.tools.seam.internal.core.SeamComponentDeclaration;
-import org.jboss.tools.seam.internal.core.SeamProject;
-
-public class SeamCoreValidationHelper extends WorkbenchContext {
-
- private SeamValidationContext validationContext;
-
- /**
- * @return Seam project
- */
- public ISeamProject getSeamProject() {
- ISeamProject project = null;
- try {
- project = SeamCorePlugin.getSeamProject(getProject(), true);
- } catch (Exception e) {
- SeamCorePlugin.getDefault().logError("Can't get Seam Project", e);
- }
- return project;
- }
-
- /**
- * @param element
- * @return Resource of seam model element
- */
- public IResource getComponentResourceWithName(ISeamElement element) {
- if(element instanceof ISeamComponent) {
- Set declarations = ((ISeamComponent)element).getAllDeclarations();
- for (Object o : declarations) {
- SeamComponentDeclaration d = (SeamComponentDeclaration)o;
- if(d.getLocationFor(SeamComponentDeclaration.PATH_OF_NAME)!=null) {
- return d.getResource();
- }
- }
- }
- return element.getResource();
- }
-
- /**
- * @param seam model element
- * @return location of name attribute
- */
- public ISeamTextSourceReference getLocationOfName(ISeamElement element) {
- return getLocationOfAttribute(element, SeamComponentDeclaration.PATH_OF_NAME);
- }
-
- /**
- * @param seam model element
- * @return location of attribute
- */
- public ISeamTextSourceReference getLocationOfAttribute(ISeamElement element, String attributeName) {
- ISeamTextSourceReference location = null;
- if(element instanceof AbstractContextVariable) {
- location = ((AbstractContextVariable)element).getLocationFor(attributeName);
- } else if(element instanceof ISeamComponent) {
- Set declarations = ((ISeamComponent)element).getAllDeclarations();
- for (Object d : declarations) {
- location = ((SeamComponentDeclaration)d).getLocationFor(attributeName);
- if(location!=null) {
- break;
- }
- }
- } else if(element instanceof SeamComponentDeclaration) {
- location = ((SeamComponentDeclaration)element).getLocationFor(attributeName);
- }
- if(location==null && element instanceof ISeamTextSourceReference) {
- location = (ISeamTextSourceReference)element;
- }
- return location;
- }
-
- /**
- * @param resource
- * @return true if resource is Jar file
- */
- public boolean isJar(IResource resource) {
- String ext = resource.getFileExtension();
- return ext!=null && ext.equalsIgnoreCase("jar");
- }
-
- /**
- * @param element
- * @return true if seam element packed in Jar file
- */
- public boolean isJar(ISeamElement element) {
- return isJar(element.getResource());
- }
-
- /**
- * @param componentXmlFile
- * @return IType of component for <ComponentName>.component.xml
- */
- public IType getClassTypeForComponentXml(IFile componentXmlFile) {
- String className = getClassNameForComponentXml(componentXmlFile);
- if(className==null) {
- return null;
- }
- return findType(className);
- }
-
- /**
- * @param type name
- * @return IType
- */
- public IType findType(String fullyQualifiedName) {
- IProject p = getProject().getProject();
- try {
- IJavaProject jp = EclipseResourceUtil.getJavaProject(p);
- return jp.findType(fullyQualifiedName);
- } catch (JavaModelException e) {
- SeamCorePlugin.getDefault().logError(e);
- return null;
- }
- }
-
- /**
- * @param componentXmlFile
- * @return name of component class for <ComponentName>.component.xml
- */
- public String getClassNameForComponentXml(IFile componentXmlFile) {
- String fileName = componentXmlFile.getName();
- int firstDot = fileName.indexOf('.');
- if(firstDot==-1) {
- return null;
- }
- String className = fileName.substring(0, firstDot);
- IProject p = getProject().getProject();
- try {
- IJavaProject jp = EclipseResourceUtil.getJavaProject(p);
- IPackageFragment packageFragment = jp.findPackageFragment(componentXmlFile.getFullPath().removeLastSegments(1));
- if(packageFragment==null) {
- return null;
- }
- return packageFragment.getElementName() + "." + className;
- } catch (JavaModelException e) {
- SeamCorePlugin.getDefault().logError(e);
- return null;
- }
- }
-
- /**
- * Find setter for property
- * @param type
- * @param propertyName
- * @return
- */
- public IMethod findSetter(IType type, String propertyName) {
- if(propertyName == null || propertyName.length()==0) {
- return null;
- }
- String firstLetter = propertyName.substring(0, 1).toUpperCase();
- String nameWithoutFirstLetter = propertyName.substring(1);
- String setterName = "set" + firstLetter + nameWithoutFirstLetter;
- try {
- return findSetterInHierarchy(type, setterName);
- } catch (JavaModelException e) {
- SeamCorePlugin.getDefault().logError(e);
- }
- return null;
- }
-
- private IMethod findSetterInHierarchy(IType type, String setterName) throws JavaModelException {
- IMethod[] methods = type.getMethods();
- for (int i = 0; i < methods.length; i++) {
- if(methods[i].getElementName().equals(setterName) && methods[i].getParameterNames().length==1) {
- return methods[i];
- }
- }
- String superclassName = type.getSuperclassName();
- if(superclassName!=null) {
- String[][] packages = type.resolveType(superclassName);
- if(packages!=null) {
- for (int i = 0; i < packages.length; i++) {
- String packageName = packages[i][0];
- if(packageName!=null && packageName.length()>0) {
- packageName = packageName + ".";
- } else {
- packageName = "";
- }
- String qName = packageName + packages[i][1];
- IType superclass = type.getJavaProject().findType(qName);
- if(superclass!=null) {
- IMethod method = findSetterInHierarchy(superclass, setterName);
- if(method!=null) {
- return method;
- }
- }
- }
- }
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.wst.validation.internal.operations.WorkbenchContext#registerResource(org.eclipse.core.resources.IResource)
- */
- @Override
- public void registerResource(IResource resource) {
- if(resource instanceof IFile) {
- IFile file = (IFile)resource;
- if(!file.exists()) {
- getValidationContext().addRemovedFile(file);
- }
- }
- }
-
- /**
- * @return Set of changed resources
- */
- public Set<IFile> getChangedFiles() {
- Set<IFile> result = new HashSet<IFile>();
- String[] uris = getURIs();
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- for (int i = 0; i < uris.length; i++) {
- IFile currentFile = root.getFile(new Path(uris[i]));
- result.add(currentFile);
- }
- result.addAll(getValidationContext().getRemovedFiles());
- return result;
- }
-
- public SeamValidationContext getValidationContext() {
- if(validationContext==null) {
- validationContext = ((SeamProject)getSeamProject()).getValidationContext();
- }
- return validationContext;
- }
-}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2007-07-20 17:46:54 UTC (rev 2573)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -23,14 +23,12 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.wst.validation.internal.core.ValidationException;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
@@ -61,91 +59,84 @@
*/
public class SeamCoreValidator extends SeamValidator {
- private static final String MARKED_SEAM_RESOURCE_MESSAGE_GROUP = "markedSeamResource";
+ private static final String MARKED_SEAM_RESOURCE_MESSAGE_GROUP = "markedSeamCoreResource";
- private SeamValidationContext validationContext;
-
- public ISchedulingRule getSchedulingRule(IValidationContext helper) {
- return null;
- }
-
- public IStatus validateInJob(IValidationContext helper, IReporter reporter) throws ValidationException {
- super.validateInJob(helper, reporter);
- validationContext = ((SeamProject)project).getValidationContext();
- Set<IFile> changedFiles = coreHelper.getChangedFiles();
- validationContext.getRemovedFiles().clear();
- if(changedFiles.size()>0) {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- Set<ISeamComponent> checkedComponents = new HashSet<ISeamComponent>();
- Set<String> markedDuplicateFactoryNames = new HashSet<String>();
- // Collect all resources which we must validate.
- Set<IPath> resources = new HashSet<IPath>(); // Resources which we have to validate.
- Set<IPath> newResources = new HashSet<IPath>(); // New (unlinked) resources file
- for(IFile currentFile : changedFiles) {
- if(reporter.isCancelled()) {
- break;
- }
- if (currentFile != null) {
- // Get all variable names that were linked with this resource.
- Set<String> oldVariablesNamesOfChangedFile = validationContext.getVariableNamesByResource(currentFile.getFullPath());
- if(oldVariablesNamesOfChangedFile!=null) {
- // Check if variable name was changed in source file
- Set<String> newVariableNamesOfChangedFile = getVariablesNameByResource(currentFile.getFullPath());
- for (String newVariableName : newVariableNamesOfChangedFile) {
- if(!oldVariablesNamesOfChangedFile.contains(newVariableName)) {
- // Name was changed.
- // Collect resources with new component name.
- Set<IPath> linkedResources = validationContext.getResourcesByVariableName(newVariableName);
- if(linkedResources!=null) {
- resources.addAll(linkedResources);
- }
- }
- }
- resources.add(currentFile.getFullPath());
-
- // Collect all linked resources with old variable names.
- for (String name : oldVariablesNamesOfChangedFile) {
- Set<IPath> linkedResources = validationContext.getResourcesByVariableName(name);
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.validation.SeamValidator#validate(java.util.Set)
+ */
+ @Override
+ public IStatus validate(Set<IFile> changedFiles) throws ValidationException {
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ Set<ISeamComponent> checkedComponents = new HashSet<ISeamComponent>();
+ Set<String> markedDuplicateFactoryNames = new HashSet<String>();
+ // Collect all resources which we must validate.
+ Set<IPath> resources = new HashSet<IPath>(); // Resources which we have to validate.
+ Set<IPath> newResources = new HashSet<IPath>(); // New (unlinked) resources file
+ for(IFile currentFile : changedFiles) {
+ if(reporter.isCancelled()) {
+ break;
+ }
+ if (currentFile != null) {
+ // Get all variable names that were linked with this resource.
+ Set<String> oldVariablesNamesOfChangedFile = validationContext.getVariableNamesByResource(currentFile.getFullPath());
+ if(oldVariablesNamesOfChangedFile!=null) {
+ // Check if variable name was changed in source file
+ Set<String> newVariableNamesOfChangedFile = getVariablesNameByResource(currentFile.getFullPath());
+ for (String newVariableName : newVariableNamesOfChangedFile) {
+ if(!oldVariablesNamesOfChangedFile.contains(newVariableName)) {
+ // Name was changed.
+ // Collect resources with new component name.
+ Set<IPath> linkedResources = validationContext.getResourcesByVariableName(newVariableName);
if(linkedResources!=null) {
resources.addAll(linkedResources);
}
}
- } else {
- // Validate new (unlinked) source file.
- resources.add(currentFile.getFullPath());
}
- newResources.add(currentFile.getFullPath());
+ resources.add(currentFile.getFullPath());
+
+ // Collect all linked resources with old variable names.
+ for (String name : oldVariablesNamesOfChangedFile) {
+ Set<IPath> linkedResources = validationContext.getResourcesByVariableName(name);
+ if(linkedResources!=null) {
+ resources.addAll(linkedResources);
+ }
+ }
+ } else {
+ // Validate new (unlinked) source file.
+ resources.add(currentFile.getFullPath());
}
+ newResources.add(currentFile.getFullPath());
}
- // Validate all collected linked resources.
- // Remove all links between collected resources and variables names because they will be linked again during validation.
- validationContext.removeLinkedResources(resources);
- for (IPath linkedResource : resources) {
- // Remove markers from collected source file
- IFile sourceFile = root.getFile(linkedResource);
- reporter.removeMessageSubset(this, sourceFile, MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
- validateComponent(linkedResource, checkedComponents);
- validateFactory(linkedResource, markedDuplicateFactoryNames);
- // TODO
- }
+ }
+ // Validate all collected linked resources.
+ // Remove all links between collected resources and variables names because they will be linked again during validation.
+ validationContext.removeLinkedResources(resources);
+ for (IPath linkedResource : resources) {
+ // Remove markers from collected source file
+ IFile sourceFile = root.getFile(linkedResource);
+ reporter.removeMessageSubset(this, sourceFile, MARKED_SEAM_RESOURCE_MESSAGE_GROUP);
+ validateComponent(linkedResource, checkedComponents);
+ validateFactory(linkedResource, markedDuplicateFactoryNames);
+ }
- // Validate all unnamed resources.
- Set<IPath> unnamedResources = validationContext.getUnnamedResources();
- newResources.addAll(unnamedResources);
- for (IPath path : newResources) {
- Set<SeamJavaComponentDeclaration> declarations = ((SeamProject)project).findJavaDeclarations(path);
- for (SeamJavaComponentDeclaration d : declarations) {
- validateMethodsOfUnknownComponent(d);
- }
+ // Validate all unnamed resources.
+ Set<IPath> unnamedResources = validationContext.getUnnamedResources();
+ newResources.addAll(unnamedResources);
+ for (IPath path : newResources) {
+ Set<SeamJavaComponentDeclaration> declarations = ((SeamProject)project).findJavaDeclarations(path);
+ for (SeamJavaComponentDeclaration d : declarations) {
+ validateMethodsOfUnknownComponent(d);
}
- } else {
- return validateAll();
}
return OK_STATUS;
}
- private IStatus validateAll() {
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.validation.SeamValidator#validateAll()
+ */
+ @Override
+ public IStatus validateAll() throws ValidationException {
reporter.removeAllMessages(this);
validationContext.clear();
Set<ISeamComponent> components = project.getComponents();
@@ -164,7 +155,6 @@
validateMethodsOfUnknownComponent(d);
}
- // TODO
return OK_STATUS;
}
@@ -508,7 +498,7 @@
private void validateInAndOut(ISeamJavaComponentDeclaration declaration, IBijectedAttribute bijection) {
String name = bijection.getName();
- if(name==null || name.startsWith("#{")) {
+ if(name==null || name.startsWith("#{") || name.startsWith("${")) {
return;
}
// save link between java source and variable name
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidationHelper.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidationHelper.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidationHelper.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -0,0 +1,19 @@
+ /*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core.validation;
+
+/**
+ * Helper for EL Seam valodator
+ * @author Alexey Kazakov
+ */
+public class SeamELValidationHelper extends SeamValidationHelper {
+
+}
\ No newline at end of file
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -0,0 +1,189 @@
+ /*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core.validation;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.wst.validation.internal.core.ValidationException;
+import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * EL Validator
+ * @author Alexey Kazakov
+ */
+public class SeamELValidator extends SeamValidator {
+
+ private SeamELCompletionEngine fEngine= new SeamELCompletionEngine();
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.validation.SeamValidator#validate(java.util.Set)
+ */
+ @Override
+ public IStatus validate(Set<IFile> changedFiles) throws ValidationException {
+ // TODO
+ validateAll();
+ return OK_STATUS;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.internal.core.validation.SeamValidator#validateAll()
+ */
+ @Override
+ public IStatus validateAll() throws ValidationException {
+ // TODO
+ /*
+ Set<IFile> files = validationContext.getRegisteredFiles();
+ for (IFile file : files) {
+ validateFile(file);
+ }
+ */
+
+ return OK_STATUS;
+ }
+
+ private void validateFile(IFile file) {
+ String ext = file.getFileExtension();
+ String content = null;
+ try {
+ content = FileUtil.readStream(file.getContents());
+ } catch (CoreException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ return;
+ }
+ if(ext.equalsIgnoreCase("xml")) {
+ validateXml(file, content);
+ } else if(ext.equalsIgnoreCase("java")) {
+ validateJava(file);
+ } else {
+ validateText(file);
+ }
+ }
+
+ private void validateXml(IFile file, String content) {
+ Document document = new Document(content);
+ SeamSaxHandler handler = new SeamSaxHandler(file, document);
+ try {
+ SAXParserFactory.newInstance().newSAXParser().parse(file.getContents(), handler);
+ } catch (SAXException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ return;
+ } catch (IOException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ return;
+ } catch (ParserConfigurationException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ return;
+ } catch (CoreException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ }
+
+ return;
+ }
+
+ private void validateJava(IFile file) {
+
+ }
+
+ private void validateText(IFile file) {
+
+ }
+
+ /**
+ * @param offset - offset of string in file
+ * @param length - length of string in file
+ */
+ private void validateString(IFile file, String string, int offset, int length) {
+ if((string.startsWith("#{") || string.startsWith("${")) && !validateEl(file, string)) {
+ // Mark
+ System.out.println("Error: " + string);
+ }
+ }
+
+ private boolean validateEl(IFile file, String el) {
+ try {
+ String exp = el;
+ int offset = exp.length()-1;
+ String prefix= SeamELCompletionEngine.getPrefix(el, offset);
+ prefix = (prefix == null ? "" : prefix);
+
+ // TODO ?
+ List<String> suggestions = fEngine.getCompletions(project, file, el, prefix, offset - prefix.length(), true);
+
+ if (suggestions != null && suggestions.size() > 0) {
+ return true;
+ }
+ } catch (BadLocationException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ } catch (StringIndexOutOfBoundsException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ }
+ return false;
+ }
+
+ public class SeamSaxHandler extends DefaultHandler {
+
+ private IFile source;
+ private Locator locator;
+ private Document document;
+
+ public SeamSaxHandler(IFile source, Document document) {
+ super();
+ this.source = source;
+ this.document = document;
+ }
+
+ private int[] getAttributeRange(int attributeIndex, String attributeValue) {
+ try {
+ int lineOffset = document.getLineOffset(locator.getLineNumber());
+ String line = document.get(lineOffset, locator.getColumnNumber()-1);
+ } catch (BadLocationException e) {
+ throw new RuntimeException(e);
+ }
+ int[] result = new int[2];
+ return result;
+ }
+
+ @Override
+ public void setDocumentLocator(Locator locator) {
+ this.locator = locator;
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
+ for(int i=0; i<attributes.getLength(); i++) {
+ String value = attributes.getValue(i);
+ SeamELValidator.this.validateString(source, value, 0, 0);
+ }
+ }
+
+ @Override
+ public void characters (char[] ch, int start, int length) throws SAXException {
+ String value = new String(ch, start, length).trim();
+ SeamELValidator.this.validateString(source, value, start, length);
+ }
+ }
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java 2007-07-20 17:46:54 UTC (rev 2573)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -32,7 +32,9 @@
private Map<String, Set<IPath>> resourcesByVariableName = new HashMap<String, Set<IPath>>();
private Map<IPath, Set<String>> variableNamesByResource = new HashMap<IPath, Set<String>>();
private Set<IPath> unnamedResources = new HashSet<IPath>();
+
private Set<IFile> removedFiles = new HashSet<IFile>();
+ private Set<IFile> registeredResources = new HashSet<IFile>();
/**
* Save link between resource and variable name.
@@ -137,6 +139,7 @@
variableNamesByResource.clear();
unnamedResources.clear();
removedFiles.clear();
+ registeredResources.clear();
}
public void store(Element root) {
@@ -192,4 +195,12 @@
public void addRemovedFile(IFile file) {
removedFiles.add(file);
}
+
+ public Set<IFile> getRegisteredFiles() {
+ return registeredResources;
+ }
+
+ public void registerFile(IFile file) {
+ registeredResources.add(file);
+ }
}
\ No newline at end of file
Copied: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java (from rev 2529, trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidationHelper.java)
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -0,0 +1,268 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core.validation;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.wst.validation.internal.operations.WorkbenchContext;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.seam.core.ISeamComponent;
+import org.jboss.tools.seam.core.ISeamElement;
+import org.jboss.tools.seam.core.ISeamProject;
+import org.jboss.tools.seam.core.ISeamTextSourceReference;
+import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.internal.core.AbstractContextVariable;
+import org.jboss.tools.seam.internal.core.SeamComponentDeclaration;
+import org.jboss.tools.seam.internal.core.SeamProject;
+
+/**
+ * Base Helper for Seam Validators.
+ * @author Alexey Kazakov
+ */
+public class SeamValidationHelper extends WorkbenchContext {
+
+ protected SeamValidationContext validationContext;
+
+ /**
+ * @return Seam project
+ */
+ public ISeamProject getSeamProject() {
+ ISeamProject project = null;
+ try {
+ project = SeamCorePlugin.getSeamProject(getProject(), true);
+ } catch (Exception e) {
+ SeamCorePlugin.getDefault().logError("Can't get Seam Project", e);
+ }
+ return project;
+ }
+
+ /**
+ * @param element
+ * @return Resource of seam model element
+ */
+ public IResource getComponentResourceWithName(ISeamElement element) {
+ if(element instanceof ISeamComponent) {
+ Set declarations = ((ISeamComponent)element).getAllDeclarations();
+ for (Object o : declarations) {
+ SeamComponentDeclaration d = (SeamComponentDeclaration)o;
+ if(d.getLocationFor(SeamComponentDeclaration.PATH_OF_NAME)!=null) {
+ return d.getResource();
+ }
+ }
+ }
+ return element.getResource();
+ }
+
+ /**
+ * @param seam model element
+ * @return location of name attribute
+ */
+ public ISeamTextSourceReference getLocationOfName(ISeamElement element) {
+ return getLocationOfAttribute(element, SeamComponentDeclaration.PATH_OF_NAME);
+ }
+
+ /**
+ * @param seam model element
+ * @return location of attribute
+ */
+ public ISeamTextSourceReference getLocationOfAttribute(ISeamElement element, String attributeName) {
+ ISeamTextSourceReference location = null;
+ if(element instanceof AbstractContextVariable) {
+ location = ((AbstractContextVariable)element).getLocationFor(attributeName);
+ } else if(element instanceof ISeamComponent) {
+ Set declarations = ((ISeamComponent)element).getAllDeclarations();
+ for (Object d : declarations) {
+ location = ((SeamComponentDeclaration)d).getLocationFor(attributeName);
+ if(location!=null) {
+ break;
+ }
+ }
+ } else if(element instanceof SeamComponentDeclaration) {
+ location = ((SeamComponentDeclaration)element).getLocationFor(attributeName);
+ }
+ if(location==null && element instanceof ISeamTextSourceReference) {
+ location = (ISeamTextSourceReference)element;
+ }
+ return location;
+ }
+
+ /**
+ * @param resource
+ * @return true if resource is Jar file
+ */
+ public boolean isJar(IResource resource) {
+ String ext = resource.getFileExtension();
+ return ext!=null && ext.equalsIgnoreCase("jar");
+ }
+
+ /**
+ * @param element
+ * @return true if seam element packed in Jar file
+ */
+ public boolean isJar(ISeamElement element) {
+ return isJar(element.getResource());
+ }
+
+ /**
+ * @param componentXmlFile
+ * @return IType of component for <ComponentName>.component.xml
+ */
+ public IType getClassTypeForComponentXml(IFile componentXmlFile) {
+ String className = getClassNameForComponentXml(componentXmlFile);
+ if(className==null) {
+ return null;
+ }
+ return findType(className);
+ }
+
+ /**
+ * @param type name
+ * @return IType
+ */
+ public IType findType(String fullyQualifiedName) {
+ IProject p = getProject().getProject();
+ try {
+ IJavaProject jp = EclipseResourceUtil.getJavaProject(p);
+ return jp.findType(fullyQualifiedName);
+ } catch (JavaModelException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ return null;
+ }
+ }
+
+ /**
+ * @param componentXmlFile
+ * @return name of component class for <ComponentName>.component.xml
+ */
+ public String getClassNameForComponentXml(IFile componentXmlFile) {
+ String fileName = componentXmlFile.getName();
+ int firstDot = fileName.indexOf('.');
+ if(firstDot==-1) {
+ return null;
+ }
+ String className = fileName.substring(0, firstDot);
+ IProject p = getProject().getProject();
+ try {
+ IJavaProject jp = EclipseResourceUtil.getJavaProject(p);
+ IPackageFragment packageFragment = jp.findPackageFragment(componentXmlFile.getFullPath().removeLastSegments(1));
+ if(packageFragment==null) {
+ return null;
+ }
+ return packageFragment.getElementName() + "." + className;
+ } catch (JavaModelException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ return null;
+ }
+ }
+
+ /**
+ * Find setter for property
+ * @param type
+ * @param propertyName
+ * @return
+ */
+ public IMethod findSetter(IType type, String propertyName) {
+ if(propertyName == null || propertyName.length()==0) {
+ return null;
+ }
+ String firstLetter = propertyName.substring(0, 1).toUpperCase();
+ String nameWithoutFirstLetter = propertyName.substring(1);
+ String setterName = "set" + firstLetter + nameWithoutFirstLetter;
+ try {
+ return findSetterInHierarchy(type, setterName);
+ } catch (JavaModelException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ }
+ return null;
+ }
+
+ private IMethod findSetterInHierarchy(IType type, String setterName) throws JavaModelException {
+ IMethod[] methods = type.getMethods();
+ for (int i = 0; i < methods.length; i++) {
+ if(methods[i].getElementName().equals(setterName) && methods[i].getParameterNames().length==1) {
+ return methods[i];
+ }
+ }
+ String superclassName = type.getSuperclassName();
+ if(superclassName!=null) {
+ String[][] packages = type.resolveType(superclassName);
+ if(packages!=null) {
+ for (int i = 0; i < packages.length; i++) {
+ String packageName = packages[i][0];
+ if(packageName!=null && packageName.length()>0) {
+ packageName = packageName + ".";
+ } else {
+ packageName = "";
+ }
+ String qName = packageName + packages[i][1];
+ IType superclass = type.getJavaProject().findType(qName);
+ if(superclass!=null) {
+ IMethod method = findSetterInHierarchy(superclass, setterName);
+ if(method!=null) {
+ return method;
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.wst.validation.internal.operations.WorkbenchContext#registerResource(org.eclipse.core.resources.IResource)
+ */
+ @Override
+ public void registerResource(IResource resource) {
+ if(resource instanceof IFile) {
+ IFile file = (IFile)resource;
+ if(!file.exists()) {
+ getValidationContext().addRemovedFile(file);
+ } else {
+ getValidationContext().registerFile(file);
+ }
+ }
+ }
+
+ /**
+ * @return Set of changed resources
+ */
+ public Set<IFile> getChangedFiles() {
+ Set<IFile> result = new HashSet<IFile>();
+ String[] uris = getURIs();
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ for (int i = 0; i < uris.length; i++) {
+ IFile currentFile = root.getFile(new Path(uris[i]));
+ result.add(currentFile);
+ }
+ result.addAll(getValidationContext().getRemovedFiles());
+ return result;
+ }
+
+ public SeamValidationContext getValidationContext() {
+ if(validationContext==null) {
+ validationContext = ((SeamProject)getSeamProject()).getValidationContext();
+ }
+ return validationContext;
+ }
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidator.java 2007-07-20 17:46:54 UTC (rev 2573)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidator.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -12,9 +12,10 @@
import java.util.Set;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.wst.validation.internal.core.Message;
import org.eclipse.wst.validation.internal.core.ValidationException;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
@@ -24,6 +25,7 @@
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ISeamTextSourceReference;
import org.jboss.tools.seam.core.SeamPreferences;
+import org.jboss.tools.seam.internal.core.SeamProject;
/**
* Basic seam validator.
@@ -50,8 +52,9 @@
protected static final String UNKNOWN_COMPONENT_CLASS_NAME_MESSAGE_ID = "UNKNOWN_COMPONENT_CLASS_NAME";
protected static final String UNKNOWN_COMPONENT_PROPERTY_MESSAGE_ID = "UNKNOWN_COMPONENT_PROPERTY";
- protected SeamCoreValidationHelper coreHelper;
+ protected SeamValidationHelper coreHelper;
protected IReporter reporter;
+ protected SeamValidationContext validationContext;
protected ISeamProject project;
@@ -59,13 +62,47 @@
super();
}
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.validation.internal.provisional.core.IValidatorJob#getSchedulingRule(org.eclipse.wst.validation.internal.provisional.core.IValidationContext)
+ */
+ public ISchedulingRule getSchedulingRule(IValidationContext helper) {
+ return null;
+ }
+
public IStatus validateInJob(IValidationContext helper, IReporter reporter) throws ValidationException {
- this.coreHelper = (SeamCoreValidationHelper)helper;
+ this.coreHelper = (SeamValidationHelper)helper;
this.reporter = reporter;
this.project = coreHelper.getSeamProject();
- return OK_STATUS;
+ IStatus status = null;
+ try {
+ this.validationContext = ((SeamProject)project).getValidationContext();
+ Set<IFile> changedFiles = coreHelper.getChangedFiles();
+ if(changedFiles.size()>0) {
+ status = validate(changedFiles);
+ } else {
+ status = validateAll();
+ }
+ } finally {
+ validationContext.getRemovedFiles().clear();
+ validationContext.getRegisteredFiles().clear();
+ }
+ return status;
}
+ /**
+ * Incremental Validation
+ * @return
+ * @throws ValidationException
+ */
+ abstract public IStatus validate(Set<IFile> changedFiles) throws ValidationException;
+
+ /**
+ * Full Validation
+ * @return
+ * @throws ValidationException
+ */
+ abstract public IStatus validateAll() throws ValidationException;
+
public void cleanup(IReporter reporter) {
reporter = null;
}
Deleted: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELCompletionEngine.java 2007-07-20 17:46:54 UTC (rev 2573)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELCompletionEngine.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -1,764 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is 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
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.ui.text.java;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.rules.IToken;
-import org.jboss.tools.common.model.util.EclipseJavaUtil;
-import org.jboss.tools.seam.core.ISeamComponent;
-import org.jboss.tools.seam.core.ISeamContextVariable;
-import org.jboss.tools.seam.core.ISeamProject;
-import org.jboss.tools.seam.core.ScopeType;
-import org.jboss.tools.seam.ui.SeamGuiPlugin;
-
-/**
- * Utility class used to find Seam Project content assist proposals
- *
- * @author Jeremy
- */
-public final class SeamELCompletionEngine {
-
- /**
- * Constructs SeamELCompletionEngine object
- */
- public SeamELCompletionEngine() {
-
- }
-
- /**
- * Create the array of suggestions.
- *
- * @param project Seam project
- * @param file File
- * @param document
- * @param prefix the prefix to search for
- * @param position Offset of the prefix
- * @return the list of all possible suggestions
- * @throws BadLocationException if accessing the current document fails
- */
- public List<String> getCompletions(ISeamProject project, IFile file, IDocument document, CharSequence prefix,
- int position) throws BadLocationException {
-
- List<String> res= new ArrayList<String>();
- SeamELTokenizer tokenizer = new SeamELTokenizer(document, position + prefix.length());
- List<ELToken> tokens = tokenizer.getTokens();
-
- List<ELToken> resolvedExpressionPart = new ArrayList<ELToken>();
- List<ISeamContextVariable> resolvedVariables = new ArrayList<ISeamContextVariable>();
- ScopeType scope = getScope(project, file);
- List<List<ELToken>> variations = getPossibleVarsFromPrefix(tokens);
-
- if (variations.isEmpty()) {
- resolvedVariables = resolveVariables(project, scope, tokens, tokens);
- } else {
- for (List<ELToken> variation : variations) {
- List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
- resolvedVars = resolveVariables(project, scope, variation, tokens);
- if (resolvedVars != null && !resolvedVars.isEmpty()) {
- resolvedVariables = resolvedVars;
- resolvedExpressionPart = variation;
- break;
- }
- }
- }
-
- // Here we have a list of vars for some part of expression
- // OK. we'll proceed with members of these vars
- if (areEqualExpressions(resolvedExpressionPart, tokens)) {
- // First segment is the last one
- for (ISeamContextVariable var : resolvedVariables) {
- res.add(var.getName().substring(prefix.toString().length()));
- }
- return res;
- }
-
- // First segment is found - proceed with next tokens
- int startTokenIndex = (resolvedExpressionPart == null ? 0 : resolvedExpressionPart.size());
- Set<IMember> members = new HashSet<IMember>();
- for (ISeamContextVariable var : resolvedVariables) {
- IMember member = SeamExpressionResolver.getMemberByVariable(var);
- if (member != null && !members.contains(member))
- members.add(member);
- }
- for (int i = startTokenIndex;
- tokens != null && i < tokens.size() &&
- members != null && members.size() > 0;
- i++) {
- ELToken token = tokens.get(i);
-
- if (i < tokens.size() - 1) { // inside expression
- if (token.getType() == ELToken.EL_SEPARATOR_TOKEN)
- // proceed with next token
- continue;
-
- if (token.getType() == ELToken.EL_NAME_TOKEN) {
- // Find properties for the token
- String name = token.getText();
- Set<IMember> newMembers = new HashSet<IMember>();
- for (IMember mbr : members) {
- try {
- IType type = (mbr instanceof IType ? (IType)mbr : EclipseJavaUtil.findType(mbr.getJavaProject(), EclipseJavaUtil.getMemberTypeAsString(mbr)));
- Set<IMember> properties = SeamExpressionResolver.getProperties(type);
- for (IMember property : properties) {
- StringBuffer propertyName = new StringBuffer(property.getElementName());
- if (property instanceof IMethod) { // Setter or getter
- propertyName.delete(0, 3);
- propertyName.setCharAt(0, Character.toLowerCase(propertyName.charAt(0)));
- }
- if (name.equals(propertyName.toString())) {
- newMembers.add(property);
- }
- }
- } catch (JavaModelException ex) {
- SeamGuiPlugin.getPluginLog().logError(ex);
- }
- }
- members = newMembers;
- }
- if (token.getType() == ELToken.EL_METHOD_TOKEN) {
- // Find methods for the token
- String name = token.getText();
- if (name.indexOf('(') != -1) {
- name = name.substring(0, name.indexOf('('));
- }
- Set<IMember> newMembers = new HashSet<IMember>();
- for (IMember mbr : members) {
- try {
- IType type = (mbr instanceof IType ? (IType)mbr : EclipseJavaUtil.findType(mbr.getJavaProject(), EclipseJavaUtil.getMemberTypeAsString(mbr)));
- Set<IMember> methods = SeamExpressionResolver.getMethods(type);
- for (IMember method : methods) {
- if (name.equals(method.getElementName())) {
- newMembers.add(method);
- }
- }
- } catch (JavaModelException ex) {
- SeamGuiPlugin.getPluginLog().logError(ex);
- }
- }
- members = newMembers;
- }
- } else { // Last segment
- Set<String> proposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
- if (token.getType() == ELToken.EL_SEPARATOR_TOKEN) {
- // return all the methods + properties
- for (IMember mbr : members) {
- try {
- IType type = (mbr instanceof IType ? (IType)mbr : EclipseJavaUtil.findType(mbr.getJavaProject(), EclipseJavaUtil.getMemberTypeAsString(mbr)));
- proposals.addAll(SeamExpressionResolver.getMethodPresentations(type));
- proposals.addAll(SeamExpressionResolver.getPropertyPresentations(type));
- } catch (JavaModelException ex) {
- SeamGuiPlugin.getPluginLog().logError(ex);
- }
- }
- } else if (token.getType() == ELToken.EL_NAME_TOKEN ||
- token.getType() == ELToken.EL_METHOD_TOKEN) {
- // return filtered methods + properties
- Set<String> proposalsToFilter = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
- for (IMember mbr : members) {
- try {
- IType type = null;
- if(mbr instanceof IType) {
- type = (IType)mbr;
- } else {
- type = EclipseJavaUtil.findType(mbr.getJavaProject(), EclipseJavaUtil.getMemberTypeAsString(mbr));
- }
- proposalsToFilter.addAll(SeamExpressionResolver.getMethodPresentations(type));
- proposalsToFilter.addAll(SeamExpressionResolver.getPropertyPresentations(type));
- } catch (JavaModelException ex) {
- SeamGuiPlugin.getPluginLog().logError(ex);
- }
- }
- for (String proposal : proposalsToFilter) {
- // We do expect nothing but name for method tokens (No round brackets)
- String filter = token.getText();
- if (proposal.startsWith(filter)) {
- proposals.add(proposal.substring(filter.length()));
- }
- }
- }
- res.addAll(proposals);
- }
- }
-
- return res;
- }
-
- private String computeVariableName(List<ELToken> tokens){
- if (tokens == null)
- tokens = new ArrayList<ELToken>();
- StringBuffer sb = new StringBuffer();
- for (ELToken token : tokens) {
- if (token.getType() == ELToken.EL_NAME_TOKEN ||
- token.getType() == ELToken.EL_METHOD_TOKEN ||
- token.getType() == ELToken.EL_SEPARATOR_TOKEN) {
- sb.append(token.getText());
- }
- }
- return sb.toString();
- }
-
- /*
- * Compares to tokenized expressions.
- *
- * @param first
- * @param second
- * @return boolean true if two expressions are equal
- */
- private boolean areEqualExpressions(List<ELToken>first, List<ELToken>second) {
- if (first == null || second == null)
- return (first == second);
-
- if (first.size() != second.size())
- return false;
-
- for (int i = 0; i < first.size(); i++) {
- if (!first.get(i).equals(second.get(i)))
- return false;
- }
- return true;
- }
-
- /* Returns scope for the resource
- *
- * @param project
- * @param resource
- * @return
- */
- private ScopeType getScope(ISeamProject project, IResource resource) {
- if (project == null || resource == null)
- return null;
-
- Set<ISeamComponent> components = project.getComponentsByPath(resource.getFullPath());
-
- if (components.size() > 1) // Don't use scope in case of more than one component
- return null;
- for (ISeamComponent component : components) {
- return component.getScope();
- }
- return null;
- }
-
- /*
- * Tries to resolve variables by part of expression
- *
- * @param project
- * @param scope
- * @param part
- * @param tokens
- * @return
- */
- private List<ISeamContextVariable> resolveVariables(ISeamProject project, ScopeType scope, List<ELToken>part, List<ELToken> tokens) {
- List<ISeamContextVariable>resolvedVars = new ArrayList<ISeamContextVariable>();
- String varName = computeVariableName(part);
- if (varName != null) {
- resolvedVars = SeamExpressionResolver.resolveVariables(project, scope, varName);
- }
- if (resolvedVars != null && resolvedVars.size() > 0) {
- List<ISeamContextVariable> newResolvedVars = new ArrayList<ISeamContextVariable>();
- for (ISeamContextVariable var : resolvedVars) {
- if(!areEqualExpressions(part, tokens)) {
- // Do filter by equals (name)
- // In case of the last pass - do not filter by startsWith(name) instead of equals
- if (varName.equals(var.getName())) {
- newResolvedVars.add(var);
- }
- } else {
- newResolvedVars.add(var);
- }
- }
- return newResolvedVars;
- }
- return new ArrayList<ISeamContextVariable>();
- }
-
- /*
- * Creates and returns list of possible variable name combinations from expression starting from the longest name
- *
- *
- * @param prefix
- * @return
- */
- private List<List<ELToken>> getPossibleVarsFromPrefix(List<ELToken>prefix) {
- ArrayList<List<ELToken>> result = new ArrayList<List<ELToken>>();
- for (int i = 0; prefix != null && i < prefix.size(); i++) {
- ELToken lastToken = prefix.get(i);
- if (lastToken.getType() != ELToken.EL_SEPARATOR_TOKEN) {
- ArrayList<ELToken> prefixPart = new ArrayList<ELToken>();
- for (int j = 0; j <= i; j++) {
- prefixPart.add(prefix.get(j));
- }
- result.add(0, prefixPart);
- }
- }
- return result;
- }
-
- /**
- * Removes duplicates of completion strings
- *
- * @param suggestions a list of suggestions ({@link String}).
- * @return a list of unique completion suggestions.
- */
- public List<String> makeUnique(List<String> suggestions) {
- HashSet<String> present = new HashSet<String>();
- ArrayList<String> unique= new ArrayList<String>();
-
- if (suggestions == null)
- return unique;
-
- for (String item : suggestions) {
- if (!present.contains(item)) {
- present.add(item);
- unique.add(item);
- }
- }
-
- present.clear();
- return unique;
- }
-
- /**
- * EL string parser.
- * Creates list of tokens for the name, method and separator parts
- *
- * @author Jeremy
- */
- public static class SeamELTokenizer {
- static final int STATE_INITIAL = 0;
- static final int STATE_VAR = 1;
- static final int STATE_METHOD = 2;
- static final int STATE_SEPARATOR = 3;
-
- IDocument fDocument;
- List<ELToken> fTokens;
- int index;
-
- /**
- * Constructs SeamELTokenizer object
- *
- * @param document
- * @param offset
- */
- public SeamELTokenizer(IDocument document, int offset) {
- fDocument = document;
- index = (fDocument == null || fDocument.getLength() < offset? -1 : offset);
- fTokens = new ArrayList<ELToken>();
- parseBackward();
- }
-
- /**
- * Returns list of tokens for the expression parsed
- *
- * @return
- */
- public List<ELToken> getTokens() {
- return fTokens;
- }
-
- /*
- * Performs backward parsing of document text for expression
- */
- private void parseBackward() {
- ELToken token;
- fState = STATE_INITIAL;
- while ((token = getNextToken()) != ELToken.EOF) {
-
- if (token.type == ELToken.EL_NAME_TOKEN ||
- token.type == ELToken.EL_METHOD_TOKEN ||
- token.type == ELToken.EL_SEPARATOR_TOKEN) {
-
- fTokens.add(0, token);
- }
- }
- }
-
- int fState;
- int fEndOfToken;
-
- /*
- * Calculates and returns next token for expression
- *
- * @return
- */
- private ELToken getNextToken() {
- switch (fState) {
- case STATE_INITIAL: // Just started
- {
- int ch = readCharBackward();
- if (ch == -1) {
- return ELToken.EOF;
- }
- if (Character.isJavaIdentifierPart((char)ch)) {
- releaseChar();
- return readVarToken();
- }
- if (ch == '.') {
- releaseChar();
- return readSeparatorToken();
- }
- if (ch == ')') {
- releaseChar();
- return readMethodToken();
- }
- return ELToken.EOF;
- }
- case STATE_VAR: // Variable name is read - expecting a separator
- {
- int ch = readCharBackward();
- if (ch == -1) {
- return ELToken.EOF;
- }
- if (ch == '.') {
- releaseChar();
- return readSeparatorToken();
- }
- return ELToken.EOF;
- }
- case STATE_METHOD: // Method name and parameters are read - expecting a separator
- {
- int ch = readCharBackward();
- if (ch == -1) {
- return ELToken.EOF;
- }
- if (ch == '.') {
- releaseChar();
- return readSeparatorToken();
- }
- return ELToken.EOF;
- }
- case STATE_SEPARATOR: // Separator is read - expecting a var or method
- {
- int ch = readCharBackward();
- if (ch == -1) {
- return ELToken.EOF;
- }
- if (Character.isJavaIdentifierPart((char)ch)) {
- releaseChar();
- return readVarToken();
- }
- if (ch == ')') {
- releaseChar();
- return readMethodToken();
- }
- return ELToken.EOF;
- }
- }
- return ELToken.EOF;
- }
-
- /* Reads and returns the method token from the expression
- *
- * @return
- */
- ELToken readMethodToken() {
- fState = STATE_METHOD;
- int endOfToken = index;
-
- // read the method parameters
- if (!skipMethodParameters())
- return ELToken.EOF;
-
- // skip spaces between the method's name and it's parameters
- if (!skipSpaceChars())
- return ELToken.EOF;
- // read the method name
- if (!skipMethodName())
- return ELToken.EOF;
-
- return (endOfToken - index > 0 ? new ELToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELToken.EL_METHOD_TOKEN) : ELToken.EOF);
- }
-
- /*
- * Returns the CharSequence object
- *
- * @param start
- * @param length
- * @return
- */
- private CharSequence getCharSequence(int start, int length) {
- String text = "";
- try {
- text = fDocument.get(start, length);
- } catch (BadLocationException e) {
- text = ""; // For sure
- }
- return text.subSequence(0, text.length());
- }
-
-
- /*
- * Skips the space characters in the document
- */
- boolean skipSpaceChars() {
- int ch;
- while ((ch = readCharBackward()) != -1) {
- if (!Character.isSpaceChar(ch)) {
- releaseChar();
- break;
- }
- }
- return true;
- }
-
- /*
- * Skips the method name characters in the document
- *
- * @return boolean true if at least 1 character had been read
- */
- boolean skipMethodName() {
- int endOfToken = index;
- int ch;
- while((ch = readCharBackward()) != -1) {
- if (!Character.isJavaIdentifierPart(ch)) {
- releaseChar();
- return (endOfToken - index > 0);
- }
- }
- return false;
- }
-
- /*
- * Skips the method parameters characters in the document
- *
- * @return boolean true if complete parameters set had been read
- */
- boolean skipMethodParameters() {
- int ch = readCharBackward();
- if (ch != ')')
- return false;
- int pCount = 1;
- while (pCount > 0) {
- ch = readCharBackward();
- if (ch == -1)
- return false;
-
- if (ch == '"' || ch == '\'') {
- skipQuotedChars((char)ch);
- continue;
- }
- if (ch == ')') {
- pCount++;
- continue;
- }
- if (ch == '(') {
- pCount--;
- continue;
- }
- }
- return true;
- }
-
- /*
- * Skips the quoted characters
- *
- */
- void skipQuotedChars(char pair) {
- int ch = readCharBackward();
-
- while (ch != -1) {
- if (ch == pair) {
- ch = readCharBackward();
- if (ch == '\\') {
- int backSlashCount = 0;
- while (ch == '\\') {
- backSlashCount++;
- ch = readCharBackward();
- }
- releaseChar(); // Return the last non-slash char to the buffer
- if ((backSlashCount/2)*2 == backSlashCount) {
- return;
- }
- }
- }
- ch = readCharBackward();
- }
- }
-
- /* Reads and returns the separator token from the expression
- *
- * @return
- */
- ELToken readSeparatorToken() {
- fState = STATE_SEPARATOR;
- int ch = readCharBackward();
-
- return (ch == '.' ? new ELToken(index, 1, getCharSequence(index, 1), ELToken.EL_SEPARATOR_TOKEN) :
- ELToken.EOF);
- }
-
- /* Reads and returns the variable token from the expression
- *
- * @return
- */
- ELToken readVarToken() {
- fState = STATE_VAR;
- int endOfToken = index;
- int ch;
- while((ch = readCharBackward()) != -1) {
- if (!Character.isJavaIdentifierPart(ch)) {
- releaseChar();
- return (endOfToken - index > 0 ? new ELToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELToken.EL_NAME_TOKEN) : ELToken.EOF);
- }
- }
- releaseChar();
- return (endOfToken - index > 0 ? new ELToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), ELToken.EL_NAME_TOKEN) : ELToken.EOF);
- }
-
- /* Reads the next character in the document
- *
- * @return
- */
- int readCharBackward() {
- if (--index < 0 ||
- fDocument == null ||
- fDocument.getLength() <= index)
- return -1;
-
- try {
- return fDocument.getChar(index);
- } catch (BadLocationException e) {
- return -1;
- }
- }
-
- /*
- * returns the character to the document
- */
- void releaseChar() {
- if (index < fDocument.getLength())
- index++;
- }
- }
-
- /**
- * Calculates the EX expression operand string
- *
- * @param viewer
- * @param offset
- * @return
- * @throws BadLocationException
- */
- public static String getPrefix(ITextViewer viewer, int offset) throws BadLocationException {
- IDocument doc= viewer.getDocument();
- if (doc == null || offset > doc.getLength())
- return null;
-
- SeamELTokenizer tokenizer = new SeamELTokenizer(doc, offset);
- List<ELToken> tokens = tokenizer.getTokens();
-
- if (tokens == null || tokens.size() == 0)
- return null;
-
- return doc.get(tokens.get(0).start, offset - tokens.get(0).start);
- }
-}
-
-/**
- * Token for the EX expression
- *
- * @author Jeremy
- */
-class ELToken implements IToken {
- static final ELToken EOF = new ELToken(-1, -1, null, -1);
- static final int EL_NAME_TOKEN = 1;
- static final int EL_METHOD_TOKEN = 2;
- static final int EL_SEPARATOR_TOKEN = 3;
-
- int start;
- int length;
- CharSequence chars;
- int type;
-
- /**
- * Constructs the ELToken object
- *
- * @param start
- * @param length
- * @param chars
- * @param type
- */
- public ELToken(int start, int length, CharSequence chars, int type) {
- this.start = start;
- this.length = length;
- this.chars = chars;
- this.type = type;
- }
-
- /**
- * Returns string representation for the token
- */
- public String toString() {
- return "ELToken(" + start + ", " + length + ", " + type + ") [" + (chars == null ? "<Empty>" : chars.toString()) + "]";
- }
-
- /*
- * @see org.eclipse.jface.text.rules.IToken#getData()
- */
- public Object getData() {
- return (chars == null ? null : chars.subSequence(start, start+length).toString());
- }
-
- /*
- * @see org.eclipse.jface.text.rules.IToken#isEOF()
- */
- public boolean isEOF() {
- return (start == -1 && length == -1 && chars == null);
- }
-
- /*
- * @see org.eclipse.jface.text.rules.IToken#isOther()
- */
- public boolean isOther() {
- return false;
- }
-
- /*
- * @see org.eclipse.jface.text.rules.IToken#isUndefined()
- */
- public boolean isUndefined() {
- return false;
- }
-
- /*
- * @see org.eclipse.jface.text.rules.IToken#isWhitespace()
- */
- public boolean isWhitespace() {
- return false;
- }
-
- /*
- * Returns the token type
- */
- public int getType(){
- return type;
- }
-
- /*
- * Returns the token text
- */
- public String getText() {
- return chars.toString();
- }
-}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalComputer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalComputer.java 2007-07-20 17:46:54 UTC (rev 2573)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalComputer.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -67,4 +67,4 @@
*/
public void sessionEnded() {
}
-}
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2007-07-20 17:46:54 UTC (rev 2573)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -45,6 +45,7 @@
import org.jboss.tools.common.text.ext.IEditorWrapper;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
/**
@@ -254,6 +255,8 @@
return (ICompletionProposal[]) result.toArray(new ICompletionProposal[uniqueSuggestions.size()]);
} catch (BadLocationException x) {
return NO_PROPOSALS;
+ } catch (StringIndexOutOfBoundsException e) {
+ return NO_PROPOSALS;
}
}
Deleted: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamExpressionResolver.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamExpressionResolver.java 2007-07-20 17:46:54 UTC (rev 2573)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamExpressionResolver.java 2007-07-20 18:43:09 UTC (rev 2574)
@@ -1,284 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is 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
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.seam.ui.text.java;
-
-import java.lang.reflect.Modifier;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.eclipse.jdt.core.IField;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-import org.jboss.tools.seam.core.IBijectedAttribute;
-import org.jboss.tools.seam.core.ISeamComponent;
-import org.jboss.tools.seam.core.ISeamContextVariable;
-import org.jboss.tools.seam.core.ISeamElement;
-import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
-import org.jboss.tools.seam.core.ISeamJavaSourceReference;
-import org.jboss.tools.seam.core.ISeamProject;
-import org.jboss.tools.seam.core.ISeamXmlFactory;
-import org.jboss.tools.seam.core.ScopeType;
-
-/**
- * Utility class used to resolve Seam project variables and to get the methods/properties and their presentation strings from type
- *
- * @author Jeremy
- */
-public class SeamExpressionResolver {
-
- /**
- * Returns Seam project variables which names start from specified value
- *
- * @param project
- * @param scope
- * @param name
- * @return
- */
- public static List<ISeamContextVariable> resolveVariables(ISeamProject project, ScopeType scope, String name) {
- if (project == null || name == null) return null;
- return (scope == null ? internalResolveVariables(project, name) :
- internalResolveVariablesByScope(project, scope, name));
- }
-
- /**
- * Returns Seam project variables which names start from specified value
- * No scope used
- *
- * @param project
- * @param name
- * @return
- */
- private static List<ISeamContextVariable> internalResolveVariables(ISeamProject project, String name) {
- List<ISeamContextVariable> resolvedVariables = new ArrayList<ISeamContextVariable>();
- Set<ISeamContextVariable> variables = project.getVariables();
- for (ISeamContextVariable variable : variables) {
- if (variable.getName().startsWith(name)) {
- resolvedVariables.add(variable);
- }
- }
- return resolvedVariables;
- }
-
- /**
- * Returns Seam project variables which names start from specified value
- * Search is performed using scope
- *
- * @param project
- * @param scope
- * @param name
- * @return
- */
- private static List<ISeamContextVariable> internalResolveVariablesByScope(ISeamProject project, ScopeType scope, String name) {
- List<ISeamContextVariable> resolvedVariables = new ArrayList<ISeamContextVariable>();
- Set<ISeamContextVariable> variables = project.getVariablesByScope(scope);
- for (ISeamContextVariable variable : variables) {
- if (variable.getName().startsWith(name)) {
- resolvedVariables.add(variable);
- }
- }
- return resolvedVariables;
- }
-
- /**
- * Returns the IMember for the variable specified
- *
- * @param variable
- * @return
- */
- public static IMember getMemberByVariable(ISeamContextVariable variable) {
- IMember member = null;
- if (variable instanceof ISeamComponent) {
- ISeamComponent component = (ISeamComponent)variable;
- ISeamJavaComponentDeclaration decl = component.getJavaDeclaration();
- if (decl != null) {
- member = decl.getSourceMember();
- }
- }
- if (member == null && variable instanceof IBijectedAttribute) {
- member = ((ISeamJavaSourceReference)variable).getSourceMember();
- }
- if (member == null && variable instanceof ISeamJavaSourceReference) {
- member = ((ISeamJavaSourceReference)variable).getSourceMember();
- }
- if (member == null && variable instanceof ISeamXmlFactory) {
- ISeamXmlFactory factory = (ISeamXmlFactory)variable;
- String value = factory.getValue();
- if (value != null && value.length() > 0) {
- if (value.startsWith("#{") || value.startsWith("${"))
- value = value.substring(2);
- if (value.endsWith("}"))
- value = value.substring(0, value.length() - 1);
- }
- if (value != null && value.length() > 0) {
- // TODO: Need to make sure that it's correct way to get the project and
- // the scope from the factory
- ISeamProject project = ((ISeamElement)factory).getSeamProject();
-// ISeamProject project = getSeamProject(factory.getResource());
- if (project != null) {
- List<ISeamContextVariable> resolvedValues = resolveVariables(project, factory.getScope(), value);
- for (ISeamContextVariable var : resolvedValues) {
- if (var.getName().equals(value)) {
- member = getMemberByVariable(var);
- break;
- }
- }
- }
- }
- }
- return member;
- }
-
- /**
- * Returns the methods for the type specified
- *
- * @param type
- * @return
- */
- public static Set<IMember> getMethods(IType type) {
- Set<IMember> methods = new HashSet<IMember>();
- if (type != null) {
- try {
- IMethod[] mthds = type.getMethods();
- for (int i = 0; mthds != null && i < mthds.length; i++) {
- IMethod m = mthds[i];
- if (Modifier.isPublic(m.getFlags()) &&
- (!m.getElementName().startsWith("get") && !m.getElementName().startsWith("set")) ||
- "get".equals(m.getElementName()) || "set".equals(m.getElementName())) {
- methods.add(m);
- }
- }
- } catch (JavaModelException e) {
- }
- }
- return methods;
- }
-
- /**
- * Returns the method presentation strings for the type specified
- *
- * @param type
- * @return
- */
- public static Set<String> getMethodPresentations(IType type) {
- Set<String> methods = new HashSet<String>();
- if (type != null) {
- try {
- IMethod[] mthds = type.getMethods();
- for (int i = 0; mthds != null && i < mthds.length; i++) {
- IMethod m = mthds[i];
- if (Modifier.isPublic(m.getFlags()) &&
- (!m.getElementName().startsWith("get") && !m.getElementName().startsWith("set")) ||
- "get".equals(m.getElementName()) || "set".equals(m.getElementName())) {
-
- StringBuffer name = new StringBuffer(m.getElementName());
-
- name.append('(');
- String[] mParams = null;
- mParams = m.getParameterNames();
- for (int j = 0; mParams != null && j < mParams.length; j++) {
- if (j > 0) name.append(", ");
- name.append(mParams[j]);
- }
- name.append(')');
-
- methods.add(name.toString());
- }
- }
- } catch (JavaModelException e) {
- }
- }
- return methods;
- }
-
- /**
- * Returns the properties for the type specified
- *
- * @param type
- * @return
- */
- public static Set<IMember> getProperties(IType type) {
- Set<IMember> properties = new HashSet<IMember>();
- if (type != null) {
- try {
- IMethod[] props = type.getMethods();
- for (int i = 0; props != null && i < props.length; i++) {
- IMethod m = props[i];
- if (Modifier.isPublic(m.getFlags()) &&
- (m.getElementName().startsWith("get") && !"get".equals(m.getElementName())) ||
- (m.getElementName().startsWith("set") && !"set".equals(m.getElementName()))) {
- properties.add(m);
- }
- }
- } catch (JavaModelException e) {
- }
-
- try {
- IField[] fields = type.getFields();
- for (int i = 0; fields != null && i < fields.length; i++) {
- IField f = fields[i];
- if (Modifier.isPublic(f.getFlags())) {
- properties.add(f);
- }
- }
- } catch (JavaModelException e) {
- }
- }
- return properties;
- }
-
- /**
- * Returns the property presentation strings for the type specified
- *
- * @param type
- * @return
- */
- public static Set<String> getPropertyPresentations(IType type) {
- Set<String> properties = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
- if (type != null) {
- try {
- IMethod[] props = type.getMethods();
- for (int i = 0; props != null && i < props.length; i++) {
- IMethod m = props[i];
- if (Modifier.isPublic(m.getFlags()) &&
- (m.getElementName().startsWith("get") && !"get".equals(m.getElementName())) ||
- (m.getElementName().startsWith("set") && !"set".equals(m.getElementName()))) {
-
- StringBuffer name = new StringBuffer(m.getElementName());
- name.delete(0, 3);
- name.setCharAt(0, Character.toLowerCase(name.charAt(0)));
-
- properties.add(name.toString());
- }
- }
- } catch (JavaModelException e) {
- }
-
- try {
- IField[] fields = type.getFields();
- for (int i = 0; fields != null && i < fields.length; i++) {
- IField f = fields[i];
- if (Modifier.isPublic(f.getFlags())) {
- properties.add(f.getElementName());
- }
- }
- } catch (JavaModelException e) {
- }
- }
- return properties;
- }
-}
17 years, 3 months
JBoss Tools SVN: r2573 - trunk/core/features/org.jboss.ide.eclipse.feature.
by jbosstools-commits@lists.jboss.org
Author: mculpepper(a)jboss.com
Date: 2007-07-20 13:46:54 -0400 (Fri, 20 Jul 2007)
New Revision: 2573
Modified:
trunk/core/features/org.jboss.ide.eclipse.feature/feature.xml
Log:
removed obsolete JEM reference [JBIDE-500]
Modified: trunk/core/features/org.jboss.ide.eclipse.feature/feature.xml
===================================================================
--- trunk/core/features/org.jboss.ide.eclipse.feature/feature.xml 2007-07-20 17:26:20 UTC (rev 2572)
+++ trunk/core/features/org.jboss.ide.eclipse.feature/feature.xml 2007-07-20 17:46:54 UTC (rev 2573)
@@ -444,7 +444,6 @@
<import plugin="org.eclipse.help.ui"/>
<import feature="org.eclipse.emf"/>
<import feature="org.eclipse.gef"/>
- <import feature="org.eclipse.jem"/>
<import feature="org.eclipse.jst"/>
<import feature="org.eclipse.wst"/>
<import feature="org.eclipse.xsd"/>
17 years, 3 months
JBoss Tools SVN: r2572 - trunk/jst/plugins/org.jboss.tools.jst.web.tiles/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-20 13:26:20 -0400 (Fri, 20 Jul 2007)
New Revision: 2572
Removed:
trunk/jst/plugins/org.jboss.tools.jst.web.tiles/resources/meta/tiles_config_1_1.dtd
Log:
EXIN-86 Third party dtds and schemas removed
Deleted: trunk/jst/plugins/org.jboss.tools.jst.web.tiles/resources/meta/tiles_config_1_1.dtd
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.tiles/resources/meta/tiles_config_1_1.dtd 2007-07-20 17:24:22 UTC (rev 2571)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.tiles/resources/meta/tiles_config_1_1.dtd 2007-07-20 17:26:20 UTC (rev 2572)
@@ -1,280 +0,0 @@
-<!--
- DTD for the Tile Definition File, Version 1.1
-
- To support validation of your configuration file, include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE tiles-definitions PUBLIC
- "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
- "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
-
- $Id: tiles_config_1_1.dtd,v 1.1 2004/11/11 12:33:07 glory Exp $
--->
-
-
-<!-- ========== Defined Types ============================================= -->
-
-
-<!-- A "Boolean" is the string representation of a boolean (true or false)
- variable.
--->
-<!ENTITY % Boolean "(true|false)">
-
-
-<!-- A "ContentType" is the content type of an attribute passed to a tile
- component.
--->
-<!ENTITY % ContentType "(string|page|template|definition)">
-
-<!-- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-<!-- A "RequestPath" is an application-relative URI path, beginning with a
- slash, that identifies a mapped resource (such as a JSP page or a servlet)
- within this web application.
--->
-<!ENTITY % RequestPath "CDATA">
-
-<!-- A "DefinitionName" is the unique identifier of a definition. This identifier
- is a logical name used to reference the definition.
--->
-<!ENTITY % DefinitionName "CDATA">
-
-<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
- and also serves as the name of the corresponding scripting variable
- and the name of the JSP attribute under which the bean is accessed.
- Therefore, it must conform to the rules for a Java identifier.
--->
-<!ENTITY % BeanName "CDATA">
-
-<!-- A "PropName" is the name of a JavaBeans property, and must begin with
- a lower case letter and contain only characters that are legal in a
- Java identifier.
--->
-<!ENTITY % PropName "CDATA">
-
-<!-- A "Location" is a relative path, delimited by "/" characters, that
- defines the location of a resource relative to the location of the
- configuration file itself.
--->
-<!ENTITY % Location "#PCDATA">
-
-
-
-<!-- ========== Top Level Elements ======================================== -->
-
-
- <!-- deprecated: use tiles-definitions instead.-->
-<!ELEMENT component-definitions (definition*)>
-
-<!-- The "tiles-definitions" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT tiles-definitions (definition*)>
-
-<!-- The "definition" element describes definition that can be inserted in a jsp
- page. This definition is identified by its logical name. A definition allows
- to define all the attributes that can be set in <insert> tag from a jsp page.
-
- name The unique identifier for this definition.
-
- path The context-relative path to the resource used as tiles to
- insert. This tiles will be inserted and a tiles context
- containing appropriate attributes will be available.
-
- page Same as path.
- template Same as path. For compatibility with the template taglib.
-
- extends Name of a definition that is used as ancestor of this definition.
- All attributes from the ancestor are available to the new
- definition. Any attribute inherited from the ancestor can
- be overloaded by providing a new value.
-
- role security role name that is allowed access to this definition
- object. The definition is inserted only if the role name is
- allowed.
-
- controllerClass The fully qualified Java class name of the controller
- subclass to call immediately before the tiles is inserted.
- Only one of controllerClass or controllerUrl should be
- specified.
-
- controllerUrl The context-relative path to the resource used as controller
- called immediately before the tiles is inserted.
- Only one of controllerClass or controllerUrl should be
- specified.
--->
-<!ELEMENT definition (icon?, display-name?, description?, put*, putList*)>
-<!ATTLIST definition id ID #IMPLIED>
-<!ATTLIST definition name %DefinitionName; #REQUIRED>
-<!ATTLIST definition page %RequestPath; #IMPLIED>
-<!ATTLIST definition path %RequestPath; #IMPLIED>
-<!ATTLIST definition extends %DefinitionName; #IMPLIED>
-<!ATTLIST definition role CDATA #IMPLIED>
-<!ATTLIST definition template %RequestPath; #IMPLIED>
-<!ATTLIST definition controllerClass %ClassName; #IMPLIED>
-<!ATTLIST definition controllerUrl %RequestPath; #IMPLIED>
-
-
-<!-- The "put" element describes an attribute of a definition. It allows to
- specify the tiles attribute name and its value. The tiles value can be
- specified as an xml attribute, or in the body of the <put> tag.
-
- name The unique identifier for this tiles attribute.
-
- value The value associated to this tiles attribute. The value should
- be specified with this tag attribute, or in the body of the tag.
-
- type The type of the value. Can be: string, page, template or definition.
- By default, no type is associated to a value. If a type is
- associated, it will be used as a hint to process the value
- when the attribute will be used in the inserted tiles.
-
- content Same as value. For compatibility with the template taglib.
-
- direct Same as type="string". For compatibility with the template
- taglib.
--->
-<!ELEMENT put (#PCDATA)>
-<!ATTLIST put id ID #IMPLIED>
-<!ATTLIST put name CDATA #REQUIRED>
-<!ATTLIST put value CDATA #IMPLIED>
-<!ATTLIST put type %ContentType; #IMPLIED>
-<!ATTLIST put content CDATA #IMPLIED>
-<!ATTLIST put direct %Boolean; #IMPLIED>
-
-
-<!-- The "putList" element describes a list attribute of a definition. It allows to
- specify an attribute that is a java List containing any kind of values. In
- the config file, the list elements are specified by nested <add>, <item> or
- <putList>.
-
- name The unique identifier for this tiles attribute.
--->
-<!ELEMENT putList ( (add* | item* | bean* | putList*)*) >
-<!ATTLIST putList id ID #IMPLIED>
-<!ATTLIST putList name CDATA #REQUIRED>
-
-<!-- ========== Subordinate Elements ====================================== -->
-
-<!-- The "add" element describes an element of a list. It is similar to the
- <put> element.
-
- value The value associated to this tiles attribute. The value should
- be specified with this tag attribute, or in the body of the tag.
-
- type The type of the value. Can be: string, page, template or definition.
- By default, no type is associated to a value. If a type is
- associated, it will be used as a hint to process the value
- when the attribute will be used in the inserted tiles.
-
- content Same as value. For compatibility with the template taglib.
-
- direct Same as type="string". For compatibility with the template
- taglib.
--->
-<!ELEMENT add (#PCDATA)>
-<!ATTLIST add id ID #IMPLIED>
-<!ATTLIST add value CDATA #IMPLIED>
-<!ATTLIST add type %ContentType; #IMPLIED>
-<!ATTLIST add content CDATA #IMPLIED>
-<!ATTLIST add direct %Boolean; #IMPLIED>
-
-
-<!-- The "bean" element describes an element of a list. It create a bean of the
- specified java classtype. This bean is initialized with appropriate nested
- <set-property>.
-
- classtype The fully qualified classname for this bean.
--->
-<!ELEMENT bean (set-property*)>
-<!ATTLIST bean id ID #IMPLIED>
-<!ATTLIST bean classtype %ClassName; #REQUIRED>
-
-<!-- The "set-property" element specifies the method name and initial value of
- a bean property. When the object representing
- the surrounding element is instantiated, the accessor for the indicated
- property is called and passed the indicated value.
-
- property Name of the JavaBeans property whose setter method
- will be called.
-
- value String representation of the value to which this
- property will be set, after suitable type conversion
--->
-<!ELEMENT set-property EMPTY>
-<!ATTLIST set-property id ID #IMPLIED>
-<!ATTLIST set-property property %PropName; #REQUIRED>
-<!ATTLIST set-property value CDATA #REQUIRED>
-
-
-<!-- The "item" element describes an element of a list. It create a bean added as
- element to the list. Each bean can contains different properties: value, link,
- icon, tooltip. This properties are to be interpreted by the jsp page using
- them.
- By default the bean is of type
- "org.apache.struts.tiles.beans.SimpleMenuItem". This bean is useful to
- create list of beans used as menu items.
-
- value The bean 'value' property.
-
- link The bean 'link' property.
-
- icon The bean 'icon' property.
-
- tooltip The bean 'tooltip' property.
-
- classtype The fully qualified classname for this bean.
- If specified, the classname must be a subclass of the interface
- "org.apache.struts.tiles.beans.MenuItem".
--->
-<!ELEMENT item (#PCDATA)>
-<!ATTLIST item id ID #IMPLIED>
-<!ATTLIST item value CDATA #REQUIRED>
-<!ATTLIST item link CDATA #REQUIRED>
-<!ATTLIST item classtype %ClassName; #IMPLIED>
-<!ATTLIST item icon CDATA #IMPLIED>
-<!ATTLIST item tooltip CDATA #IMPLIED>
-
-<!-- ========== Info Elements ====================================== -->
-
-<!-- The "description" element contains descriptive (paragraph length) text
- about the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT description (#PCDATA)>
-<!ATTLIST description id ID #IMPLIED>
-
-
-<!-- The "display-name" element contains a short (one line) description of
- the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name id ID #IMPLIED>
-
-
-<!-- The "icon" element contains a small-icon and large-icon element which
- specify the location, relative to the Struts configuration file, for small
- and large images used to represent the surrounding element in GUI tools.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon id ID #IMPLIED>
-
-
-<!-- The "large-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a large (32x32 pixel)
- icon image.
--->
-<!ELEMENT large-icon (%Location;)>
-<!ATTLIST large-icon id ID #IMPLIED>
-
-
-<!-- The "small-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a small (16x16 pixel)
- icon image.
--->
-<!ELEMENT small-icon (%Location;)>
-<!ATTLIST small-icon id ID #IMPLIED>
-
17 years, 3 months
JBoss Tools SVN: r2571 - in trunk/struts/plugins/org.jboss.tools.struts: dtds and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-20 13:24:22 -0400 (Fri, 20 Jul 2007)
New Revision: 2571
Removed:
trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_0.dtd
trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_1.dtd
trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_2.dtd
trunk/struts/plugins/org.jboss.tools.struts/dtds/tiles-config_1_1.dtd
trunk/struts/plugins/org.jboss.tools.struts/dtds/validator_1_0.dtd
trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_0.dtd
trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_1.dtd
trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_2.dtd
trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_0.dtd
trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_1_3.dtd
trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_2_0.dtd
Modified:
trunk/struts/plugins/org.jboss.tools.struts/plugin.xml
Log:
EXIN-86 Third party dtds and schemas removed
Deleted: trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_0.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_0.dtd 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_0.dtd 2007-07-20 17:24:22 UTC (rev 2571)
@@ -1,408 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-
-<!--
- DTD for the Struts Application Configuration File, Version 1.0
-
- To support validation of your configuration file, include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE struts-config PUBLIC
- "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
- "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
-
- $Id: struts-config_1_0.dtd,v 1.1.1.1 2004/10/06 17:32:27 sim Exp $
--->
-
-
-<!-- ========== Defined Types ============================================= -->
-
-
-<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
- and also serves as the name of the corresponding scripting variable
- and the name of the JSP attribute under which the bean is accessed.
- Therefore, it must conform to the rules for a Java identifier.
--->
-<!ENTITY % BeanName "CDATA">
-
-
-<!-- A "Boolean" is the string representation of a boolean (true or false)
- variable.
--->
-<!ENTITY % Boolean "(true|false|yes|no)">
-
-
-<!-- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!-- An "Integer" is a character string consisting solely of numeric digits,
- optionally preceeded by a minus sign, that can be converted to a
- 32-bit integer.
--->
-<!ENTITY % Integer "CDATA">
-
-
-<!-- A "Location" is a relative path, delimited by "/" characters, that
- defines the location of a resource relative to the location of the
- Struts configuration file itself.
--->
-<!ENTITY % Location "#PCDATA">
-
-
-<!-- A "PropName" is the name of a JavaBeans property, and must begin with
- a lower case letter and contain only characters that are legal in a
- Java identifier.
--->
-<!ENTITY % PropName "CDATA">
-
-
-<!-- A "RequestPath" is a context-relative URI path, beginning with a slash,
- that identifies a mapped resource (such as a JSP page or a servlet)
- within this web application.
--->
-<!ENTITY % RequestPath "CDATA">
-
-
-<!-- The name of a JSP bean scope within which such a form bean may be
- accessed.
--->
-<!ENTITY % RequestScope "(request|session)">
-
-
-<!-- ========== Top Level Elements ======================================== -->
-
-
-<!-- The "struts-config" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT struts-config (data-sources?, form-beans?, global-forwards?, action-mappings?)>
-<!ATTLIST struts-config id ID #IMPLIED>
-
-
-<!-- The "data-sources" element describes a set of JDBC 2.0 Standard Extension
- data source objects which will be configured according to the nested
- "data-source" elements found inside.
--->
-
-<!ELEMENT data-sources (data-source*)>
-<!ATTLIST data-sources id ID #IMPLIED>
-
-
-<!-- The "data-source" element describes a JDBC 2.0 Standard Extension data
- source object (that implements javax.sql.DataSource) which will be
- configured according to the properties and nested elements found here,
- and made available as a servlet context attribute (i.e. application
- scope bean). The following attributes are required:
-
- key Servlet context attribute key under which this data
- source will be stored. Default is the value specified
- by string constant Action.DATA_SOURCE_KEY.
-
- type Fully qualified Java class name of the implementation
- class (must implement javax.sql.DataSource). Default
- value is 'org.apache.struts.util.GenericDataSource'.
-
- NOTE: The following attributes are defined by the default data source
- implementation, and only take effect for that class or subclasses of
- that class.
-
- WARNING: The use of these attributes is deprecated. You should use
- nested <set-property> elements to configure *all* properties of
- your data source implementation.
-
- autoCommit The default auto-commit state for newly created
- connections.
-
- description The description of this data source.
-
- driverClass The Java class name of the JDBC driver to be used.
- [REQUIRED]
-
- loginTimeout The maximum number of seconds to wait for a connection
- to be created or returned. Default is driver dependent.
-
- maxCount The maximum number of connections to be created.
-
- minCount The minimum number of connections to be created.
-
- password The database password to use when connecting. [REQUIRED]
-
- readOnly The default read-only state for newly created
- connections.
-
- url The JDBC URL to use when connecting. [REQUIRED]
-
- user The database username to use when connecting. [REQUIRED]
-
--->
-<!ELEMENT data-source (set-property*)>
-<!ATTLIST data-source id ID #IMPLIED>
-<!ATTLIST data-source key %BeanName; #IMPLIED>
-<!ATTLIST data-source type %ClassName; #IMPLIED>
-<!-- All of the following attributes are deprecated. Use a nested -->
-<!-- set-property element to configure data source properties. -->
-<!ATTLIST data-source autoCommit %Boolean; #IMPLIED>
-<!ATTLIST data-source description CDATA #IMPLIED>
-<!ATTLIST data-source driverClass %ClassName; #IMPLIED>
-<!ATTLIST data-source loginTimeout %Integer; #IMPLIED>
-<!ATTLIST data-source maxCount %Integer; #IMPLIED>
-<!ATTLIST data-source minCount %Integer; #IMPLIED>
-<!ATTLIST data-source password CDATA #IMPLIED>
-<!ATTLIST data-source readOnly %Boolean; #IMPLIED>
-<!ATTLIST data-source url CDATA #IMPLIED>
-<!ATTLIST data-source user CDATA #IMPLIED>
-
-
-<!-- The "form-beans" element is the root of the set of form bean descriptors
- for this application. The following attributes are defined:
-
- type Fully qualified Java class name of the implementation
- class used for ActionFormBean objects. DEPRECATED.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "formBean" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT form-beans (form-bean*)>
-<!ATTLIST form-beans id ID #IMPLIED>
-<!ATTLIST form-beans type %ClassName; "org.apache.struts.action.ActionFormBean">
-
-
-<!-- The "form-bean" element describes a particular form bean, which is a
- JavaBean that implements the org.apache.struts.action.ActionForm
- class. The following attributes are defined:
-
- className Fully qualified Java class name of the ActionFormBean
- implementation class to use. Defaults to the value
- configured as the "formBean" initialization parameter
- to the Struts controller servlet.
-
- name Unique identifier of this bean, used to reference it
- in corresponding action mappings.
-
- type Fully qualified Java class name of the implementation
- class to be used or generated
--->
-<!ELEMENT form-bean (icon?, display-name?, description?, set-property*)>
-<!ATTLIST form-bean id ID #IMPLIED>
-<!ATTLIST form-bean className %ClassName; #IMPLIED>
-<!ATTLIST form-bean name %BeanName; #REQUIRED>
-<!ATTLIST form-bean type %ClassName; #REQUIRED>
-
-
-<!-- The "global-forwards" element configures the global mappings of logical
- names (used within the application) to mappable resources (identified
- by context-relative URI paths). A global "forward" with a particular name
- can be locally overridden by defining a "forward" of the same name within
- an "action" element. The following attribute are defined:
-
- type Fully qualified Java class name of the implementation
- class used for ActionForward objects. DEPRECATED.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "forward" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT global-forwards (forward*)>
-<!ATTLIST global-forwards id ID #IMPLIED>
-<!ATTLIST global-forwards type %ClassName; "org.apache.struts.action.ActionForward">
-
-
-<!-- The "forward" element describes a mapping of a logical name (used within
- the application) to a mappable resource identified by a context-relative
- URI path. The following attributes are defined:
-
- className Fully qualified Java class name of the ActionForward
- implementation class to use. Defaults to the value
- configured as the "forward" initialization parameter
- to the Struts controller servlet.
-
- name Unique identifier of this forward, used to reference it
- in application action classes.
-
- path The context-relative path of the mapped resource.
-
- redirect Set to "true" if sendRedirect() should be used to forward
- to this resource, or "false" in order to use
- RequestDispatcher.forward() instead.
--->
-<!ELEMENT forward (icon?, display-name?, description?, set-property*)>
-<!ATTLIST forward id ID #IMPLIED>
-<!ATTLIST forward className %ClassName; #IMPLIED>
-<!ATTLIST forward name CDATA #REQUIRED>
-<!ATTLIST forward path %RequestPath; #REQUIRED>
-<!ATTLIST forward redirect %Boolean; #IMPLIED>
-
-
-<!-- The "action-mappings" element configures the mappings from submitted
- request paths to the corresponding Action classes that should be
- used to process these requests. The following attributes are
- defined:
-
- type Fully qualified Java class name of the ActionMapping
- implementation class to be used. DEPRECATED.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "mapping" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT action-mappings (action*)>
-<!ATTLIST action-mappings id ID #IMPLIED>
-<!ATTLIST action-mappings type %ClassName; "org.apache.struts.action.ActionMapping">
-
-
-<!-- The "action" element describes a mapping from a request paths to the
- corresponding Action classes that should be used to process these
- requests. The following attributes are defined:
-
- attribute Name of the request-scope or session-scope attribute
- under which our form bean is accessed, if it is other
- than the bean's specified "name". Optional if
- "name" is specified, else not allowed.
-
- className Fully qualified Java class name of the ActionMapping
- implementation class to use. Defaults to the value
- configured as the "mapping" initialization parameter
- to the Struts controller servlet.
-
- forward Context-relative path of the servlet or JSP resource that
- will process this request, instead of instantiating and
- calling the Action class specified by "type". Exactly one
- of "forward", "include", or "type" must be specified.
-
- include Context-relative path of the servlet or JSP resource that
- will process this request, instead of instantiating and
- calling the Action class specified by "type". Exactly one
- of "forward", "include", or "type" must be specified.
-
- input Context-relative path of the input form to which control
- should be returned if a validation error is encountered.
- Required if "name" is specified and the input bean
- returns validation errors. Optional if "name" is
- specified and the input bean does not return validation
- errors. Not allowed if "name" is not specified.
-
- name Name of the form bean, if any, that is associated
- with this action.
-
- path The context-relative path of the submitted request,
- starting with a "/" character, and without the
- filename extension if extension mapping is used.
-
- parameter General purpose configuration parameter that can be used
- to pass extra information to the Action selected by this
- mapping.
-
- prefix Prefix used to match request parameter names to form bean
- property names, if any. Optional if "name" is specified,
- else not allowed.
-
- scope Identifier of the scope ("request" or "session") within
- which our form bean is accessed, if any. Optional if
- "name" is specified, else not allowed.
-
- suffix Suffix used to match request parameter names to form bean
- property names, if any. Optional if "name" is specified,
- else not allowed.
-
- type Fully qualified Java class name of the Action class
- (implements org.apache.struts.action.Action) to be
- used to process requests for this mapping if the "forward"
- or "include" attribute is not included. Exactly one
- of "forward", "include", or "type" must be specified.
-
- unknown Set to "true" if this action should be configured as the
- default for this application, to handle all requests
- not handled by another action. Only one action can be
- defined as a default within a single application.
-
- validate Set to "true" if the validate() method of the form bean
- should be called prior to calling this action, or set to
- "false" if you do not want validation performed.
--->
-<!ELEMENT action (icon?, display-name?, description?, set-property*, forward*)>
-<!ATTLIST action id ID #IMPLIED>
-<!ATTLIST action attribute %BeanName; #IMPLIED>
-<!ATTLIST action className %ClassName; #IMPLIED>
-<!ATTLIST action forward %RequestPath; #IMPLIED>
-<!ATTLIST action include %RequestPath; #IMPLIED>
-<!ATTLIST action input %RequestPath; #IMPLIED>
-<!ATTLIST action name %BeanName; #IMPLIED>
-<!ATTLIST action parameter CDATA #IMPLIED>
-<!ATTLIST action path %RequestPath; #REQUIRED>
-<!ATTLIST action prefix CDATA #IMPLIED>
-<!ATTLIST action scope %RequestScope; #IMPLIED>
-<!ATTLIST action suffix CDATA #IMPLIED>
-<!ATTLIST action type %ClassName; #IMPLIED>
-<!ATTLIST action unknown %Boolean; #IMPLIED>
-<!ATTLIST action validate %Boolean; #IMPLIED>
-
-
-<!-- The "set-property" element specifies the name and value of an additional
- JavaBeans configuration property whose setter method will be called
- on the object that represents our surrounding element. This is especially
- useful when an extended implementation class (with additional properties)
- is configured on the <global-forwards> or <action-mappings> elements.
- The following attributes are defined:
-
- property Name of the JavaBeans property whose setter method
- will be called.
-
- value String representation of the value to which this
- property will be set, after suitable type conversion
--->
-<!ELEMENT set-property EMPTY>
-<!ATTLIST set-property id ID #IMPLIED>
-<!ATTLIST set-property property %PropName; #REQUIRED>
-<!ATTLIST set-property value CDATA #REQUIRED>
-
-
-
-<!-- ========== Subordinate Elements ====================================== -->
-
-
-<!-- The "description" element contains descriptive (paragraph length) text
- about the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT description (#PCDATA)>
-<!ATTLIST description id ID #IMPLIED>
-
-
-
-<!-- The "display-name" element contains a short (one line) description of
- the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name id ID #IMPLIED>
-
-
-<!-- The "icon" element contains a small-icon and large-icon element which
- specify the location, relative to the Struts configuration file, for small
- and large images used to represent the surrounding element in GUI tools.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon id ID #IMPLIED>
-
-
-<!-- The "large-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a large (32x32 pixel)
- icon image.
--->
-<!ELEMENT large-icon (%Location;)>
-<!ATTLIST large-icon id ID #IMPLIED>
-
-
-<!-- The "small-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a small (16x16 pixel)
- icon image.
--->
-<!ELEMENT small-icon (%Location;)>
-<!ATTLIST small-icon id ID #IMPLIED>
-
Deleted: trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_1.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_1.dtd 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_1.dtd 2007-07-20 17:24:22 UTC (rev 2571)
@@ -1,695 +0,0 @@
-<!--
- DTD for the Struts Application Configuration File, Version 1.1
-
- To support validation of your configuration file, include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE struts-config PUBLIC
- "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
- "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
-
- $Id: struts-config_1_1.dtd,v 1.1.1.1 2004/10/06 17:32:27 sim Exp $
--->
-
-
-<!-- ========== Defined Types ============================================= -->
-
-
-<!-- An "AttributeName" is the identifier of a page, request, session, or
- application scope attribute.
--->
-<!ENTITY % AttributeName "CDATA">
-
-
-<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
- and also serves as the name of the corresponding scripting variable
- and the name of the JSP attribute under which the bean is accessed.
- Therefore, it must conform to the rules for a Java identifier.
--->
-<!ENTITY % BeanName "CDATA">
-
-
-<!-- A "Boolean" is the string representation of a boolean (true or false)
- variable.
--->
-<!ENTITY % Boolean "(true|false|yes|no)">
-
-
-<!-- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!-- An "Integer" is a character string consisting solely of numeric digits,
- optionally preceeded by a minus sign, that can be converted to a
- 32-bit integer.
--->
-<!ENTITY % Integer "CDATA">
-
-
-<!-- A "Location" is a relative path, delimited by "/" characters, that
- defines the location of a resource relative to the location of the
- Struts configuration file itself.
--->
-<!ENTITY % Location "#PCDATA">
-
-
-<!-- A "PropName" is the name of a JavaBeans property, and must begin with
- a lower case letter and contain only characters that are legal in a
- Java identifier.
--->
-<!ENTITY % PropName "CDATA">
-
-
-<!-- A "RequestPath" is an module-relative URI path, beginning with a
- slash, that identifies a mapped resource (such as a JSP page or a servlet)
- within this web application.
--->
-<!ENTITY % RequestPath "CDATA">
-
-
-<!-- The name of a JSP bean scope within which such a form bean may be
- accessed.
--->
-<!ENTITY % RequestScope "(request|session)">
-
-
-<!-- ========== Top Level Elements ======================================== -->
-
-
-<!-- The "struts-config" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT struts-config (data-sources?, form-beans?, global-exceptions?, global-forwards?, action-mappings?, controller?, message-resources*, plug-in*)>
-<!ATTLIST struts-config id ID #IMPLIED>
-
-
-<!-- The "data-sources" element describes a set of DataSource objects [JDBC 2.0
- Standard Extension]. The individual DataSource objects are configured through
- nested <data-source> elements.
--->
-<!ELEMENT data-sources (data-source*)>
-<!ATTLIST data-sources id ID #IMPLIED>
-
-
-<!-- The "data-source" element describes a DataSource object [JDBC 2.0 Standard
- Extension] that will be instantiated, configured, and made available as a
- servlet context attribute (or "application-scope bean"). Any object can be
- specified so long as it implements [javax.sql.DataSource] and can be
- configured entirely from JavaBean properties. The following attributes
- are required:
-
- className The configuration bean for this DataSource object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.DataSourceConfig"]
-
- key Servlet context attribute key under which this data source
- will be stored. Default is the value specified by string
- constant defined by Globals.DATA_SOURCE_KEY. The application
- module prefix (if any) is appended to the key
- (${key}$prefix}).
- [org.apache.struts.Globals.DATA_SOURCE_KEY]
-
- NOTE: The application module prefix includes the leading
- slash, so the default datasource for a module named "foo" is
- stored under "org.apache.struts.action.DATA_SOURCE/foo".
-
- type Fully qualified Java class name for this data source object.
- The class must implement DataSource [javax.sql.DataSource],
- and the object must be configurable entirely from JavaBean
- properties.
--->
-<!ELEMENT data-source (set-property*)>
-<!ATTLIST data-source id ID #IMPLIED>
-<!ATTLIST data-source className %ClassName; #IMPLIED>
-<!ATTLIST data-source key %AttributeName; #IMPLIED>
-<!ATTLIST data-source type %ClassName; #IMPLIED>
-
-
-<!-- The "form-beans" element describes the set of form bean descriptors for this
- module. The following attributes are defined:
-
- type Fully qualified Java class to use when instantiating
- ActionFormBean objects. If specified, the object must be a
- subclass of the default class type.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "formBean" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT form-beans (form-bean*)>
-<!ATTLIST form-beans id ID #IMPLIED>
-<!ATTLIST form-beans type %ClassName; #IMPLIED>
-
-
-<!-- The "form-bean" element describes an ActionForm subclass
- [org.apache.struts.action.ActionForm] that can be referenced by an "action"
- element.
-
-
-The "form-bean" element describes a particular form bean, which is a
- JavaBean that implements the org.apache.struts.action.ActionForm
- class. The following attributes are defined:
-
- className The configuration bean for this form bean object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.FormBeanConfig"]
-
- dynamic If the form bean type is a DynaActionForm subclass (that you
- created), then (and only then) set this attribute to "true".
- If the type is set to the default DynaActionForm or any
- conventional ActionForm subclass, then this attribute can be
- omitted.
- [true] if type is "org.apache.struts.action.DynaActionForm"
- [false] otherwise DEPRECATED - THIS IS NOW DETERMINED
- DYNAMICALLY BASED ON THE SPECIFIED IMPLEMENTATION CLASS.
-
- name The unique identifier for this form bean. Referenced by the
- <action> element to specify which form bean to use with its
- request.
-
- type Fully qualified Java class name of the ActionForm subclass
- to use with this form bean.
--->
-<!ELEMENT form-bean (icon?, display-name?, description?, set-property*, form-property*)>
-<!ATTLIST form-bean id ID #IMPLIED>
-<!ATTLIST form-bean className %ClassName; #IMPLIED>
-<!ATTLIST form-bean dynamic %Boolean; #IMPLIED>
-<!ATTLIST form-bean name %BeanName; #REQUIRED>
-<!ATTLIST form-bean type %ClassName; #REQUIRED>
-
-
-<!-- The "form-property" element describes a JavaBean property that can be used to
- configure an instance of a DynaActionForm or a subclass thereof. This element
- is only utilized when the "type" attribute of the enclosing "form-bean" element
- is [org.apache.struts.action.DynaActionForm] or a subclass of DynaActionForm. If
- a custom DynaActionForm subclass is used, then the "dynamic" attribute of the
- enclosing <form-bean> element must be set to "true". Since Struts 1.1.
-
- className The configuration bean for this form property object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.FormPropertyConfig"]
-
- initial String representation of the initial value for this property.
- If not specified, primitives will be initialized to zero and
- objects initialized to the zero-argument instantiation of that
- object class. For example, Strings will be initialized to ""
-
-
- name The name of the JavaBean property described by this element.
-
- size The number of array elements to create if the value of the
- "type" attribute specifies an array, but there is no value
- specified for the "initial" attribute.
-
- type Fully qualified Java class name of the field underlying this
- property, optionally followed by "[]" to indicate that the
- field is indexed.
--->
-<!ELEMENT form-property (set-property*)>
-<!ATTLIST form-property className %ClassName; #IMPLIED>
-<!ATTLIST form-property initial CDATA #IMPLIED>
-<!ATTLIST form-property name %PropName; #REQUIRED>
-<!ATTLIST form-property size %Integer; #IMPLIED>
-<!ATTLIST form-property type %ClassName; #REQUIRED>
-
-
-<!-- The "global-exceptions" element describes a set of exceptions that might be
- thrown by an Action object. The handling of individual exception types is
- configured through nested exception elements. An <action> element may
- override a global exception handler by registering a local exception handler
- for the same exception type. Since Struts 1.1.
--->
-<!ELEMENT global-exceptions (exception*)>
-<!ATTLIST global-exceptions id ID #IMPLIED>
-
-
-<!-- The "exception" element registers an ExceptionHandler for an exception type.
- The following attributes are defined:
-
- bundle Servlet context attribute for the message resources bundle
- associated with this handler. The default attribute is the
- value specified by the string constant declared at
- Globals.MESSAGES_KEY.
- [org.apache.struts.Globals.MESSAGES_KEY]
-
- className The configuration bean for this ExceptionHandler object.
- If specified, className must be a subclass of the default
- configuration bean
- ["org.apache.struts.config.ExceptionConfig"]
-
- handler Fully qualified Java class name for this exception handler.
- ["org.apache.struts.action.ExceptionHandler"]
-
- key The key to use with this handler's message resource bundle
- that will retrieve the error message template for this
- exception.
-
- path The module-relative URI to the resource that will complete
- the request/response if this exception occurs.
-
- scope The context ("request" or "session") that is used to access
- the ActionError object [org.apache.struts.action.ActionError]
- for this exception.
-
- type Fully qualified Java class name of the exception type to
- register with this handler.
--->
-<!ELEMENT exception (icon?, display-name?, description?, set-property*)>
-<!ATTLIST exception id ID #IMPLIED>
-<!ATTLIST exception bundle %AttributeName; #IMPLIED>
-<!ATTLIST exception className %ClassName; #IMPLIED>
-<!ATTLIST exception handler %ClassName; #IMPLIED>
-<!ATTLIST exception key CDATA #REQUIRED>
-<!ATTLIST exception path %RequestPath; #IMPLIED>
-<!ATTLIST exception scope CDATA #IMPLIED>
-<!ATTLIST exception type %ClassName; #REQUIRED>
-
-
-<!-- The "global-forwards" element describes a set of ActionForward objects
- [org.apache.struts.action.ActionForward] that are available to all Action
- objects as a return value. The individual ActionForwards are configured
- through nested <forward> elements. An <action> element may override a global
- forward by defining a local <forward> of the same name.
-
- type Fully qualified Java class to use when instantiating
- ActionForward objects. If specified, the object must be a
- subclass of the default class type.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "forward" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT global-forwards (forward*)>
-<!ATTLIST global-forwards id ID #IMPLIED>
-<!ATTLIST global-forwards type %ClassName; #IMPLIED>
-
-
-<!-- The "forward" element describes an ActionForward that is to be made
- available to an Action as a return value. An ActionForward is referenced by
- a logical name and encapsulates a URI. A "forward" element may be used to
- describe both global and local ActionForwards. Global forwards are available
- to all the Action objects in the module. Local forwards can be
- nested within an <action> element and only available to an Action object
- when it is invoked through that ActionMapping.
-
- className Fully qualified Java class name of ActionForward
- subclass to use for this object.
- ["org.apache.struts.action.ActionForward"]
-
- contextRelative Set this to "true" if, in a modular application, the path
- attribute starts with a slash "/" and should be considered
- relative to the entire web application rather than the module.
- Since Struts 1.1.
- [false]
-
- name The unique identifier for this forward. Referenced by the
- Action object at runtime to select - by its logical name -
- the resource that should complete the request/response.
-
- path The module-relative or context-relative path to the resources
- that is encapsulated by the logical name of this ActionForward.
- If the path is to be considered context-relative when used in
- a modular application, then the contextRelative attribute
- should be set to "true". This value should begin with a slash
- ("/") character.
-
- redirect Set to "true" if a redirect instruction should be issued to
- the user-agent so that a new request is issued for this
- forward's resource. If true, RequestDispatcher.Redirect is
- called. If "false", RequestDispatcher.forward is called instead.
- [false]
--->
-<!ELEMENT forward (icon?, display-name?, description?, set-property*)>
-<!ATTLIST forward id ID #IMPLIED>
-<!ATTLIST forward className %ClassName; #IMPLIED>
-<!ATTLIST forward contextRelative %Boolean; #IMPLIED>
-<!ATTLIST forward name CDATA #REQUIRED>
-<!ATTLIST forward path %RequestPath; #REQUIRED>
-<!ATTLIST forward redirect %Boolean; #IMPLIED>
-
-
-<!-- The "action-mappings" element describes a set of ActionMapping objects
- [org.apache.struts.action.ActionMapping] that are available to process
- requests matching the url-pattern our ActionServlet registered with the
- container. The individual ActionMappings are configured through nested
- <action> elements. The following attributes are defined:
-
- type Fully qualified Java class to use when instantiating
- ActionMapping objects. If specified, the object must be a
- subclass of the default class type.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "mapping" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT action-mappings (action*)>
-<!ATTLIST action-mappings id ID #IMPLIED>
-<!ATTLIST action-mappings type %ClassName; #IMPLIED>
-
-
-<!-- The "action" element describes an ActionMapping object that is to be used
- to process a request for a specific module-relative URI. The following
- attributes are defined:
-
- attribute Name of the request-scope or session-scope attribute that
- is used to access our ActionForm bean, if it is other than
- the bean's specified "name". Optional if "name" is specified,
- else not valid.
-
- className The fully qualified Java class name of the ActionMapping
- subclass to use for this action mapping object. Defaults to
- the type specified by the enclosing <action-mappings>
- element or to "org.apache.struts.action.ActionMapping" if
- not specified.
- ["org.apache.struts.action.ActionMapping"]
-
- forward Module-relative path of the servlet or other resource that
- will process this request, instead of the Action class
- specified by "type". The path WILL NOT be processed
- through the "forwardPattern" attribute that is configured
- on the "controller" element for this module.
- Exactly one of "forward", "include", or "type" must be
- specified.
-
- include Module-relative path of the servlet or other resource that
- will process this request, instead of the Action class
- specified by "type". The path WILL NOT be processed
- through the "forwardPattern" attribute that is configured
- on the "controller" element for this module.
- Exactly one of "forward", "include", or "type" must be
- specified.
-
- input Module-relative path of the action or other resource to
- which control should be returned if a validation error is
- encountered. Valid only when "name" is specified. Required
- if "name" is specified and the input bean returns
- validation errors. Optional if "name" is specified and the
- input bean does not return validation errors.
-
- name Name of the form bean, if any, that is associated with this
- action mapping.
-
- path The module-relative path of the submitted request, starting
- with a "/" character, and without the filename extension if
- extension mapping is used.
-
- NOTE: Do *not* include a period in your path name,
- because it will look like a filename extension and
- cause your Action to not be located.
-
- parameter General-purpose configuration parameter that can be used to
- pass extra information to the Action object selected by
- this action mapping.
-
- prefix Prefix used to match request parameter names to ActionForm
- property names, if any. Optional if "name" is specified,
- else not allowed.
-
- roles Comma-delimited list of security role names that are allowed
- access to this ActionMapping object. Since Struts 1.1.
-
- scope The context ("request" or "session") that is used to
- access our ActionForm bean, if any. Optional if "name" is
- specified, else not valid.
-
- suffix Suffix used to match request parameter names to ActionForm
- bean property names, if any. Optional if "name" is
- specified, else not valid.
-
- type Fully qualified Java class name of the Action subclass
- [org.apache.struts.action.Action] that will process requests
- for this action mapping. Not valid if either the "forward"
- or "include" attribute is specified. Exactly one of
- "forward", "include", or "type" must be specified.
-
- unknown Set to "true" if this object should be configured as the
- default action mapping for this module. If a request does not
- match another object, it will be passed to the ActionMapping
- object with unknown set to "true". Only one ActionMapping
- can be marked as "unknown" within a module.
- [false]
-
- validate Set to "true" if the validate method of the ActionForm bean
- should be called prior to calling the Action object for this
- action mapping, or set to "false" if you do not want the
- validate method called.
- [true]
--->
-<!ELEMENT action (icon?, display-name?, description?, set-property*, exception*, forward*)>
-<!ATTLIST action id ID #IMPLIED>
-<!ATTLIST action attribute %BeanName; #IMPLIED>
-<!ATTLIST action className %ClassName; #IMPLIED>
-<!ATTLIST action forward %RequestPath; #IMPLIED>
-<!ATTLIST action include %RequestPath; #IMPLIED>
-<!ATTLIST action input %RequestPath; #IMPLIED>
-<!ATTLIST action name %BeanName; #IMPLIED>
-<!ATTLIST action parameter CDATA #IMPLIED>
-<!ATTLIST action path %RequestPath; #REQUIRED>
-<!ATTLIST action prefix CDATA #IMPLIED>
-<!ATTLIST action roles CDATA #IMPLIED>
-<!ATTLIST action scope %RequestScope; #IMPLIED>
-<!ATTLIST action suffix CDATA #IMPLIED>
-<!ATTLIST action type %ClassName; #IMPLIED>
-<!ATTLIST action unknown %Boolean; #IMPLIED>
-<!ATTLIST action validate %Boolean; #IMPLIED>
-
-
-<!-- The "controller" element describes the ControllerConfig bean
- [org.apache.struts.config.ControllerConfig] that encapsulates
- a module's runtime configuration. The following
- attributes are defined:
-
- bufferSize The size of the input buffer used when processing
- file uploads.
- [4096]
-
- className Fully qualified Java class name of the
- ControllerConfig subclass for this controller object.
- If specified, the object must be a subclass of the
- default class.
- ["org.apache.struts.config.ControllerConfig"]
-
- contentType Default content type (and optional character encoding) to
- be set on each response. May be overridden by the Action,
- JSP, or other resource to which the request is forwarded.
- ["text/html"]
-
- debug Debugging detail level for this module. [0]
- DEPRECATED - configure the logging detail level
- in your underlying logging implementation.
-
- forwardPattern Replacement pattern defining how the "path" attribute of a
- <forward> element is mapped to a context-relative URL when
- it starts with a slash (and when the contextRelative
- property is false). This value may consist of any
- combination of the following:
- - "$M" - Replaced by the module prefix of this module
- - "$P" - Replaced by the "path" attribute of the selected
- "forward" element
- - "$$" - Causes a literal dollar sign to be rendered
- - "$x" - (Where "x" is any character not defined above)
- Silently swallowed, reserved for future use
- If not specified, the default forwardPattern is "$M$P",
- which is consistent with the previous behavior of
- forwards. Since Struts 1.1. ["$M$P"]
-
- inputForward Set to "true" if you want the "input" attribute of
- <action> elements to be the name of a local or global
- ActionForward, which will then be used to calculate the
- ultimate URL. Set to "false" (the default) to treat the
- "input" parameter of <action> elements as a
- module-relative path to the resource
- to be used as the input form. Since Struts 1.1.
- [false]
-
- locale Set to "true" if you want a Locale object stored in the
- user's session if not already present.
- [true]
-
- maxFileSize The maximum size (in bytes) of a file to be accepted as a
- file upload. Can be expressed as a number followed by a
- "K", "M", or "G", which are interpreted to mean kilobytes,
- megabytes, or gigabytes, respectively.
- ["250M"]
-
- memFileSize The maximum size (in bytes) of a file whose contents will
- be retained in memory after uploading. Files larger than
- this threshold will be written to some alternative storage
- medium, typically a hard disk. Can be expressed as a number
- followed by a "K", "M", or "G", which are interpreted to
- mean kilobytes, megabytes, or gigabytes, respectively.
- ["256K"]
-
- multipartClass The fully qualified Java class name of the multipart
- request handler class to be used with this module.
- ["org.apache.struts.upload.CommonsMultipartRequestHandler"]
-
- nocache Set to "true" if you want the controller to add HTTP
- headers for defeating caching to every response from
- this module. [false]
-
- pagePattern Replacement pattern defining how the "page" attribute of
- custom tags using it is mapped to a context-relative URL
- of the corresponding resource. This value may consist of
- any combination of the following:
- - "$M" - Replaced by the module prefix of this module
- - "$P" - Replaced by the value of the "page" attribute
- - "$$" - Causes a literal dollar sign to be rendered
- - "$x" - (Where "x" is any character not defined above)
- Silently swallowed, reserved for future use
- If not specified, the default forwardPattern is
- "$M$P", which is consistent with previous hard coded
- behavior of URL evaluation for "page" attributes.
- ["$M$P"]
-
- processorClass The fully qualified Java class name of the
- RequestProcessor subclass to be used with this module.
- ["org.apache.struts.action.RequestProcessor"]
-
- tempDir Temporary working directory to use when processing
- file uploads.
- [{Directory provided by servlet container}]
--->
-<!ELEMENT controller (set-property*)>
-<!ATTLIST controller id ID #IMPLIED>
-<!ATTLIST controller bufferSize %Integer; #IMPLIED>
-<!ATTLIST controller className %ClassName; #IMPLIED>
-<!ATTLIST controller contentType CDATA #IMPLIED>
-<!ATTLIST controller debug %Integer; #IMPLIED>
-<!ATTLIST controller forwardPattern CDATA #IMPLIED>
-<!ATTLIST controller inputForward %Boolean; #IMPLIED>
-<!ATTLIST controller locale %Boolean; #IMPLIED>
-<!ATTLIST controller maxFileSize CDATA #IMPLIED>
-<!ATTLIST controller memFileSize CDATA #IMPLIED>
-<!ATTLIST controller multipartClass %ClassName; #IMPLIED>
-<!ATTLIST controller nocache %Boolean; #IMPLIED>
-<!ATTLIST controller pagePattern CDATA #IMPLIED>
-<!ATTLIST controller processorClass %ClassName; #IMPLIED>
-<!ATTLIST controller tempDir CDATA #IMPLIED>
-
-
-<!-- The "message-resources" element describes a MessageResources object with
- message templates for this module. The following attributes are defined:
-
- className The configuration bean for this message resources object.
- If specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.MessageResourcesConfig"]
-
- factory Fully qualified Java class name of the
- MessageResourcesFactory subclass to use for this message
- resources object.
- ["org.apache.struts.util.PropertyMessageResourcesFactory"]
-
- key Servlet context attribute under which this message
- resources bundle will be stored. The default attribute is
- the value specified by the string constant at
- [Globals.MESSAGES_KEY]. The module prefix (if
- any) is appended to the key (${key}${prefix}).
- [org.apache.struts.Globals.MESSAGES_KEY]
-
- NOTE: The module prefix includes the leading
- slash, so the default message resource bundle for a module
- named "foo" is stored under
- "org.apache.struts.action.MESSAGE/foo".
-
- null Set to "true" if you want our message resources to return a
- null string for unknown message keys, or "false" to return a
- message with the bad key value.
-
- parameter Configuration parameter to be passed to the createResources
- method of our factory object.
--->
-<!ELEMENT message-resources (set-property*)>
-<!ATTLIST message-resources id ID #IMPLIED>
-<!ATTLIST message-resources className %ClassName; #IMPLIED>
-<!ATTLIST message-resources factory %ClassName; #IMPLIED>
-<!ATTLIST message-resources key %AttributeName; #IMPLIED>
-<!ATTLIST message-resources null %Boolean; #IMPLIED>
-<!ATTLIST message-resources parameter CDATA #REQUIRED>
-
-
-<!-- The "plug-in" element specifies the fully qualified class name of a
- general-purpose application plug-in module that receives notification of
- application startup and shutdown events. An instance of the specified class
- is created for each element, and can be configured with nested <set-property>
- elements. The following attributes are supported:
-
- className Fully qualified Java class name of the plug-in class; must
- implement [org.apache.struts.action.PlugIn].
--->
-<!ELEMENT plug-in (set-property*)>
-<!ATTLIST plug-in id ID #IMPLIED>
-<!ATTLIST plug-in className %ClassName; #REQUIRED>
-
-
-<!-- ========== Subordinate Elements ====================================== -->
-
-
-<!-- The "description" element contains descriptive (paragraph length) text
- about the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT description (#PCDATA)>
-<!ATTLIST description id ID #IMPLIED>
-
-
-<!-- The "display-name" element contains a short (one line) description of
- the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name id ID #IMPLIED>
-
-
-<!-- The "icon" element contains a small-icon and large-icon element which
- specify the location, relative to the Struts configuration file, for small
- and large images used to represent the surrounding element in GUI tools.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon id ID #IMPLIED>
-
-
-<!-- The "large-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a large (32x32 pixel)
- icon image.
--->
-<!ELEMENT large-icon (%Location;)>
-<!ATTLIST large-icon id ID #IMPLIED>
-
-
-<!-- The "set-property" element specifies the method name and initial value of
- an additional JavaBean configuration property. When the object representing
- the surrounding element is instantiated, the accessor for the indicated
- property is called and passed the indicated value. The "set-property"
- element is especially useful when a custom subclass is used with
- <data-source>, <forward>, <action>, or <plug-in> elements. The subclass
- can be passed whatever other properties may be required to configure the
- object without changing how the struts-config is parsed.
-
- property Name of the JavaBeans property whose setter method
- will be called.
-
- value String representation of the value to which this
- property will be set, after suitable type conversion
--->
-<!ELEMENT set-property EMPTY>
-<!ATTLIST set-property id ID #IMPLIED>
-<!ATTLIST set-property property %PropName; #REQUIRED>
-<!ATTLIST set-property value CDATA #REQUIRED>
-
-
-<!-- The "small-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a small (16x16 pixel)
- icon image.
--->
-<!ELEMENT small-icon (%Location;)>
-<!ATTLIST small-icon id ID #IMPLIED>
-
Deleted: trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_2.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_2.dtd 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/dtds/struts-config_1_2.dtd 2007-07-20 17:24:22 UTC (rev 2571)
@@ -1,686 +0,0 @@
-<!--
- DTD for the Struts Application Configuration File
-
- To support validation of your configuration file, include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE struts-config PUBLIC
- "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
- "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
-
- $Id: struts-config_1_2.dtd,v 1.1.1.1 2004/10/06 17:32:27 sim Exp $
--->
-
-
-<!-- ========== Defined Types ============================================= -->
-
-
-<!-- An "AttributeName" is the identifier of a page, request, session, or
- application scope attribute.
--->
-<!ENTITY % AttributeName "CDATA">
-
-
-<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
- and also serves as the name of the corresponding scripting variable
- and the name of the JSP attribute under which the bean is accessed.
- Therefore, it must conform to the rules for a Java identifier.
--->
-<!ENTITY % BeanName "CDATA">
-
-
-<!-- A "Boolean" is the string representation of a boolean (true or false)
- variable.
--->
-<!ENTITY % Boolean "(true|false|yes|no)">
-
-
-<!-- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!-- An "Integer" is a character string consisting solely of numeric digits,
- optionally preceeded by a minus sign, that can be converted to a
- 32-bit integer.
--->
-<!ENTITY % Integer "CDATA">
-
-
-<!-- A "Location" is a relative path, delimited by "/" characters, that
- defines the location of a resource relative to the location of the
- Struts configuration file itself.
--->
-<!ENTITY % Location "#PCDATA">
-
-
-<!-- A "PropName" is the name of a JavaBeans property, and must begin with
- a lower case letter and contain only characters that are legal in a
- Java identifier.
--->
-<!ENTITY % PropName "CDATA">
-
-
-<!-- A "RequestPath" is an module-relative URI path, beginning with a
- slash, that identifies a mapped resource (such as a JSP page or a servlet)
- within this web application.
--->
-<!ENTITY % RequestPath "CDATA">
-
-
-<!-- The name of a JSP bean scope within which such a form bean may be
- accessed.
--->
-<!ENTITY % RequestScope "(request|session)">
-
-
-<!-- ========== Top Level Elements ======================================== -->
-
-
-<!-- The "struts-config" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT struts-config (display-name?, description?, data-sources?, form-beans?, global-exceptions?, global-forwards?, action-mappings?, controller?, message-resources*, plug-in*)>
-<!ATTLIST struts-config id ID #IMPLIED>
-
-
-<!-- The "data-sources" element describes a set of DataSource objects [JDBC 2.0
- Standard Extension]. The individual DataSource objects are configured through
- nested <data-source> elements.
--->
-<!ELEMENT data-sources (data-source*)>
-<!ATTLIST data-sources id ID #IMPLIED>
-
-
-<!-- The "data-source" element describes a DataSource object [JDBC 2.0 Standard
- Extension] that will be instantiated, configured, and made available as a
- servlet context attribute (or "application-scope bean"). Any object can be
- specified so long as it implements [javax.sql.DataSource] and can be
- configured entirely from JavaBean properties. The following attributes
- are required:
-
- className The configuration bean for this DataSource object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.DataSourceConfig"]
-
- key Servlet context attribute key under which this data source
- will be stored. Default is the value specified by string
- constant defined by Globals.DATA_SOURCE_KEY. The application
- module prefix (if any) is appended to the key
- (${key}$prefix}).
- [org.apache.struts.Globals.DATA_SOURCE_KEY]
-
- NOTE: The application module prefix includes the leading
- slash, so the default datasource for a module named "foo" is
- stored under "org.apache.struts.action.DATA_SOURCE/foo".
-
- type Fully qualified Java class name for this data source object.
- The class must implement DataSource [javax.sql.DataSource],
- and the object must be configurable entirely from JavaBean
- properties.
--->
-<!ELEMENT data-source (set-property*)>
-<!ATTLIST data-source id ID #IMPLIED>
-<!ATTLIST data-source className %ClassName; #IMPLIED>
-<!ATTLIST data-source key %AttributeName; #IMPLIED>
-<!ATTLIST data-source type %ClassName; #REQUIRED>
-
-
-<!-- The "form-beans" element describes the set of form bean descriptors for this
- module. The following attributes are defined:
-
- type Fully qualified Java class to use when instantiating
- ActionFormBean objects. If specified, the object must be a
- subclass of the default class type.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "formBean" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT form-beans (form-bean*)>
-<!ATTLIST form-beans id ID #IMPLIED>
-<!ATTLIST form-beans type %ClassName; #IMPLIED>
-
-
-<!-- The "form-bean" element describes an ActionForm subclass
- [org.apache.struts.action.ActionForm] that can be referenced by an "action"
- element.
-
-
-The "form-bean" element describes a particular form bean, which is a
- JavaBean that implements the org.apache.struts.action.ActionForm
- class. The following attributes are defined:
-
- className The configuration bean for this form bean object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.FormBeanConfig"]
-
- name The unique identifier for this form bean. Referenced by the
- <action> element to specify which form bean to use with its
- request.
-
- type Fully qualified Java class name of the ActionForm subclass
- to use with this form bean.
--->
-<!ELEMENT form-bean (icon?, display-name?, description?, set-property*, form-property*)>
-<!ATTLIST form-bean id ID #IMPLIED>
-<!ATTLIST form-bean className %ClassName; #IMPLIED>
-<!ATTLIST form-bean dynamic %Boolean; #IMPLIED>
-<!ATTLIST form-bean name %BeanName; #REQUIRED>
-<!ATTLIST form-bean type %ClassName; #REQUIRED>
-
-
-<!-- The "form-property" element describes a JavaBean property that can be used to
- configure an instance of a DynaActionForm or a subclass thereof. This element
- is only utilized when the "type" attribute of the enclosing "form-bean" element
- is [org.apache.struts.action.DynaActionForm] or a subclass of DynaActionForm. If
- a custom DynaActionForm subclass is used, then the "dynamic" attribute of the
- enclosing <form-bean> element must be set to "true". Since Struts 1.1.
-
- className The configuration bean for this form property object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.FormPropertyConfig"]
-
- initial String representation of the initial value for this property.
- If not specified, primitives will be initialized to zero and
- objects initialized to the zero-argument instantiation of that
- object class. For example, Strings will be initialized to ""
-
-
- name The name of the JavaBean property described by this element.
-
- size The number of array elements to create if the value of the
- "type" attribute specifies an array, but there is no value
- specified for the "initial" attribute.
-
- type Fully qualified Java class name of the field underlying this
- property, optionally followed by "[]" to indicate that the
- field is indexed.
--->
-<!ELEMENT form-property (set-property*)>
-<!ATTLIST form-property className %ClassName; #IMPLIED>
-<!ATTLIST form-property initial CDATA #IMPLIED>
-<!ATTLIST form-property name %PropName; #REQUIRED>
-<!ATTLIST form-property size %Integer; #IMPLIED>
-<!ATTLIST form-property type %ClassName; #REQUIRED>
-
-
-<!-- The "global-exceptions" element describes a set of exceptions that might be
- thrown by an Action object. The handling of individual exception types is
- configured through nested exception elements. An <action> element may
- override a global exception handler by registering a local exception handler
- for the same exception type. Since Struts 1.1.
--->
-<!ELEMENT global-exceptions (exception*)>
-<!ATTLIST global-exceptions id ID #IMPLIED>
-
-
-<!-- The "exception" element registers an ExceptionHandler for an exception type.
- The following attributes are defined:
-
- bundle Servlet context attribute for the message resources bundle
- associated with this handler. The default attribute is the
- value specified by the string constant declared at
- Globals.MESSAGES_KEY.
- [org.apache.struts.Globals.MESSAGES_KEY]
-
- className The configuration bean for this ExceptionHandler object.
- If specified, className must be a subclass of the default
- configuration bean
- ["org.apache.struts.config.ExceptionConfig"]
-
- handler Fully qualified Java class name for this exception handler.
- ["org.apache.struts.action.ExceptionHandler"]
-
- key The key to use with this handler's message resource bundle
- that will retrieve the error message template for this
- exception.
-
- path The module-relative URI to the resource that will complete
- the request/response if this exception occurs.
-
- scope The context ("request" or "session") that is used to access
- the ActionError object [org.apache.struts.action.ActionError]
- for this exception.
-
- type Fully qualified Java class name of the exception type to
- register with this handler.
--->
-<!ELEMENT exception (icon?, display-name?, description?, set-property*)>
-<!ATTLIST exception id ID #IMPLIED>
-<!ATTLIST exception bundle %AttributeName; #IMPLIED>
-<!ATTLIST exception className %ClassName; #IMPLIED>
-<!ATTLIST exception handler %ClassName; #IMPLIED>
-<!ATTLIST exception key CDATA #REQUIRED>
-<!ATTLIST exception path %RequestPath; #IMPLIED>
-<!ATTLIST exception scope CDATA #IMPLIED>
-<!ATTLIST exception type %ClassName; #REQUIRED>
-
-
-<!-- The "global-forwards" element describes a set of ActionForward objects
- [org.apache.struts.action.ActionForward] that are available to all Action
- objects as a return value. The individual ActionForwards are configured
- through nested <forward> elements. An <action> element may override a global
- forward by defining a local <forward> of the same name.
-
- type Fully qualified Java class to use when instantiating
- ActionForward objects. If specified, the object must be a
- subclass of the default class type.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "forward" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT global-forwards (forward*)>
-<!ATTLIST global-forwards id ID #IMPLIED>
-<!ATTLIST global-forwards type %ClassName; #IMPLIED>
-
-
-<!-- The "forward" element describes an ActionForward that is to be made
- available to an Action as a return value. An ActionForward is referenced by
- a logical name and encapsulates a URI. A "forward" element may be used to
- describe both global and local ActionForwards. Global forwards are available
- to all the Action objects in the module. Local forwards can be
- nested within an <action> element and only available to an Action object
- when it is invoked through that ActionMapping.
-
- className Fully qualified Java class name of ActionForward
- subclass to use for this object.
- ["org.apache.struts.action.ActionForward"]
-
- contextRelative Set this to "true" if, in a modular application, the path
- attribute starts with a slash "/" and should be considered
- relative to the entire web application rather than the module.
- Since Struts 1.1.
- DEPRECATED.
- [false]
-
- module The module prefix to use with this path. This value should
- begin with a slash ("/").
-
- name The unique identifier for this forward. Referenced by the
- Action object at runtime to select - by its logical name -
- the resource that should complete the request/response.
-
- path The module-relative or context-relative path to the resources
- that is encapsulated by the logical name of this ActionForward.
- If the path is to be considered context-relative when used in
- a modular application, then the contextRelative attribute
- should be set to "true". This value should begin with a slash
- ("/") character.
-
- redirect Set to "true" if a redirect instruction should be issued to
- the user-agent so that a new request is issued for this
- forward's resource. If true, RequestDispatcher.Redirect is
- called. If "false", RequestDispatcher.forward is called instead.
- [false]
--->
-<!ELEMENT forward (icon?, display-name?, description?, set-property*)>
-<!ATTLIST forward id ID #IMPLIED>
-<!ATTLIST forward className %ClassName; #IMPLIED>
-<!ATTLIST forward contextRelative %Boolean; #IMPLIED>
-<!ATTLIST forward module %RequestPath; #IMPLIED>
-<!ATTLIST forward name CDATA #REQUIRED>
-<!ATTLIST forward path %RequestPath; #REQUIRED>
-<!ATTLIST forward redirect %Boolean; #IMPLIED>
-
-
-<!-- The "action-mappings" element describes a set of ActionMapping objects
- [org.apache.struts.action.ActionMapping] that are available to process
- requests matching the url-pattern our ActionServlet registered with the
- container. The individual ActionMappings are configured through nested
- <action> elements. The following attributes are defined:
-
- type Fully qualified Java class to use when instantiating
- ActionMapping objects. If specified, the object must be a
- subclass of the default class type.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "mapping" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT action-mappings (action*)>
-<!ATTLIST action-mappings id ID #IMPLIED>
-<!ATTLIST action-mappings type %ClassName; #IMPLIED>
-
-
-<!-- The "action" element describes an ActionMapping object that is to be used
- to process a request for a specific module-relative URI. The following
- attributes are defined:
-
- attribute Name of the request-scope or session-scope attribute that
- is used to access our ActionForm bean, if it is other than
- the bean's specified "name". Optional if "name" is specified,
- else not valid.
-
- className The fully qualified Java class name of the ActionMapping
- subclass to use for this action mapping object. Defaults to
- the type specified by the enclosing <action-mappings>
- element or to "org.apache.struts.action.ActionMapping" if
- not specified.
- ["org.apache.struts.action.ActionMapping"]
-
- forward Module-relative path of the servlet or other resource that
- will process this request, instead of the Action class
- specified by "type". The path WILL NOT be processed
- through the "forwardPattern" attribute that is configured
- on the "controller" element for this module.
- Exactly one of "forward", "include", or "type" must be
- specified.
-
- include Module-relative path of the servlet or other resource that
- will process this request, instead of the Action class
- specified by "type". The path WILL NOT be processed
- through the "forwardPattern" attribute that is configured
- on the "controller" element for this module.
- Exactly one of "forward", "include", or "type" must be
- specified.
-
- input Module-relative path of the action or other resource to
- which control should be returned if a validation error is
- encountered. Valid only when "name" is specified. Required
- if "name" is specified and the input bean returns
- validation errors. Optional if "name" is specified and the
- input bean does not return validation errors.
-
- name Name of the form bean, if any, that is associated with this
- action mapping.
-
- path The module-relative path of the submitted request, starting
- with a "/" character, and without the filename extension if
- extension mapping is used.
-
- NOTE: Do *not* include a period in your path name,
- because it will look like a filename extension and
- cause your Action to not be located.
-
- parameter General-purpose configuration parameter that can be used to
- pass extra information to the Action object selected by
- this action mapping.
-
- prefix Prefix used to match request parameter names to ActionForm
- property names, if any. Optional if "name" is specified,
- else not allowed.
-
- roles Comma-delimited list of security role names that are allowed
- access to this ActionMapping object. Since Struts 1.1.
-
- scope The context ("request" or "session") that is used to
- access our ActionForm bean, if any. Optional if "name" is
- specified, else not valid.
-
- suffix Suffix used to match request parameter names to ActionForm
- bean property names, if any. Optional if "name" is
- specified, else not valid.
-
- type Fully qualified Java class name of the Action subclass
- [org.apache.struts.action.Action] that will process requests
- for this action mapping. Not valid if either the "forward"
- or "include" attribute is specified. Exactly one of
- "forward", "include", or "type" must be specified.
-
- unknown Set to "true" if this object should be configured as the
- default action mapping for this module. If a request does not
- match another object, it will be passed to the ActionMapping
- object with unknown set to "true". Only one ActionMapping
- can be marked as "unknown" within a module.
- [false]
-
- validate Set to "true" if the validate method of the ActionForm bean
- should be called prior to calling the Action object for this
- action mapping, or set to "false" if you do not want the
- validate method called.
- [true]
--->
-<!ELEMENT action (icon?, display-name?, description?, set-property*, exception*, forward*)>
-<!ATTLIST action id ID #IMPLIED>
-<!ATTLIST action attribute %BeanName; #IMPLIED>
-<!ATTLIST action className %ClassName; #IMPLIED>
-<!ATTLIST action forward %RequestPath; #IMPLIED>
-<!ATTLIST action include %RequestPath; #IMPLIED>
-<!ATTLIST action input %RequestPath; #IMPLIED>
-<!ATTLIST action name %BeanName; #IMPLIED>
-<!ATTLIST action parameter CDATA #IMPLIED>
-<!ATTLIST action path %RequestPath; #REQUIRED>
-<!ATTLIST action prefix CDATA #IMPLIED>
-<!ATTLIST action roles CDATA #IMPLIED>
-<!ATTLIST action scope %RequestScope; #IMPLIED>
-<!ATTLIST action suffix CDATA #IMPLIED>
-<!ATTLIST action type %ClassName; #IMPLIED>
-<!ATTLIST action unknown %Boolean; #IMPLIED>
-<!ATTLIST action validate %Boolean; #IMPLIED>
-
-
-<!-- The "controller" element describes the ControllerConfig bean
- [org.apache.struts.config.ControllerConfig] that encapsulates
- a module's runtime configuration. The following
- attributes are defined:
-
- bufferSize The size of the input buffer used when processing
- file uploads.
- [4096]
-
- className Fully qualified Java class name of the
- ControllerConfig subclass for this controller object.
- If specified, the object must be a subclass of the
- default class.
- ["org.apache.struts.config.ControllerConfig"]
-
- contentType Default content type (and optional character encoding) to
- be set on each response. May be overridden by the Action,
- JSP, or other resource to which the request is forwarded.
- ["text/html"]
-
- forwardPattern Replacement pattern defining how the "path" attribute of a
- <forward> element is mapped to a context-relative URL when
- it starts with a slash (and when the contextRelative
- property is false). This value may consist of any
- combination of the following:
- - "$M" - Replaced by the module prefix of this module
- - "$P" - Replaced by the "path" attribute of the selected
- "forward" element
- - "$$" - Causes a literal dollar sign to be rendered
- - "$x" - (Where "x" is any character not defined above)
- Silently swallowed, reserved for future use
- If not specified, the default forwardPattern is "$M$P",
- which is consistent with the previous behavior of
- forwards. Since Struts 1.1. ["$M$P"]
-
- inputForward Set to "true" if you want the "input" attribute of
- <action> elements to be the name of a local or global
- ActionForward, which will then be used to calculate the
- ultimate URL. Set to "false" (the default) to treat the
- "input" parameter of <action> elements as a
- module-relative path to the resource
- to be used as the input form. Since Struts 1.1.
- [false]
-
- locale Set to "true" if you want a Locale object stored in the
- user's session if not already present.
- [true]
-
- maxFileSize The maximum size (in bytes) of a file to be accepted as a
- file upload. Can be expressed as a number followed by a
- "K", "M", or "G", which are interpreted to mean kilobytes,
- megabytes, or gigabytes, respectively.
- ["250M"]
-
- memFileSize The maximum size (in bytes) of a file whose contents will
- be retained in memory after uploading. Files larger than
- this threshold will be written to some alternative storage
- medium, typically a hard disk. Can be expressed as a number
- followed by a "K", "M", or "G", which are interpreted to
- mean kilobytes, megabytes, or gigabytes, respectively.
- ["256K"]
-
- multipartClass The fully qualified Java class name of the multipart
- request handler class to be used with this module.
- ["org.apache.struts.upload.CommonsMultipartRequestHandler"]
-
- nocache Set to "true" if you want the controller to add HTTP
- headers for defeating caching to every response from
- this module. [false]
-
- pagePattern Replacement pattern defining how the "page" attribute of
- custom tags using it is mapped to a context-relative URL
- of the corresponding resource. This value may consist of
- any combination of the following:
- - "$M" - Replaced by the module prefix of this module
- - "$P" - Replaced by the value of the "page" attribute
- - "$$" - Causes a literal dollar sign to be rendered
- - "$x" - (Where "x" is any character not defined above)
- Silently swallowed, reserved for future use
- If not specified, the default forwardPattern is
- "$M$P", which is consistent with previous hard coded
- behavior of URL evaluation for "page" attributes.
- ["$M$P"]
-
- processorClass The fully qualified Java class name of the
- RequestProcessor subclass to be used with this module.
- ["org.apache.struts.action.RequestProcessor"]
-
- tempDir Temporary working directory to use when processing
- file uploads.
- [{Directory provided by servlet container}]
--->
-<!ELEMENT controller (set-property*)>
-<!ATTLIST controller id ID #IMPLIED>
-<!ATTLIST controller bufferSize %Integer; #IMPLIED>
-<!ATTLIST controller className %ClassName; #IMPLIED>
-<!ATTLIST controller contentType CDATA #IMPLIED>
-<!ATTLIST controller forwardPattern CDATA #IMPLIED>
-<!ATTLIST controller inputForward %Boolean; #IMPLIED>
-<!ATTLIST controller locale %Boolean; #IMPLIED>
-<!ATTLIST controller maxFileSize CDATA #IMPLIED>
-<!ATTLIST controller memFileSize CDATA #IMPLIED>
-<!ATTLIST controller multipartClass %ClassName; #IMPLIED>
-<!ATTLIST controller nocache %Boolean; #IMPLIED>
-<!ATTLIST controller pagePattern CDATA #IMPLIED>
-<!ATTLIST controller processorClass %ClassName; #IMPLIED>
-<!ATTLIST controller tempDir CDATA #IMPLIED>
-
-
-<!-- The "message-resources" element describes a MessageResources object with
- message templates for this module. The following attributes are defined:
-
- className The configuration bean for this message resources object.
- If specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.MessageResourcesConfig"]
-
- factory Fully qualified Java class name of the
- MessageResourcesFactory subclass to use for this message
- resources object.
- ["org.apache.struts.util.PropertyMessageResourcesFactory"]
-
- key Servlet context attribute under which this message
- resources bundle will be stored. The default attribute is
- the value specified by the string constant at
- [Globals.MESSAGES_KEY]. The module prefix (if
- any) is appended to the key (${key}${prefix}).
- [org.apache.struts.Globals.MESSAGES_KEY]
-
- NOTE: The module prefix includes the leading
- slash, so the default message resource bundle for a module
- named "foo" is stored under
- "org.apache.struts.action.MESSAGE/foo".
-
- null Set to "true" if you want our message resources to return a
- null string for unknown message keys, or "false" to return a
- message with the bad key value.
-
- parameter Configuration parameter to be passed to the createResources
- method of our factory object.
--->
-<!ELEMENT message-resources (set-property*)>
-<!ATTLIST message-resources id ID #IMPLIED>
-<!ATTLIST message-resources className %ClassName; #IMPLIED>
-<!ATTLIST message-resources factory %ClassName; #IMPLIED>
-<!ATTLIST message-resources key %AttributeName; #IMPLIED>
-<!ATTLIST message-resources null %Boolean; #IMPLIED>
-<!ATTLIST message-resources parameter CDATA #REQUIRED>
-
-
-<!-- The "plug-in" element specifies the fully qualified class name of a
- general-purpose application plug-in module that receives notification of
- application startup and shutdown events. An instance of the specified class
- is created for each element, and can be configured with nested <set-property>
- elements. The following attributes are supported:
-
- className Fully qualified Java class name of the plug-in class; must
- implement [org.apache.struts.action.PlugIn].
--->
-<!ELEMENT plug-in (set-property*)>
-<!ATTLIST plug-in id ID #IMPLIED>
-<!ATTLIST plug-in className %ClassName; #REQUIRED>
-
-
-<!-- ========== Subordinate Elements ====================================== -->
-
-
-<!-- The "description" element contains descriptive (paragraph length) text
- about the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT description (#PCDATA)>
-<!ATTLIST description id ID #IMPLIED>
-
-
-<!-- The "display-name" element contains a short (one line) description of
- the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name id ID #IMPLIED>
-
-
-<!-- The "icon" element contains a small-icon and large-icon element which
- specify the location, relative to the Struts configuration file, for small
- and large images used to represent the surrounding element in GUI tools.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon id ID #IMPLIED>
-
-
-<!-- The "large-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a large (32x32 pixel)
- icon image.
--->
-<!ELEMENT large-icon (%Location;)>
-<!ATTLIST large-icon id ID #IMPLIED>
-
-
-<!-- The "set-property" element specifies the method name and initial value of
- an additional JavaBean configuration property. When the object representing
- the surrounding element is instantiated, the accessor for the indicated
- property is called and passed the indicated value. The "set-property"
- element is especially useful when a custom subclass is used with
- <data-source>, <forward>, <action>, or <plug-in> elements. The subclass
- can be passed whatever other properties may be required to configure the
- object without changing how the struts-config is parsed.
-
- property Name of the JavaBeans property whose setter method
- will be called.
-
- value String representation of the value to which this
- property will be set, after suitable type conversion
--->
-<!ELEMENT set-property EMPTY>
-<!ATTLIST set-property id ID #IMPLIED>
-<!ATTLIST set-property property %PropName; #REQUIRED>
-<!ATTLIST set-property value CDATA #REQUIRED>
-
-
-<!-- The "small-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a small (16x16 pixel)
- icon image.
--->
-<!ELEMENT small-icon (%Location;)>
-<!ATTLIST small-icon id ID #IMPLIED>
-
Deleted: trunk/struts/plugins/org.jboss.tools.struts/dtds/tiles-config_1_1.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/dtds/tiles-config_1_1.dtd 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/dtds/tiles-config_1_1.dtd 2007-07-20 17:24:22 UTC (rev 2571)
@@ -1,281 +0,0 @@
-<!--
- DTD for the Tile Definition File, Version 1.1
-
- To support validation of your configuration file, include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE tiles-definitions PUBLIC
- "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
- "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
-
- $Id: tiles-config_1_1.dtd,v 1.1.1.1 2004/10/06 17:32:27 sim Exp $
--->
-
-
-<!-- ========== Defined Types ============================================= -->
-
-
-<!-- A "Boolean" is the string representation of a boolean (true or false)
- variable.
--->
-<!ENTITY % Boolean "(true|false)">
-
-
-<!-- A "ContentType" is the content type of an attribute passed to a tile
- component.
--->
-<!ENTITY % ContentType "(string|page|template|definition)">
-
-<!-- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-<!-- A "RequestPath" is an module-relative URI path, beginning with a
- slash, that identifies a mapped resource (such as a JSP page or a servlet)
- within this web application.
--->
-<!ENTITY % RequestPath "CDATA">
-
-<!-- A "DefinitionName" is the unique identifier of a definition. This identifier
- is a logical name used to reference the definition.
--->
-<!ENTITY % DefinitionName "CDATA">
-
-<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
- and also serves as the name of the corresponding scripting variable
- and the name of the JSP attribute under which the bean is accessed.
- Therefore, it must conform to the rules for a Java identifier.
--->
-<!ENTITY % BeanName "CDATA">
-
-<!-- A "PropName" is the name of a JavaBeans property, and must begin with
- a lower case letter and contain only characters that are legal in a
- Java identifier.
--->
-<!ENTITY % PropName "CDATA">
-
-<!-- A "Location" is a relative path, delimited by "/" characters, that
- defines the location of a resource relative to the location of the
- configuration file itself.
--->
-<!ENTITY % Location "#PCDATA">
-
-
-
-<!-- ========== Top Level Elements ======================================== -->
-
-
- <!-- deprecated: use tiles-definitions instead.-->
-<!ELEMENT component-definitions (definition+)>
-
-<!-- The "tiles-definitions" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT tiles-definitions (definition+)>
-
-<!-- The "definition" element describes a definition that can be inserted in a jsp
- page. This definition is identified by its logical name. A definition allows
- to define all the attributes that can be set in <insert> tag from a jsp page.
-
- controllerClass The fully qualified Java class name of the controller
- subclass to call immediately before the tiles is inserted.
- Only one of controllerClass or controllerUrl should be
- specified.
-
- controllerUrl The context-relative path to the resource used as controller
- called immediately before the tiles is inserted.
- Only one of controllerClass or controllerUrl should be
- specified.
-
- extends Name of a definition that is used as ancestor of this definition.
- All attributes from the ancestor are available to the new
- definition. Any attribute inherited from the ancestor can
- be overloaded by providing a new value.
-
- name The unique identifier for this definition.
-
- page Same as path.
-
- path The context-relative path to the resource used as tiles to
- insert. This tiles will be inserted and a tiles context
- containing appropriate attributes will be available.
-
- role Security role name that is allowed access to this definition
- object. The definition is inserted only if the role name is
- allowed.
-
- template Same as path. For compatibility with the template tag library.
--->
-<!ELEMENT definition (icon?, display-name?, description?, put*, putList*)>
-<!ATTLIST definition id ID #IMPLIED>
-<!ATTLIST definition controllerClass %ClassName; #IMPLIED>
-<!ATTLIST definition controllerUrl %RequestPath; #IMPLIED>
-<!ATTLIST definition extends %DefinitionName; #IMPLIED>
-<!ATTLIST definition name %DefinitionName; #REQUIRED>
-<!ATTLIST definition page %RequestPath; #IMPLIED>
-<!ATTLIST definition path %RequestPath; #IMPLIED>
-<!ATTLIST definition role CDATA #IMPLIED>
-<!ATTLIST definition template %RequestPath; #IMPLIED>
-
-
-<!-- The "put" element describes an attribute of a definition. It allows to
- specify the tiles attribute name and its value. The tiles value can be
- specified as an xml attribute, or in the body of the <put> tag.
-
- content Same as value. For compatibility with the template tag library.
-
- direct Same as type="string". For compatibility with the template
- tag library.
-
- name The unique identifier for this put.
-
- type The type of the value. Can be: string, page, template or definition.
- By default, no type is associated to a value. If a type is
- associated, it will be used as a hint to process the value
- when the attribute will be used in the inserted tiles.
-
- value The value associated to this tiles attribute. The value should
- be specified with this tag attribute, or in the body of the tag.
--->
-<!ELEMENT put (#PCDATA)>
-<!ATTLIST put id ID #IMPLIED>
-<!ATTLIST put content CDATA #IMPLIED>
-<!ATTLIST put direct %Boolean; #IMPLIED>
-<!ATTLIST put name CDATA #REQUIRED>
-<!ATTLIST put type %ContentType; #IMPLIED>
-<!ATTLIST put value CDATA #IMPLIED>
-
-
-<!-- The "putList" element describes a list attribute of a definition. It allows to
- specify an attribute that is a java List containing any kind of values. In
- the config file, the list elements are specified by nested <add>, <item> or
- <putList>.
-
- name The unique identifier for this put list.
--->
-<!ELEMENT putList ( (add* | item* | bean* | putList*)+) >
-<!ATTLIST putList id ID #IMPLIED>
-<!ATTLIST putList name CDATA #REQUIRED>
-
-<!-- ========== Subordinate Elements ====================================== -->
-
-<!-- The "add" element describes an element of a list. It is similar to the
- <put> element.
-
- content Same as value. For compatibility with the template tag library.
-
- direct Same as type="string". For compatibility with the template
- tag library.
-
- type The type of the value. Can be: string, page, template or definition.
- By default, no type is associated to a value. If a type is
- associated, it will be used as a hint to process the value
- when the attribute will be used in the inserted tiles.
-
- value The value associated to this tiles attribute. The value should
- be specified with this tag attribute, or in the body of the tag.
--->
-<!ELEMENT add (#PCDATA)>
-<!ATTLIST add id ID #IMPLIED>
-<!ATTLIST add content CDATA #IMPLIED>
-<!ATTLIST add direct %Boolean; #IMPLIED>
-<!ATTLIST add type %ContentType; #IMPLIED>
-<!ATTLIST add value CDATA #IMPLIED>
-
-
-<!-- The "bean" element describes an element of a list. It create a bean of the
- specified java classtype. This bean is initialized with appropriate nested
- <set-property>.
-
- classtype The fully qualified classname for this bean.
--->
-<!ELEMENT bean (set-property*)>
-<!ATTLIST bean id ID #IMPLIED>
-<!ATTLIST bean classtype %ClassName; #REQUIRED>
-
-<!-- The "set-property" element specifies the method name and initial value of
- a bean property. When the object representing
- the surrounding element is instantiated, the accessor for the indicated
- property is called and passed the indicated value.
-
- property Name of the JavaBeans property whose setter method
- will be called.
-
- value String representation of the value to which this
- property will be set, after suitable type conversion
--->
-<!ELEMENT set-property EMPTY>
-<!ATTLIST set-property id ID #IMPLIED>
-<!ATTLIST set-property property %PropName; #REQUIRED>
-<!ATTLIST set-property value CDATA #REQUIRED>
-
-
-<!-- The "item" element describes an element of a list. It create a bean added as
- element to the list. Each bean can contain different properties: value, link,
- icon, tooltip. These properties are to be interpreted by the jsp page using
- them.
- By default the bean is of type
- "org.apache.struts.tiles.beans.SimpleMenuItem". This bean is useful to
- create a list of beans used as menu items.
-
- classtype The fully qualified classtype for this bean.
- If specified, the classtype must be a subclass of the interface
- "org.apache.struts.tiles.beans.MenuItem".
-
- icon The bean 'icon' property.
-
- link The bean 'link' property.
-
- tooltip The bean 'tooltip' property.
-
- value The bean 'value' property.
--->
-<!ELEMENT item (#PCDATA)>
-<!ATTLIST item id ID #IMPLIED>
-<!ATTLIST item classtype %ClassName; #IMPLIED>
-<!ATTLIST item icon CDATA #IMPLIED>
-<!ATTLIST item link CDATA #REQUIRED>
-<!ATTLIST item tooltip CDATA #IMPLIED>
-<!ATTLIST item value CDATA #REQUIRED>
-
-
-<!-- ========== Info Elements ====================================== -->
-
-<!-- The "description" element contains descriptive (paragraph length) text
- about the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT description (#PCDATA)>
-<!ATTLIST description id ID #IMPLIED>
-
-
-<!-- The "display-name" element contains a short (one line) description of
- the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name id ID #IMPLIED>
-
-
-<!-- The "icon" element contains a small-icon and large-icon element which
- specify the location, relative to the Struts configuration file, for small
- and large images used to represent the surrounding element in GUI tools.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon id ID #IMPLIED>
-
-
-<!-- The "large-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a large (32x32 pixel)
- icon image.
--->
-<!ELEMENT large-icon (%Location;)>
-<!ATTLIST large-icon id ID #IMPLIED>
-
-
-<!-- The "small-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a small (16x16 pixel)
- icon image.
--->
-<!ELEMENT small-icon (%Location;)>
-<!ATTLIST small-icon id ID #IMPLIED>
Deleted: trunk/struts/plugins/org.jboss.tools.struts/dtds/validator_1_0.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/dtds/validator_1_0.dtd 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/dtds/validator_1_0.dtd 2007-07-20 17:24:22 UTC (rev 2571)
@@ -1,246 +0,0 @@
-<!--
- DTD for the Validator Rules Configuration File, Version 1.0
-
- To allow for XML validation of your rules configuration
- file, include the following DOCTYPE element at the beginning (after
- the "xml" declaration):
-
- <!DOCTYPE form-validation PUBLIC
- "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
- "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
-
- $Id: validator_1_0.dtd,v 1.1.1.1 2004/10/06 17:32:27 sim Exp $
--->
-
-
-<!-- =================================================== Top Level Elements -->
-
-
-<!--
- The "form-validation" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT form-validation (global*, formset*)>
-
-
-<!--
- The elements defined here are all global and must be nested within a
- "global" element.
--->
-<!ELEMENT global (validator*, constant*)>
-
-
-<!--
- The "validator" element defines what validators objects can be used with
- the fields referenced by the formset elements. The validator element can
- accept 4 properties: name, classname, method, methodparams, msg, depends,
- and jsFunctionName.
--->
-<!ELEMENT validator (javascript?)>
-<!ATTLIST validator name CDATA #REQUIRED
- classname CDATA #REQUIRED
- method CDATA #REQUIRED
- methodParams CDATA #REQUIRED
- msg CDATA #REQUIRED
- depends CDATA #IMPLIED
- jsFunctionName CDATA #IMPLIED >
-
-
-<!--
- The "javascript" element defines a JavaScript that can be used to perform
- client-side validators.
--->
-<!ELEMENT javascript (#PCDATA)>
-
-
-<!--
- The "constant" element defines a static value that can be used as
- replacement parameters within "field" elements. The "constant-name" and
- "constant-value" elements define the constant's reference id and replacement
- value.
--->
-<!ELEMENT constant (constant-name, constant-value)>
-<!ELEMENT constant-name (#PCDATA)>
-<!ELEMENT constant-value (#PCDATA)>
-
-
-<!--
- The "formset" element defines a set of forms for a locale. Formsets for
- specific locales can override only those fields that change. The
- localization is properly scoped, so that a formset can override just the
- language, or just the country, or both.
--->
-<!ELEMENT formset (constant*, form+)>
-<!ATTLIST formset language CDATA #IMPLIED
- country CDATA #IMPLIED >
-
-
-<!--
- The "form" element defines a set of fields to be validated. The name
- corresponds to the identifer the application assigns to the form.
--->
-<!ELEMENT form (field+ )>
-<!ATTLIST form name CDATA #REQUIRED>
-
-
-<!--
- The "field" element defines the properties to be validated. In a
- web application, a field would also correspond to a control on
- a HTML form. To validate the properties, the validator works through
- a JavaBean representation. The field element can accept up to 4
- attributes:
-
- property The property on the JavaBean corresponding to this
- field element.
-
- depends The comma-delimited list of validators to apply against
- this field. For the field to succeed, all the
- validators must succeed.
-
- page The JavaBean corresponding to this form may include
- a page property. Only fields with a "page" attribute
- value that is equal to or less than the page property
- on the form JavaBean are processed. This is useful when
- using a "wizard" approach to completing a large form,
- to ensure that a page is not skipped.
- [0]
-
- indexedListProperty
- The "indexedListProperty" is the method name that will
- return an array or a Collection used to retrieve the
- list and then loop through the list performing the
- validations for this field.
-
--->
-<!ELEMENT field (msg|arg0|arg1|arg2|arg3|var)*>
-<!ATTLIST field property CDATA #REQUIRED
- depends CDATA #IMPLIED
- page CDATA #IMPLIED
- indexedListProperty CDATA #IMPLIED >
-
-
-<!--
- The "msg" element defines a custom message key to use when one of the
- validators for this field fails. Each validator has a default message
- property that is used when a corresonding field msg is not specified.
- Each validator applied to a field may have its own msg element.
- The msg element accepts up to three attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT msg EMPTY>
-<!ATTLIST msg name CDATA #IMPLIED
- key CDATA #IMPLIED
- resource CDATA #IMPLIED >
-
-
-<!--
- The "arg0" element defines the first replacement value to use with the
- message template for this validator or this field.
- The arg0 element accepts up to three attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg0 EMPTY>
-<!ATTLIST arg0 name CDATA #IMPLIED
- key CDATA #IMPLIED
- resource CDATA #IMPLIED >
-
-
-<!--
- The "arg1" element defines the second replacement value to use with the
- message template for this validator or this field.
- The arg1 element accepts up to three attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg1 EMPTY>
-<!ATTLIST arg1 name CDATA #IMPLIED
- key CDATA #IMPLIED
- resource CDATA #IMPLIED >
-
-
-<!--
- The "arg2" element defines the third replacement value to use with the
- message template for this validator or this field.
- The arg2 element accepts up to three attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg2 EMPTY>
-<!ATTLIST arg2 name CDATA #IMPLIED
- key CDATA #IMPLIED
- resource CDATA #IMPLIED >
-
-<!--
- The "arg3" element defines the fourth replacement value to use with the
- message template for this validator or this field.
- The arg0 element accepts up to three attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg3 EMPTY>
-<!ATTLIST arg3 name CDATA #IMPLIED
- key CDATA #IMPLIED
- resource CDATA #IMPLIED >
-
-
-<!--
- The "var" element can set parameters that a field may need to pass to
- one of its validators, such as the minimum and maximum values in a
- range validation. These parameters may also be referenced by one of the
- arg? elements using a shell syntax: ${var:var-name}.
--->
-<!ELEMENT var (var-name, var-value)>
-
-
-
-<!--
- The name of the var parameter to provide to a field's validators.
--->
-<!ELEMENT var-name (#PCDATA)>
-
-
-
-<!--
- The value of the var parameter to provide to a field's validators.
--->
-<!ELEMENT var-value (#PCDATA)>
-
-<!-- eof -->
Modified: trunk/struts/plugins/org.jboss.tools.struts/plugin.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/plugin.xml 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/plugin.xml 2007-07-20 17:24:22 UTC (rev 2571)
@@ -39,21 +39,6 @@
<extension point="org.eclipse.wst.xml.core.catalogContributions">
<catalogContribution id="default">
- <public
- publicId="-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
- uri="dtds/struts-config_1_0.dtd"/>
- <public
- publicId="-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
- uri="dtds/struts-config_1_1.dtd"/>
- <public
- publicId="-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
- uri="dtds/struts-config_1_2.dtd"/>
- <public
- publicId="-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
- uri="dtds/tiles-config_1_1.dtd"/>
- <public
- publicId="-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
- uri="dtds/validator_1_0.dtd"/>
</catalogContribution>
</extension>
Deleted: trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_0.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_0.dtd 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_0.dtd 2007-07-20 17:24:22 UTC (rev 2571)
@@ -1,408 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-
-<!--
- DTD for the Struts Application Configuration File, Version 1.0
-
- To support validation of your configuration file, include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE struts-config PUBLIC
- "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
- "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
-
- $Id: struts-config_1_0.dtd,v 1.1.1.1 2004/10/06 17:32:27 sim Exp $
--->
-
-
-<!-- ========== Defined Types ============================================= -->
-
-
-<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
- and also serves as the name of the corresponding scripting variable
- and the name of the JSP attribute under which the bean is accessed.
- Therefore, it must conform to the rules for a Java identifier.
--->
-<!ENTITY % BeanName "CDATA">
-
-
-<!-- A "Boolean" is the string representation of a boolean (true or false)
- variable.
--->
-<!ENTITY % Boolean "(true|false|yes|no)">
-
-
-<!-- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!-- An "Integer" is a character string consisting solely of numeric digits,
- optionally preceeded by a minus sign, that can be converted to a
- 32-bit integer.
--->
-<!ENTITY % Integer "CDATA">
-
-
-<!-- A "Location" is a relative path, delimited by "/" characters, that
- defines the location of a resource relative to the location of the
- Struts configuration file itself.
--->
-<!ENTITY % Location "#PCDATA">
-
-
-<!-- A "PropName" is the name of a JavaBeans property, and must begin with
- a lower case letter and contain only characters that are legal in a
- Java identifier.
--->
-<!ENTITY % PropName "CDATA">
-
-
-<!-- A "RequestPath" is a context-relative URI path, beginning with a slash,
- that identifies a mapped resource (such as a JSP page or a servlet)
- within this web application.
--->
-<!ENTITY % RequestPath "CDATA">
-
-
-<!-- The name of a JSP bean scope within which such a form bean may be
- accessed.
--->
-<!ENTITY % RequestScope "(request|session)">
-
-
-<!-- ========== Top Level Elements ======================================== -->
-
-
-<!-- The "struts-config" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT struts-config (data-sources?, form-beans?, global-forwards?, action-mappings?)>
-<!ATTLIST struts-config id ID #IMPLIED>
-
-
-<!-- The "data-sources" element describes a set of JDBC 2.0 Standard Extension
- data source objects which will be configured according to the nested
- "data-source" elements found inside.
--->
-
-<!ELEMENT data-sources (data-source*)>
-<!ATTLIST data-sources id ID #IMPLIED>
-
-
-<!-- The "data-source" element describes a JDBC 2.0 Standard Extension data
- source object (that implements javax.sql.DataSource) which will be
- configured according to the properties and nested elements found here,
- and made available as a servlet context attribute (i.e. application
- scope bean). The following attributes are required:
-
- key Servlet context attribute key under which this data
- source will be stored. Default is the value specified
- by string constant Action.DATA_SOURCE_KEY.
-
- type Fully qualified Java class name of the implementation
- class (must implement javax.sql.DataSource). Default
- value is 'org.apache.struts.util.GenericDataSource'.
-
- NOTE: The following attributes are defined by the default data source
- implementation, and only take effect for that class or subclasses of
- that class.
-
- WARNING: The use of these attributes is deprecated. You should use
- nested <set-property> elements to configure *all* properties of
- your data source implementation.
-
- autoCommit The default auto-commit state for newly created
- connections.
-
- description The description of this data source.
-
- driverClass The Java class name of the JDBC driver to be used.
- [REQUIRED]
-
- loginTimeout The maximum number of seconds to wait for a connection
- to be created or returned. Default is driver dependent.
-
- maxCount The maximum number of connections to be created.
-
- minCount The minimum number of connections to be created.
-
- password The database password to use when connecting. [REQUIRED]
-
- readOnly The default read-only state for newly created
- connections.
-
- url The JDBC URL to use when connecting. [REQUIRED]
-
- user The database username to use when connecting. [REQUIRED]
-
--->
-<!ELEMENT data-source (set-property*)>
-<!ATTLIST data-source id ID #IMPLIED>
-<!ATTLIST data-source key %BeanName; #IMPLIED>
-<!ATTLIST data-source type %ClassName; #IMPLIED>
-<!-- All of the following attributes are deprecated. Use a nested -->
-<!-- set-property element to configure data source properties. -->
-<!ATTLIST data-source autoCommit %Boolean; #IMPLIED>
-<!ATTLIST data-source description CDATA #IMPLIED>
-<!ATTLIST data-source driverClass %ClassName; #IMPLIED>
-<!ATTLIST data-source loginTimeout %Integer; #IMPLIED>
-<!ATTLIST data-source maxCount %Integer; #IMPLIED>
-<!ATTLIST data-source minCount %Integer; #IMPLIED>
-<!ATTLIST data-source password CDATA #IMPLIED>
-<!ATTLIST data-source readOnly %Boolean; #IMPLIED>
-<!ATTLIST data-source url CDATA #IMPLIED>
-<!ATTLIST data-source user CDATA #IMPLIED>
-
-
-<!-- The "form-beans" element is the root of the set of form bean descriptors
- for this application. The following attributes are defined:
-
- type Fully qualified Java class name of the implementation
- class used for ActionFormBean objects. DEPRECATED.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "formBean" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT form-beans (form-bean*)>
-<!ATTLIST form-beans id ID #IMPLIED>
-<!ATTLIST form-beans type %ClassName; "org.apache.struts.action.ActionFormBean">
-
-
-<!-- The "form-bean" element describes a particular form bean, which is a
- JavaBean that implements the org.apache.struts.action.ActionForm
- class. The following attributes are defined:
-
- className Fully qualified Java class name of the ActionFormBean
- implementation class to use. Defaults to the value
- configured as the "formBean" initialization parameter
- to the Struts controller servlet.
-
- name Unique identifier of this bean, used to reference it
- in corresponding action mappings.
-
- type Fully qualified Java class name of the implementation
- class to be used or generated
--->
-<!ELEMENT form-bean (icon?, display-name?, description?, set-property*)>
-<!ATTLIST form-bean id ID #IMPLIED>
-<!ATTLIST form-bean className %ClassName; #IMPLIED>
-<!ATTLIST form-bean name %BeanName; #REQUIRED>
-<!ATTLIST form-bean type %ClassName; #REQUIRED>
-
-
-<!-- The "global-forwards" element configures the global mappings of logical
- names (used within the application) to mappable resources (identified
- by context-relative URI paths). A global "forward" with a particular name
- can be locally overridden by defining a "forward" of the same name within
- an "action" element. The following attribute are defined:
-
- type Fully qualified Java class name of the implementation
- class used for ActionForward objects. DEPRECATED.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "forward" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT global-forwards (forward*)>
-<!ATTLIST global-forwards id ID #IMPLIED>
-<!ATTLIST global-forwards type %ClassName; "org.apache.struts.action.ActionForward">
-
-
-<!-- The "forward" element describes a mapping of a logical name (used within
- the application) to a mappable resource identified by a context-relative
- URI path. The following attributes are defined:
-
- className Fully qualified Java class name of the ActionForward
- implementation class to use. Defaults to the value
- configured as the "forward" initialization parameter
- to the Struts controller servlet.
-
- name Unique identifier of this forward, used to reference it
- in application action classes.
-
- path The context-relative path of the mapped resource.
-
- redirect Set to "true" if sendRedirect() should be used to forward
- to this resource, or "false" in order to use
- RequestDispatcher.forward() instead.
--->
-<!ELEMENT forward (icon?, display-name?, description?, set-property*)>
-<!ATTLIST forward id ID #IMPLIED>
-<!ATTLIST forward className %ClassName; #IMPLIED>
-<!ATTLIST forward name CDATA #REQUIRED>
-<!ATTLIST forward path %RequestPath; #REQUIRED>
-<!ATTLIST forward redirect %Boolean; #IMPLIED>
-
-
-<!-- The "action-mappings" element configures the mappings from submitted
- request paths to the corresponding Action classes that should be
- used to process these requests. The following attributes are
- defined:
-
- type Fully qualified Java class name of the ActionMapping
- implementation class to be used. DEPRECATED.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "mapping" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT action-mappings (action*)>
-<!ATTLIST action-mappings id ID #IMPLIED>
-<!ATTLIST action-mappings type %ClassName; "org.apache.struts.action.ActionMapping">
-
-
-<!-- The "action" element describes a mapping from a request paths to the
- corresponding Action classes that should be used to process these
- requests. The following attributes are defined:
-
- attribute Name of the request-scope or session-scope attribute
- under which our form bean is accessed, if it is other
- than the bean's specified "name". Optional if
- "name" is specified, else not allowed.
-
- className Fully qualified Java class name of the ActionMapping
- implementation class to use. Defaults to the value
- configured as the "mapping" initialization parameter
- to the Struts controller servlet.
-
- forward Context-relative path of the servlet or JSP resource that
- will process this request, instead of instantiating and
- calling the Action class specified by "type". Exactly one
- of "forward", "include", or "type" must be specified.
-
- include Context-relative path of the servlet or JSP resource that
- will process this request, instead of instantiating and
- calling the Action class specified by "type". Exactly one
- of "forward", "include", or "type" must be specified.
-
- input Context-relative path of the input form to which control
- should be returned if a validation error is encountered.
- Required if "name" is specified and the input bean
- returns validation errors. Optional if "name" is
- specified and the input bean does not return validation
- errors. Not allowed if "name" is not specified.
-
- name Name of the form bean, if any, that is associated
- with this action.
-
- path The context-relative path of the submitted request,
- starting with a "/" character, and without the
- filename extension if extension mapping is used.
-
- parameter General purpose configuration parameter that can be used
- to pass extra information to the Action selected by this
- mapping.
-
- prefix Prefix used to match request parameter names to form bean
- property names, if any. Optional if "name" is specified,
- else not allowed.
-
- scope Identifier of the scope ("request" or "session") within
- which our form bean is accessed, if any. Optional if
- "name" is specified, else not allowed.
-
- suffix Suffix used to match request parameter names to form bean
- property names, if any. Optional if "name" is specified,
- else not allowed.
-
- type Fully qualified Java class name of the Action class
- (implements org.apache.struts.action.Action) to be
- used to process requests for this mapping if the "forward"
- or "include" attribute is not included. Exactly one
- of "forward", "include", or "type" must be specified.
-
- unknown Set to "true" if this action should be configured as the
- default for this application, to handle all requests
- not handled by another action. Only one action can be
- defined as a default within a single application.
-
- validate Set to "true" if the validate() method of the form bean
- should be called prior to calling this action, or set to
- "false" if you do not want validation performed.
--->
-<!ELEMENT action (icon?, display-name?, description?, set-property*, forward*)>
-<!ATTLIST action id ID #IMPLIED>
-<!ATTLIST action attribute %BeanName; #IMPLIED>
-<!ATTLIST action className %ClassName; #IMPLIED>
-<!ATTLIST action forward %RequestPath; #IMPLIED>
-<!ATTLIST action include %RequestPath; #IMPLIED>
-<!ATTLIST action input %RequestPath; #IMPLIED>
-<!ATTLIST action name %BeanName; #IMPLIED>
-<!ATTLIST action parameter CDATA #IMPLIED>
-<!ATTLIST action path %RequestPath; #REQUIRED>
-<!ATTLIST action prefix CDATA #IMPLIED>
-<!ATTLIST action scope %RequestScope; #IMPLIED>
-<!ATTLIST action suffix CDATA #IMPLIED>
-<!ATTLIST action type %ClassName; #IMPLIED>
-<!ATTLIST action unknown %Boolean; #IMPLIED>
-<!ATTLIST action validate %Boolean; #IMPLIED>
-
-
-<!-- The "set-property" element specifies the name and value of an additional
- JavaBeans configuration property whose setter method will be called
- on the object that represents our surrounding element. This is especially
- useful when an extended implementation class (with additional properties)
- is configured on the <global-forwards> or <action-mappings> elements.
- The following attributes are defined:
-
- property Name of the JavaBeans property whose setter method
- will be called.
-
- value String representation of the value to which this
- property will be set, after suitable type conversion
--->
-<!ELEMENT set-property EMPTY>
-<!ATTLIST set-property id ID #IMPLIED>
-<!ATTLIST set-property property %PropName; #REQUIRED>
-<!ATTLIST set-property value CDATA #REQUIRED>
-
-
-
-<!-- ========== Subordinate Elements ====================================== -->
-
-
-<!-- The "description" element contains descriptive (paragraph length) text
- about the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT description (#PCDATA)>
-<!ATTLIST description id ID #IMPLIED>
-
-
-
-<!-- The "display-name" element contains a short (one line) description of
- the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name id ID #IMPLIED>
-
-
-<!-- The "icon" element contains a small-icon and large-icon element which
- specify the location, relative to the Struts configuration file, for small
- and large images used to represent the surrounding element in GUI tools.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon id ID #IMPLIED>
-
-
-<!-- The "large-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a large (32x32 pixel)
- icon image.
--->
-<!ELEMENT large-icon (%Location;)>
-<!ATTLIST large-icon id ID #IMPLIED>
-
-
-<!-- The "small-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a small (16x16 pixel)
- icon image.
--->
-<!ELEMENT small-icon (%Location;)>
-<!ATTLIST small-icon id ID #IMPLIED>
-
Deleted: trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_1.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_1.dtd 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_1.dtd 2007-07-20 17:24:22 UTC (rev 2571)
@@ -1,695 +0,0 @@
-<!--
- DTD for the Struts Application Configuration File, Version 1.1
-
- To support validation of your configuration file, include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE struts-config PUBLIC
- "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
- "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
-
- $Id: struts-config_1_1.dtd,v 1.1.1.1 2004/10/06 17:32:28 sim Exp $
--->
-
-
-<!-- ========== Defined Types ============================================= -->
-
-
-<!-- An "AttributeName" is the identifier of a page, request, session, or
- application scope attribute.
--->
-<!ENTITY % AttributeName "CDATA">
-
-
-<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
- and also serves as the name of the corresponding scripting variable
- and the name of the JSP attribute under which the bean is accessed.
- Therefore, it must conform to the rules for a Java identifier.
--->
-<!ENTITY % BeanName "CDATA">
-
-
-<!-- A "Boolean" is the string representation of a boolean (true or false)
- variable.
--->
-<!ENTITY % Boolean "(true|false|yes|no)">
-
-
-<!-- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!-- An "Integer" is a character string consisting solely of numeric digits,
- optionally preceeded by a minus sign, that can be converted to a
- 32-bit integer.
--->
-<!ENTITY % Integer "CDATA">
-
-
-<!-- A "Location" is a relative path, delimited by "/" characters, that
- defines the location of a resource relative to the location of the
- Struts configuration file itself.
--->
-<!ENTITY % Location "#PCDATA">
-
-
-<!-- A "PropName" is the name of a JavaBeans property, and must begin with
- a lower case letter and contain only characters that are legal in a
- Java identifier.
--->
-<!ENTITY % PropName "CDATA">
-
-
-<!-- A "RequestPath" is an application-relative URI path, beginning with a
- slash, that identifies a mapped resource (such as a JSP page or a servlet)
- within this web application.
--->
-<!ENTITY % RequestPath "CDATA">
-
-
-<!-- The name of a JSP bean scope within which such a form bean may be
- accessed.
--->
-<!ENTITY % RequestScope "(request|session)">
-
-
-<!-- ========== Top Level Elements ======================================== -->
-
-
-<!-- The "struts-config" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT struts-config (data-sources?, form-beans?, global-exceptions?, global-forwards?, action-mappings?, controller?, message-resources*, plug-in*)>
-<!ATTLIST struts-config id ID #IMPLIED>
-
-
-<!-- The "data-sources" element describes a set of DataSource objects [JDBC 2.0
- Standard Extension]. The individual DataSource objects are configured through
- nested <data-source> elements.
--->
-<!ELEMENT data-sources (data-source*)>
-<!ATTLIST data-sources id ID #IMPLIED>
-
-
-<!-- The "data-source" element describes a DataSource object [JDBC 2.0 Standard
- Extension] that will be instantiated, configured, and made available as a
- servlet context attribute (or "application-scope bean"). Any object can be
- specified so long as it implements [javax.sql.DataSource] and can be
- configured entirely from JavaBean properties. The following attributes
- are required:
-
- className The configuration bean for this DataSource object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.DataSourceConfig"]
-
- key Servlet context attribute key under which this data source
- will be stored. Default is the value specified by string
- constant defined by Globals.DATA_SOURCE_KEY. The application
- module prefix (if any) is appended to the key
- (${key}$prefix}).
- [org.apache.struts.Globals.DATA_SOURCE_KEY]
-
- NOTE: The application module prefix includes the leading
- slash, so the default datasource for a module named "foo" is
- stored under "org.apache.struts.action.DATA_SOURCE/foo".
-
- type Fully qualified Java class name for this data source object.
- The class must implement DataSource [javax.sql.DataSource],
- and the object must be configurable entirely from JavaBean
- properties.
--->
-<!ELEMENT data-source (set-property*)>
-<!ATTLIST data-source id ID #IMPLIED>
-<!ATTLIST data-source className %ClassName; #IMPLIED>
-<!ATTLIST data-source key %AttributeName; #IMPLIED>
-<!ATTLIST data-source type %ClassName; #IMPLIED>
-
-
-<!-- The "global-exceptions" element describes a set of exceptions that might be
- thrown by an Action object. The handling of individual exception types is
- configured through nested exception elements. An <action> element may
- override a global exception handler by registering a local exception handler
- for the same exception type. Since Struts 1.1.
--->
-<!ELEMENT global-exceptions (exception*)>
-<!ATTLIST global-exceptions id ID #IMPLIED>
-
-
-<!-- The "exception" element registers an ExceptionHandler for an exception type.
- The following attributes are defined:
-
- bundle Servlet context attribute for the message resources bundle
- associated with this handler. The default attribute is the
- value specified by the string constant declared at
- Globals.MESSAGES_KEY.
- [org.apache.struts.Globals.MESSAGES_KEY]
-
- className The configuration bean for this ExceptionHandler object.
- If specified, className must be a subclass of the default
- configuration bean
- ["org.apache.struts.config.ExceptionConfig"]
-
- handler Fully qualified Java class name for this exception handler.
- ["org.apache.struts.action.ExceptionHandler"]
-
- key The key to use with this handler's message resource bundle
- that will retrieve the error message template for this
- exception.
-
- path The module-relative URI to the resource that will complete
- the request/response if this exception occurs.
-
- scope The context ("request" or "session") that is used to access
- the ActionError object [org.apache.struts.action.ActionError]
- for this exception.
-
- type Fully qualified Java class name of the exception type to
- register with this handler.
--->
-<!ELEMENT exception (icon?, display-name?, description?, set-property*)>
-<!ATTLIST exception id ID #IMPLIED>
-<!ATTLIST exception bundle %AttributeName; #IMPLIED>
-<!ATTLIST exception className %ClassName; #IMPLIED>
-<!ATTLIST exception handler %ClassName; #IMPLIED>
-<!ATTLIST exception key CDATA #REQUIRED>
-<!ATTLIST exception path %RequestPath; #IMPLIED>
-<!ATTLIST exception scope CDATA #IMPLIED>
-<!ATTLIST exception type %ClassName; #REQUIRED>
-
-
-<!-- The "form-beans" element describes the set of form bean descriptors for this
- application module. The following attributes are defined:
-
- type Fully qualified Java class to use when instantiating
- ActionFormBean objects. If specified, the object must be a
- subclass of the default class type.
- DEPRECATED.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "formBean" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT form-beans (form-bean*)>
-<!ATTLIST form-beans id ID #IMPLIED>
-<!ATTLIST form-beans type %ClassName; #IMPLIED>
-
-
-<!-- The "form-bean" element describes an ActionForm subclass
- [org.apache.struts.action.ActionForm] that can be referenced by an "action"
- element.
-
-
-The "form-bean" element describes a particular form bean, which is a
- JavaBean that implements the org.apache.struts.action.ActionForm
- class. The following attributes are defined:
-
- className The configuration bean for this form bean object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.FormBeanConfig"]
-
- dynamic If the form bean type is a DynaActionForm subclass (that you
- created), then (and only then) set this attribute to "true".
- If the type is set to the default DynaActionForm or any
- conventional ActionForm subclass, then this attribute can be
- omitted.
- [true] if type is "org.apache.struts.action.DynaActionForm"
- [false] otherwise DEPRECATED - THIS IS NOW DETERMINED
- DYNAMICALLY BASED ON THE SPECIFIED IMPLEMENTATION CLASS.
-
- name The unique identifier for this form bean. Referenced by the
- <action> element to specify which form bean to use with its
- request.
-
- type Fully qualified Java class name of the ActionForm subclass
- to use with this form bean.
--->
-<!ELEMENT form-bean (icon?, display-name?, description?, set-property*, form-property*)>
-<!ATTLIST form-bean id ID #IMPLIED>
-<!ATTLIST form-bean className %ClassName; #IMPLIED>
-<!ATTLIST form-bean dynamic %Boolean; #IMPLIED>
-<!ATTLIST form-bean name %BeanName; #REQUIRED>
-<!ATTLIST form-bean type %ClassName; #REQUIRED>
-
-
-<!-- The "form-property" element describes a JavaBean property that can be used to
- configure an instance of a DynaActionForm or a subclass thereof. This element
- is only utilized when the "type" attribute of the enclosing "form-bean" element
- is [org.apache.struts.action.DynaActionForm] or a subclass of DynaActionForm. If
- a custom DynaActionForm subclass is used, then the "dynamic" attribute of the
- enclosing <form-bean> element must be set to "true". Since Struts 1.1.
-
- className The configuration bean for this form property object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.FormPropertyConfig"]
-
- initial String representation of the initial value for this property.
- If not specified, primitives will be initialized to zero and
- objects initialized to null.
-
- name The name of the JavaBean property described by this element.
-
- size The number of array elements to create if the value of the
- "type" attribute specifies an array, but there is no value
- specified for the "initial" attribute.
-
- type Fully qualified Java class name of the field underlying this
- property, optionally followed by "[]" to indicate that the
- field is indexed.
--->
-<!ELEMENT form-property (set-property*)>
-<!ATTLIST form-property className %ClassName; #IMPLIED>
-<!ATTLIST form-property initial CDATA #IMPLIED>
-<!ATTLIST form-property name %PropName; #REQUIRED>
-<!ATTLIST form-property size %Integer; #IMPLIED>
-<!ATTLIST form-property type %ClassName; #REQUIRED>
-
-
-<!-- The "global-forwards" element describes a set of ActionForward objects
- [org.apache.struts.action.ActionForward] that are available to all Action
- objects as a return value. The individual ActionForwards are configured
- through nested <forward> elements. An <action> element may override a global
- forward by defining a local <forward> of the same name.
-
- type Fully qualified Java class to use when instantiating
- ActionForward objects. If specified, the object must be a
- subclass of the default class type.
- DEPRECATED.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "forward" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT global-forwards (forward*)>
-<!ATTLIST global-forwards id ID #IMPLIED>
-<!ATTLIST global-forwards type %ClassName; #IMPLIED>
-
-
-<!-- The "forward" element describes an ActionForward that is to be made
- available to an Action as a return value. An ActionForward is referenced by
- a logical name and encapsulates a URI. A "forward" element may be used to
- describe both global and local ActionForwards. Global forwards are available
- to all the Action objects in the application module. Local forwards can be
- nested within an <action> element and only available to an Action object
- when it is invoked through that ActionMapping.
-
- className Fully qualified Java class name of ActionForward
- subclass to use for this object.
- ["org.apache.struts.action.ActionForward"]
-
- contextRelative Set this to "true" if, in a modular application, the path
- attribute starts with a slash "/" and should be considered
- relative to the entire web application rather than the module.
- Since Struts 1.1.
- [false]
-
- name The unique identifier for this forward. Referenced by the
- Action object at runtime to select - by its logical name -
- the resource that should complete the request/response.
-
- path The module-relative or context-relative path to the resources
- that is encapsulated by the logical name of this ActionForward.
- If the path is to be considered context-relative when used in
- a modular application, then the contextRelative attribute
- should be set to "true". This value should begin with a slash
- ("/") character.
-
- redirect Set to "true" if a redirect instruction should be issued to
- the user-agent so that a new request is issued for this
- forward's resource. If true, RequestDispatcher.Redirect is
- called. If "false", RequestDispatcher.forward is called instead.
- [false]
--->
-<!ELEMENT forward (icon?, display-name?, description?, set-property*)>
-<!ATTLIST forward id ID #IMPLIED>
-<!ATTLIST forward className %ClassName; #IMPLIED>
-<!ATTLIST forward contextRelative %Boolean; #IMPLIED>
-<!ATTLIST forward name CDATA #REQUIRED>
-<!ATTLIST forward path %RequestPath; #REQUIRED>
-<!ATTLIST forward redirect %Boolean; #IMPLIED>
-
-
-<!-- The "action-mappings" element describes a set of ActionMapping objects
- [org.apache.struts.action.ActionMapping] that are available to process
- requests matching the url-pattern our ActionServlet registered with the
- container. The individual ActionMappings are configured through nested
- <action> elements. The following attributes are defined:
-
- type Fully qualified Java class to use when instantiating
- ActionMapping objects. If specified, the object must be a
- subclass of the default class type.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "mapping" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT action-mappings (action*)>
-<!ATTLIST action-mappings id ID #IMPLIED>
-<!ATTLIST action-mappings type %ClassName; #IMPLIED>
-
-
-<!-- The "action" element describes an ActionMapping object that is to be used
- to process a request for a specific module-relative URI. The following
- attributes are defined:
-
- attribute Name of the request-scope or session-scope attribute that
- is used to access our ActionForm bean, if it is other than
- the bean's specified "name". Optional if "name" is specified,
- else not valid.
-
- className The fully qualified Java class name of the ActionMapping
- subclass to use for this action mapping object. Defaults to
- the type specified by the enclosing <action-mappings>
- element or to "org.apache.struts.action.ActionMapping" if
- not specified.
- ["org.apache.struts.action.ActionMapping"]
-
- forward Module-relative path of the servlet or other resource that
- will process this request, instead of the Action class
- specified by "type". The path WILL NOT be processed
- through the "forwardPattern" attribute that is configured
- on the "controller" element for this application module.
- Exactly one of "forward", "include", or "type" must be
- specified.
-
- include Module-relative path of the servlet or other resource that
- will process this request, instead of the Action class
- specified by "type". The path WILL NOT be processed
- through the "forwardPattern" attribute that is configured
- on the "controller" element for this application module.
- Exactly one of "forward", "include", or "type" must be
- specified.
-
- input Module-relative path of the action or other resource to
- which control should be returned if a validation error is
- encountered. Valid only when "name" is specified. Required
- if "name" is specified and the input bean returns
- validation errors. Optional if "name" is specified and the
- input bean does not return validation errors.
-
- name Name of the form bean, if any, that is associated with this
- action mapping.
-
- path The module-relative path of the submitted request, starting
- with a "/" character, and without the filename extension if
- extension mapping is used.
-
- NOTE: Do *not* include a period in your path name,
- because it will look like a filename extension and
- cause your Action to not be located.
-
- parameter General-purpose configuration parameter that can be used to
- pass extra information to the Action object selected by
- this action mapping.
-
- prefix Prefix used to match request parameter names to ActionForm
- property names, if any. Optional if "name" is specified,
- else not allowed.
-
- roles Comma-delimited list of security role names that are allowed
- access to this ActionMapping object. Since Struts 1.1.
-
- scope The context ("request" or "session") that is used to
- access our ActionForm bean, if any. Optional if "name" is
- specified, else not valid.
-
- suffix Suffix used to match request parameter names to ActionForm
- bean property names, if any. Optional if "name" is
- specified, else not valid.
-
- type Fully qualified Java class name of the Action subclass
- [org.apache.struts.action.Action] that will process requests
- for this action mapping. Not valid if either the "forward"
- or "include" attribute is specified. Exactly one of
- "forward", "include", or "type" must be specified.
-
- unknown Set to "true" if this object should be configured as the
- default action mapping for this module. If a request does not
- match another object, it will be passed to the ActionMapping
- object with unknown set to "true". Only one ActionMapping
- can be marked as "unknown" within a module.
- [false]
-
- validate Set to "true" if the validate method of the ActionForm bean
- should be called prior to calling the Action object for this
- action mapping, or set to "false" if you do not want the
- validate method called.
- [true]
--->
-<!ELEMENT action (icon?, display-name?, description?, set-property*, exception*, forward*)>
-<!ATTLIST action id ID #IMPLIED>
-<!ATTLIST action attribute %BeanName; #IMPLIED>
-<!ATTLIST action className %ClassName; #IMPLIED>
-<!ATTLIST action forward %RequestPath; #IMPLIED>
-<!ATTLIST action include %RequestPath; #IMPLIED>
-<!ATTLIST action input %RequestPath; #IMPLIED>
-<!ATTLIST action name %BeanName; #IMPLIED>
-<!ATTLIST action parameter CDATA #IMPLIED>
-<!ATTLIST action path %RequestPath; #REQUIRED>
-<!ATTLIST action prefix CDATA #IMPLIED>
-<!ATTLIST action roles CDATA #IMPLIED>
-<!ATTLIST action scope %RequestScope; #IMPLIED>
-<!ATTLIST action suffix CDATA #IMPLIED>
-<!ATTLIST action type %ClassName; #IMPLIED>
-<!ATTLIST action unknown %Boolean; #IMPLIED>
-<!ATTLIST action validate %Boolean; #IMPLIED>
-
-
-<!-- The "controller" element describes the ControllerConfig bean
- [org.apache.struts.config.ControllerConfig] that encapsulates
- an application module's runtime configuration. The following
- attributes are defined:
-
- bufferSize The size of the input buffer used when processing
- file uploads.
- [4096]
-
- className Fully qualified Java class name of the
- ControllerConfig subclass for this controller object.
- If specified, the object must be a subclass of the
- default class.
- ["org.apache.struts.config.ControllerConfig"]
-
- contentType Default content type (and optional character encoding) to
- be set on each response. May be overridden by the Action,
- JSP, or other resource to which the request is forwarded.
- ["text/html"]
-
- debug Debugging detail level for this module. [0]
- DEPRECATED - configure the logging detail level
- in your underlying logging implementation.
-
- forwardPattern Replacement pattern defining how the "path" attribute of a
- <forward> element is mapped to a context-relative URL when
- it starts with a slash (and when the contextRelative
- property is false). This value may consist of any
- combination of the following:
- - "$M" - Replaced by the module prefix of this module
- - "$P" - Replaced by the "path" attribute of the selected
- "forward" element
- - "$$" - Causes a literal dollar sign to be rendered
- - "$x" - (Where "x" is any character not defined above)
- Silently swallowed, reserved for future use
- If not specified, the default forwardPattern is "$M$P",
- which is consistent with the previous behavior of
- forwards. Since Struts 1.1. ["$M$P"]
-
- inputForward Set to "true" if you want the "input" attribute of
- <action> elements to be the name of a local or global
- ActionForward, which will then be used to calculate the
- ultimate URL. Set to "false" (the default) to treat the
- "input" parameter of <action> elements as a
- module-relative path to the resource
- to be used as the input form. Since Struts 1.1.
- [false]
-
- locale Set to "true" if you want a Locale object stored in the
- user's session if not already present.
- [true]
-
- maxFileSize The maximum size (in bytes) of a file to be accepted as a
- file upload. Can be expressed as a number followed by a
- "K", "M", or "G", which are interpreted to mean kilobytes,
- megabytes, or gigabytes, respectively.
- ["250M"]
-
- memFileSize The maximum size (in bytes) of a file whose contents will
- be retained in memory after uploading. Files larger than
- this threshold will be written to some alternative storage
- medium, typically a hard disk. Can be expressed as a number
- followed by a "K", "M", or "G", which are interpreted to
- mean kilobytes, megabytes, or gigabytes, respectively.
- ["256K"]
-
- multipartClass The fully qualified Java class name of the multipart
- request handler class to be used with this module.
- ["org.apache.struts.upload.CommonsMultipartRequestHandler"]
-
- nocache Set to "true" if you want the controller to add HTTP
- headers for defeating caching to every response from
- this module. [false]
-
- pagePattern Replacement pattern defining how the "page" attribute of
- custom tags using it is mapped to a context-relative URL
- of the corresponding resource. This value may consist of
- any combination of the following:
- - "$M" - Replaced by the module prefix of this module
- - "$P" - Replaced by the value of the "page" attribute
- - "$$" - Causes a literal dollar sign to be rendered
- - "$x" - (Where "x" is any character not defined above)
- Silently swallowed, reserved for future use
- If not specified, the default forwardPattern is
- "$M$P", which is consistent with previous hard coded
- behavior of URL evaluation for "page" attributes.
- ["$M$P"]
-
- processorClass The fully qualified Java class name of the
- RequestProcessor subclass to be used with this module.
- ["org.apache.struts.action.RequestProcessor"]
-
- tempDir Temporary working directory to use when processing
- file uploads.
- [{Directory provided by servlet container}]
--->
-<!ELEMENT controller (set-property*)>
-<!ATTLIST controller id ID #IMPLIED>
-<!ATTLIST controller bufferSize %Integer; #IMPLIED>
-<!ATTLIST controller className %ClassName; #IMPLIED>
-<!ATTLIST controller contentType CDATA #IMPLIED>
-<!ATTLIST controller debug %Integer; #IMPLIED>
-<!ATTLIST controller forwardPattern CDATA #IMPLIED>
-<!ATTLIST controller inputForward %Boolean; #IMPLIED>
-<!ATTLIST controller locale %Boolean; #IMPLIED>
-<!ATTLIST controller maxFileSize CDATA #IMPLIED>
-<!ATTLIST controller memFileSize CDATA #IMPLIED>
-<!ATTLIST controller multipartClass %ClassName; #IMPLIED>
-<!ATTLIST controller nocache %Boolean; #IMPLIED>
-<!ATTLIST controller pagePattern CDATA #IMPLIED>
-<!ATTLIST controller processorClass %ClassName; #IMPLIED>
-<!ATTLIST controller tempDir CDATA #IMPLIED>
-
-
-<!-- The "message-resources" element describes a MessageResources object with
- message templates for this module. The following attributes are defined:
-
- className The configuration bean for this message resources object.
- If specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.MessageResourcesConfig"]
-
- factory Fully qualified Java class name of the
- MessageResourcesFactory subclass to use for this message
- resources object.
- ["org.apache.struts.util.PropertyMessageResourcesFactory"]
-
- key Servlet context attribute under which this message
- resources bundle will be stored. The default attribute is
- the value specified by the string constant at
- [Globals.MESSAGES_KEY]. The application module prefix (if
- any) is appended to the key (${key}${prefix}).
- [org.apache.struts.Globals.MESSAGES_KEY]
-
- NOTE: The application module prefix includes the leading
- slash, so the default message resource bundle for a module
- named "foo" is stored under
- "org.apache.struts.action.MESSAGE/foo".
-
- null Set to "true" if you want our message resources to return a
- null string for unknown message keys, or "false" to return a
- message with the bad key value.
-
- parameter Configuration parameter to be passed to the createResources
- method of our factory object.
--->
-<!ELEMENT message-resources (set-property*)>
-<!ATTLIST message-resources id ID #IMPLIED>
-<!ATTLIST message-resources className %ClassName; #IMPLIED>
-<!ATTLIST message-resources factory %ClassName; #IMPLIED>
-<!ATTLIST message-resources key %AttributeName; #IMPLIED>
-<!ATTLIST message-resources null %Boolean; #IMPLIED>
-<!ATTLIST message-resources parameter CDATA #REQUIRED>
-
-
-<!-- The "plug-in" element specifies the fully qualified class name of a
- general-purpose application plug-in module that receives notification of
- application startup and shutdown events. An instance of the specified class
- is created for each element, and can be configured with nested <set-property>
- elements. The following attributes are supported:
-
- className Fully qualified Java class name of the plug-in class; must
- implement [org.apache.struts.action.PlugIn].
--->
-<!ELEMENT plug-in (set-property*)>
-<!ATTLIST plug-in id ID #IMPLIED>
-<!ATTLIST plug-in className %ClassName; #REQUIRED>
-
-
-<!-- ========== Subordinate Elements ====================================== -->
-
-
-<!-- The "description" element contains descriptive (paragraph length) text
- about the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT description (#PCDATA)>
-<!ATTLIST description id ID #IMPLIED>
-
-
-<!-- The "display-name" element contains a short (one line) description of
- the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name id ID #IMPLIED>
-
-
-<!-- The "icon" element contains a small-icon and large-icon element which
- specify the location, relative to the Struts configuration file, for small
- and large images used to represent the surrounding element in GUI tools.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon id ID #IMPLIED>
-
-
-<!-- The "large-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a large (32x32 pixel)
- icon image.
--->
-<!ELEMENT large-icon (%Location;)>
-<!ATTLIST large-icon id ID #IMPLIED>
-
-
-<!-- The "set-property" element specifies the method name and initial value of
- an additional JavaBean configuration property. When the object representing
- the surrounding element is instantiated, the accessor for the indicated
- property is called and passed the indicated value. The "set-property"
- element is especially useful when a custom subclass is used with
- <data-source>, <forward>, <action>, or <plug-in> elements. The subclass
- can be passed whatever other properties may be required to configure the
- object without changing how the struts-config is parsed.
-
- property Name of the JavaBeans property whose setter method
- will be called.
-
- value String representation of the value to which this
- property will be set, after suitable type conversion
--->
-<!ELEMENT set-property EMPTY>
-<!ATTLIST set-property id ID #IMPLIED>
-<!ATTLIST set-property property %PropName; #REQUIRED>
-<!ATTLIST set-property value CDATA #REQUIRED>
-
-
-<!-- The "small-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a small (16x16 pixel)
- icon image.
--->
-<!ELEMENT small-icon (%Location;)>
-<!ATTLIST small-icon id ID #IMPLIED>
-
Deleted: trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_2.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_2.dtd 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/resources/meta/struts-config_1_2.dtd 2007-07-20 17:24:22 UTC (rev 2571)
@@ -1,686 +0,0 @@
-<!--
- DTD for the Struts Application Configuration File
-
- To support validation of your configuration file, include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE struts-config PUBLIC
- "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
- "http://struts.apache.org/dtds/struts-config_1_2.dtd">
-
- $Id: struts-config_1_2.dtd,v 1.2 2004/11/18 10:34:42 glory Exp $
--->
-
-
-<!-- ========== Defined Types ============================================= -->
-
-
-<!-- An "AttributeName" is the identifier of a page, request, session, or
- application scope attribute.
--->
-<!ENTITY % AttributeName "CDATA">
-
-
-<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
- and also serves as the name of the corresponding scripting variable
- and the name of the JSP attribute under which the bean is accessed.
- Therefore, it must conform to the rules for a Java identifier.
--->
-<!ENTITY % BeanName "CDATA">
-
-
-<!-- A "Boolean" is the string representation of a boolean (true or false)
- variable.
--->
-<!ENTITY % Boolean "(true|false|yes|no)">
-
-
-<!-- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!-- An "Integer" is a character string consisting solely of numeric digits,
- optionally preceeded by a minus sign, that can be converted to a
- 32-bit integer.
--->
-<!ENTITY % Integer "CDATA">
-
-
-<!-- A "Location" is a relative path, delimited by "/" characters, that
- defines the location of a resource relative to the location of the
- Struts configuration file itself.
--->
-<!ENTITY % Location "#PCDATA">
-
-
-<!-- A "PropName" is the name of a JavaBeans property, and must begin with
- a lower case letter and contain only characters that are legal in a
- Java identifier.
--->
-<!ENTITY % PropName "CDATA">
-
-
-<!-- A "RequestPath" is an module-relative URI path, beginning with a
- slash, that identifies a mapped resource (such as a JSP page or a servlet)
- within this web application.
--->
-<!ENTITY % RequestPath "CDATA">
-
-
-<!-- The name of a JSP bean scope within which such a form bean may be
- accessed.
--->
-<!ENTITY % RequestScope "(request|session)">
-
-
-<!-- ========== Top Level Elements ======================================== -->
-
-
-<!-- The "struts-config" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT struts-config (display-name?, description?, data-sources?, form-beans?, global-exceptions?, global-forwards?, action-mappings?, controller?, message-resources*, plug-in*)>
-<!ATTLIST struts-config id ID #IMPLIED>
-
-
-<!-- The "data-sources" element describes a set of DataSource objects [JDBC 2.0
- Standard Extension]. The individual DataSource objects are configured through
- nested <data-source> elements.
--->
-<!ELEMENT data-sources (data-source*)>
-<!ATTLIST data-sources id ID #IMPLIED>
-
-
-<!-- The "data-source" element describes a DataSource object [JDBC 2.0 Standard
- Extension] that will be instantiated, configured, and made available as a
- servlet context attribute (or "application-scope bean"). Any object can be
- specified so long as it implements [javax.sql.DataSource] and can be
- configured entirely from JavaBean properties. The following attributes
- are required:
-
- className The configuration bean for this DataSource object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.DataSourceConfig"]
-
- key Servlet context attribute key under which this data source
- will be stored. Default is the value specified by string
- constant defined by Globals.DATA_SOURCE_KEY. The application
- module prefix (if any) is appended to the key
- (${key}$prefix}).
- [org.apache.struts.Globals.DATA_SOURCE_KEY]
-
- NOTE: The application module prefix includes the leading
- slash, so the default datasource for a module named "foo" is
- stored under "org.apache.struts.action.DATA_SOURCE/foo".
-
- type Fully qualified Java class name for this data source object.
- The class must implement DataSource [javax.sql.DataSource],
- and the object must be configurable entirely from JavaBean
- properties.
--->
-<!ELEMENT data-source (set-property*)>
-<!ATTLIST data-source id ID #IMPLIED>
-<!ATTLIST data-source className %ClassName; #IMPLIED>
-<!ATTLIST data-source key %AttributeName; #IMPLIED>
-<!ATTLIST data-source type %ClassName; #REQUIRED>
-
-
-<!-- The "form-beans" element describes the set of form bean descriptors for this
- module. The following attributes are defined:
-
- type Fully qualified Java class to use when instantiating
- ActionFormBean objects. If specified, the object must be a
- subclass of the default class type.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "formBean" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT form-beans (form-bean*)>
-<!ATTLIST form-beans id ID #IMPLIED>
-<!ATTLIST form-beans type %ClassName; #IMPLIED>
-
-
-<!-- The "form-bean" element describes an ActionForm subclass
- [org.apache.struts.action.ActionForm] that can be referenced by an "action"
- element.
-
-
-The "form-bean" element describes a particular form bean, which is a
- JavaBean that implements the org.apache.struts.action.ActionForm
- class. The following attributes are defined:
-
- className The configuration bean for this form bean object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.FormBeanConfig"]
-
- name The unique identifier for this form bean. Referenced by the
- <action> element to specify which form bean to use with its
- request.
-
- type Fully qualified Java class name of the ActionForm subclass
- to use with this form bean.
--->
-<!ELEMENT form-bean (icon?, display-name?, description?, set-property*, form-property*)>
-<!ATTLIST form-bean id ID #IMPLIED>
-<!ATTLIST form-bean className %ClassName; #IMPLIED>
-<!ATTLIST form-bean dynamic %Boolean; #IMPLIED>
-<!ATTLIST form-bean name %BeanName; #REQUIRED>
-<!ATTLIST form-bean type %ClassName; #REQUIRED>
-
-
-<!-- The "form-property" element describes a JavaBean property that can be used to
- configure an instance of a DynaActionForm or a subclass thereof. This element
- is only utilized when the "type" attribute of the enclosing "form-bean" element
- is [org.apache.struts.action.DynaActionForm] or a subclass of DynaActionForm. If
- a custom DynaActionForm subclass is used, then the "dynamic" attribute of the
- enclosing <form-bean> element must be set to "true". Since Struts 1.1.
-
- className The configuration bean for this form property object. If
- specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.FormPropertyConfig"]
-
- initial String representation of the initial value for this property.
- If not specified, primitives will be initialized to zero and
- objects initialized to the zero-argument instantiation of that
- object class. For example, Strings will be initialized to ""
-
-
- name The name of the JavaBean property described by this element.
-
- size The number of array elements to create if the value of the
- "type" attribute specifies an array, but there is no value
- specified for the "initial" attribute.
-
- type Fully qualified Java class name of the field underlying this
- property, optionally followed by "[]" to indicate that the
- field is indexed.
--->
-<!ELEMENT form-property (set-property*)>
-<!ATTLIST form-property className %ClassName; #IMPLIED>
-<!ATTLIST form-property initial CDATA #IMPLIED>
-<!ATTLIST form-property name %PropName; #REQUIRED>
-<!ATTLIST form-property size %Integer; #IMPLIED>
-<!ATTLIST form-property type %ClassName; #REQUIRED>
-
-
-<!-- The "global-exceptions" element describes a set of exceptions that might be
- thrown by an Action object. The handling of individual exception types is
- configured through nested exception elements. An <action> element may
- override a global exception handler by registering a local exception handler
- for the same exception type. Since Struts 1.1.
--->
-<!ELEMENT global-exceptions (exception*)>
-<!ATTLIST global-exceptions id ID #IMPLIED>
-
-
-<!-- The "exception" element registers an ExceptionHandler for an exception type.
- The following attributes are defined:
-
- bundle Servlet context attribute for the message resources bundle
- associated with this handler. The default attribute is the
- value specified by the string constant declared at
- Globals.MESSAGES_KEY.
- [org.apache.struts.Globals.MESSAGES_KEY]
-
- className The configuration bean for this ExceptionHandler object.
- If specified, className must be a subclass of the default
- configuration bean
- ["org.apache.struts.config.ExceptionConfig"]
-
- handler Fully qualified Java class name for this exception handler.
- ["org.apache.struts.action.ExceptionHandler"]
-
- key The key to use with this handler's message resource bundle
- that will retrieve the error message template for this
- exception.
-
- path The module-relative URI to the resource that will complete
- the request/response if this exception occurs.
-
- scope The context ("request" or "session") that is used to access
- the ActionError object [org.apache.struts.action.ActionError]
- for this exception.
-
- type Fully qualified Java class name of the exception type to
- register with this handler.
--->
-<!ELEMENT exception (icon?, display-name?, description?, set-property*)>
-<!ATTLIST exception id ID #IMPLIED>
-<!ATTLIST exception bundle %AttributeName; #IMPLIED>
-<!ATTLIST exception className %ClassName; #IMPLIED>
-<!ATTLIST exception handler %ClassName; #IMPLIED>
-<!ATTLIST exception key CDATA #REQUIRED>
-<!ATTLIST exception path %RequestPath; #IMPLIED>
-<!ATTLIST exception scope CDATA #IMPLIED>
-<!ATTLIST exception type %ClassName; #REQUIRED>
-
-
-<!-- The "global-forwards" element describes a set of ActionForward objects
- [org.apache.struts.action.ActionForward] that are available to all Action
- objects as a return value. The individual ActionForwards are configured
- through nested <forward> elements. An <action> element may override a global
- forward by defining a local <forward> of the same name.
-
- type Fully qualified Java class to use when instantiating
- ActionForward objects. If specified, the object must be a
- subclass of the default class type.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "forward" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT global-forwards (forward*)>
-<!ATTLIST global-forwards id ID #IMPLIED>
-<!ATTLIST global-forwards type %ClassName; #IMPLIED>
-
-
-<!-- The "forward" element describes an ActionForward that is to be made
- available to an Action as a return value. An ActionForward is referenced by
- a logical name and encapsulates a URI. A "forward" element may be used to
- describe both global and local ActionForwards. Global forwards are available
- to all the Action objects in the module. Local forwards can be
- nested within an <action> element and only available to an Action object
- when it is invoked through that ActionMapping.
-
- className Fully qualified Java class name of ActionForward
- subclass to use for this object.
- ["org.apache.struts.action.ActionForward"]
-
- contextRelative Set this to "true" if, in a modular application, the path
- attribute starts with a slash "/" and should be considered
- relative to the entire web application rather than the module.
- Since Struts 1.1.
- DEPRECATED.
- [false]
-
- module The module prefix to use with this path. This value should
- begin with a slash ("/").
-
- name The unique identifier for this forward. Referenced by the
- Action object at runtime to select - by its logical name -
- the resource that should complete the request/response.
-
- path The module-relative or context-relative path to the resources
- that is encapsulated by the logical name of this ActionForward.
- If the path is to be considered context-relative when used in
- a modular application, then the contextRelative attribute
- should be set to "true". This value should begin with a slash
- ("/") character.
-
- redirect Set to "true" if a redirect instruction should be issued to
- the user-agent so that a new request is issued for this
- forward's resource. If true, RequestDispatcher.Redirect is
- called. If "false", RequestDispatcher.forward is called instead.
- [false]
--->
-<!ELEMENT forward (icon?, display-name?, description?, set-property*)>
-<!ATTLIST forward id ID #IMPLIED>
-<!ATTLIST forward className %ClassName; #IMPLIED>
-<!ATTLIST forward contextRelative %Boolean; #IMPLIED>
-<!ATTLIST forward module %RequestPath; #IMPLIED>
-<!ATTLIST forward name CDATA #REQUIRED>
-<!ATTLIST forward path %RequestPath; #REQUIRED>
-<!ATTLIST forward redirect %Boolean; #IMPLIED>
-
-
-<!-- The "action-mappings" element describes a set of ActionMapping objects
- [org.apache.struts.action.ActionMapping] that are available to process
- requests matching the url-pattern our ActionServlet registered with the
- container. The individual ActionMappings are configured through nested
- <action> elements. The following attributes are defined:
-
- type Fully qualified Java class to use when instantiating
- ActionMapping objects. If specified, the object must be a
- subclass of the default class type.
-
- WARNING: For Struts 1.0, this value is ignored. You
- can set the default implementation class name with the
- "mapping" initialization parameter to the Struts
- controller servlet.
--->
-<!ELEMENT action-mappings (action*)>
-<!ATTLIST action-mappings id ID #IMPLIED>
-<!ATTLIST action-mappings type %ClassName; #IMPLIED>
-
-
-<!-- The "action" element describes an ActionMapping object that is to be used
- to process a request for a specific module-relative URI. The following
- attributes are defined:
-
- attribute Name of the request-scope or session-scope attribute that
- is used to access our ActionForm bean, if it is other than
- the bean's specified "name". Optional if "name" is specified,
- else not valid.
-
- className The fully qualified Java class name of the ActionMapping
- subclass to use for this action mapping object. Defaults to
- the type specified by the enclosing <action-mappings>
- element or to "org.apache.struts.action.ActionMapping" if
- not specified.
- ["org.apache.struts.action.ActionMapping"]
-
- forward Module-relative path of the servlet or other resource that
- will process this request, instead of the Action class
- specified by "type". The path WILL NOT be processed
- through the "forwardPattern" attribute that is configured
- on the "controller" element for this module.
- Exactly one of "forward", "include", or "type" must be
- specified.
-
- include Module-relative path of the servlet or other resource that
- will process this request, instead of the Action class
- specified by "type". The path WILL NOT be processed
- through the "forwardPattern" attribute that is configured
- on the "controller" element for this module.
- Exactly one of "forward", "include", or "type" must be
- specified.
-
- input Module-relative path of the action or other resource to
- which control should be returned if a validation error is
- encountered. Valid only when "name" is specified. Required
- if "name" is specified and the input bean returns
- validation errors. Optional if "name" is specified and the
- input bean does not return validation errors.
-
- name Name of the form bean, if any, that is associated with this
- action mapping.
-
- path The module-relative path of the submitted request, starting
- with a "/" character, and without the filename extension if
- extension mapping is used.
-
- NOTE: Do *not* include a period in your path name,
- because it will look like a filename extension and
- cause your Action to not be located.
-
- parameter General-purpose configuration parameter that can be used to
- pass extra information to the Action object selected by
- this action mapping.
-
- prefix Prefix used to match request parameter names to ActionForm
- property names, if any. Optional if "name" is specified,
- else not allowed.
-
- roles Comma-delimited list of security role names that are allowed
- access to this ActionMapping object. Since Struts 1.1.
-
- scope The context ("request" or "session") that is used to
- access our ActionForm bean, if any. Optional if "name" is
- specified, else not valid. [session]
-
- suffix Suffix used to match request parameter names to ActionForm
- bean property names, if any. Optional if "name" is
- specified, else not valid.
-
- type Fully qualified Java class name of the Action subclass
- [org.apache.struts.action.Action] that will process requests
- for this action mapping. Not valid if either the "forward"
- or "include" attribute is specified. Exactly one of
- "forward", "include", or "type" must be specified.
-
- unknown Set to "true" if this object should be configured as the
- default action mapping for this module. If a request does not
- match another object, it will be passed to the ActionMapping
- object with unknown set to "true". Only one ActionMapping
- can be marked as "unknown" within a module.
- [false]
-
- validate Set to "true" if the validate method of the ActionForm bean
- should be called prior to calling the Action object for this
- action mapping, or set to "false" if you do not want the
- validate method called.
- [true]
--->
-<!ELEMENT action (icon?, display-name?, description?, set-property*, exception*, forward*)>
-<!ATTLIST action id ID #IMPLIED>
-<!ATTLIST action attribute %BeanName; #IMPLIED>
-<!ATTLIST action className %ClassName; #IMPLIED>
-<!ATTLIST action forward %RequestPath; #IMPLIED>
-<!ATTLIST action include %RequestPath; #IMPLIED>
-<!ATTLIST action input %RequestPath; #IMPLIED>
-<!ATTLIST action name %BeanName; #IMPLIED>
-<!ATTLIST action parameter CDATA #IMPLIED>
-<!ATTLIST action path %RequestPath; #REQUIRED>
-<!ATTLIST action prefix CDATA #IMPLIED>
-<!ATTLIST action roles CDATA #IMPLIED>
-<!ATTLIST action scope %RequestScope; #IMPLIED>
-<!ATTLIST action suffix CDATA #IMPLIED>
-<!ATTLIST action type %ClassName; #IMPLIED>
-<!ATTLIST action unknown %Boolean; #IMPLIED>
-<!ATTLIST action validate %Boolean; #IMPLIED>
-
-
-<!-- The "controller" element describes the ControllerConfig bean
- [org.apache.struts.config.ControllerConfig] that encapsulates
- a module's runtime configuration. The following
- attributes are defined:
-
- bufferSize The size of the input buffer used when processing
- file uploads.
- [4096]
-
- className Fully qualified Java class name of the
- ControllerConfig subclass for this controller object.
- If specified, the object must be a subclass of the
- default class.
- ["org.apache.struts.config.ControllerConfig"]
-
- contentType Default content type (and optional character encoding) to
- be set on each response. May be overridden by the Action,
- JSP, or other resource to which the request is forwarded.
- ["text/html"]
-
- forwardPattern Replacement pattern defining how the "path" attribute of a
- <forward> element is mapped to a context-relative URL when
- it starts with a slash (and when the contextRelative
- property is false). This value may consist of any
- combination of the following:
- - "$M" - Replaced by the module prefix of this module
- - "$P" - Replaced by the "path" attribute of the selected
- "forward" element
- - "$$" - Causes a literal dollar sign to be rendered
- - "$x" - (Where "x" is any character not defined above)
- Silently swallowed, reserved for future use
- If not specified, the default forwardPattern is "$M$P",
- which is consistent with the previous behavior of
- forwards. Since Struts 1.1. ["$M$P"]
-
- inputForward Set to "true" if you want the "input" attribute of
- <action> elements to be the name of a local or global
- ActionForward, which will then be used to calculate the
- ultimate URL. Set to "false" (the default) to treat the
- "input" parameter of <action> elements as a
- module-relative path to the resource
- to be used as the input form. Since Struts 1.1.
- [false]
-
- locale Set to "true" if you want a Locale object stored in the
- user's session if not already present.
- [true]
-
- maxFileSize The maximum size (in bytes) of a file to be accepted as a
- file upload. Can be expressed as a number followed by a
- "K", "M", or "G", which are interpreted to mean kilobytes,
- megabytes, or gigabytes, respectively.
- ["250M"]
-
- memFileSize The maximum size (in bytes) of a file whose contents will
- be retained in memory after uploading. Files larger than
- this threshold will be written to some alternative storage
- medium, typically a hard disk. Can be expressed as a number
- followed by a "K", "M", or "G", which are interpreted to
- mean kilobytes, megabytes, or gigabytes, respectively.
- ["256K"]
-
- multipartClass The fully qualified Java class name of the multipart
- request handler class to be used with this module.
- ["org.apache.struts.upload.CommonsMultipartRequestHandler"]
-
- nocache Set to "true" if you want the controller to add HTTP
- headers for defeating caching to every response from
- this module. [false]
-
- pagePattern Replacement pattern defining how the "page" attribute of
- custom tags using it is mapped to a context-relative URL
- of the corresponding resource. This value may consist of
- any combination of the following:
- - "$M" - Replaced by the module prefix of this module
- - "$P" - Replaced by the value of the "page" attribute
- - "$$" - Causes a literal dollar sign to be rendered
- - "$x" - (Where "x" is any character not defined above)
- Silently swallowed, reserved for future use
- If not specified, the default forwardPattern is
- "$M$P", which is consistent with previous hard coded
- behavior of URL evaluation for "page" attributes.
- ["$M$P"]
-
- processorClass The fully qualified Java class name of the
- RequestProcessor subclass to be used with this module.
- ["org.apache.struts.action.RequestProcessor"]
-
- tempDir Temporary working directory to use when processing
- file uploads.
- [{Directory provided by servlet container}]
--->
-<!ELEMENT controller (set-property*)>
-<!ATTLIST controller id ID #IMPLIED>
-<!ATTLIST controller bufferSize %Integer; #IMPLIED>
-<!ATTLIST controller className %ClassName; #IMPLIED>
-<!ATTLIST controller contentType CDATA #IMPLIED>
-<!ATTLIST controller forwardPattern CDATA #IMPLIED>
-<!ATTLIST controller inputForward %Boolean; #IMPLIED>
-<!ATTLIST controller locale %Boolean; #IMPLIED>
-<!ATTLIST controller maxFileSize CDATA #IMPLIED>
-<!ATTLIST controller memFileSize CDATA #IMPLIED>
-<!ATTLIST controller multipartClass %ClassName; #IMPLIED>
-<!ATTLIST controller nocache %Boolean; #IMPLIED>
-<!ATTLIST controller pagePattern CDATA #IMPLIED>
-<!ATTLIST controller processorClass %ClassName; #IMPLIED>
-<!ATTLIST controller tempDir CDATA #IMPLIED>
-
-
-<!-- The "message-resources" element describes a MessageResources object with
- message templates for this module. The following attributes are defined:
-
- className The configuration bean for this message resources object.
- If specified, the object must be a subclass of the default
- configuration bean.
- ["org.apache.struts.config.MessageResourcesConfig"]
-
- factory Fully qualified Java class name of the
- MessageResourcesFactory subclass to use for this message
- resources object.
- ["org.apache.struts.util.PropertyMessageResourcesFactory"]
-
- key Servlet context attribute under which this message
- resources bundle will be stored. The default attribute is
- the value specified by the string constant at
- [Globals.MESSAGES_KEY]. The module prefix (if
- any) is appended to the key (${key}${prefix}).
- [org.apache.struts.Globals.MESSAGES_KEY]
-
- NOTE: The module prefix includes the leading
- slash, so the default message resource bundle for a module
- named "foo" is stored under
- "org.apache.struts.action.MESSAGE/foo".
-
- null Set to "true" if you want our message resources to return a
- null string for unknown message keys, or "false" to return a
- message with the bad key value.
-
- parameter Configuration parameter to be passed to the createResources
- method of our factory object.
--->
-<!ELEMENT message-resources (set-property*)>
-<!ATTLIST message-resources id ID #IMPLIED>
-<!ATTLIST message-resources className %ClassName; #IMPLIED>
-<!ATTLIST message-resources factory %ClassName; #IMPLIED>
-<!ATTLIST message-resources key %AttributeName; #IMPLIED>
-<!ATTLIST message-resources null %Boolean; #IMPLIED>
-<!ATTLIST message-resources parameter CDATA #REQUIRED>
-
-
-<!-- The "plug-in" element specifies the fully qualified class name of a
- general-purpose application plug-in module that receives notification of
- application startup and shutdown events. An instance of the specified class
- is created for each element, and can be configured with nested <set-property>
- elements. The following attributes are supported:
-
- className Fully qualified Java class name of the plug-in class; must
- implement [org.apache.struts.action.PlugIn].
--->
-<!ELEMENT plug-in (set-property*)>
-<!ATTLIST plug-in id ID #IMPLIED>
-<!ATTLIST plug-in className %ClassName; #REQUIRED>
-
-
-<!-- ========== Subordinate Elements ====================================== -->
-
-
-<!-- The "description" element contains descriptive (paragraph length) text
- about the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT description (#PCDATA)>
-<!ATTLIST description id ID #IMPLIED>
-
-
-<!-- The "display-name" element contains a short (one line) description of
- the surrounding element, suitable for use in GUI tools.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name id ID #IMPLIED>
-
-
-<!-- The "icon" element contains a small-icon and large-icon element which
- specify the location, relative to the Struts configuration file, for small
- and large images used to represent the surrounding element in GUI tools.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon id ID #IMPLIED>
-
-
-<!-- The "large-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a large (32x32 pixel)
- icon image.
--->
-<!ELEMENT large-icon (%Location;)>
-<!ATTLIST large-icon id ID #IMPLIED>
-
-
-<!-- The "set-property" element specifies the method name and initial value of
- an additional JavaBean configuration property. When the object representing
- the surrounding element is instantiated, the accessor for the indicated
- property is called and passed the indicated value. The "set-property"
- element is especially useful when a custom subclass is used with
- <data-source>, <forward>, <action>, or <plug-in> elements. The subclass
- can be passed whatever other properties may be required to configure the
- object without changing how the struts-config is parsed.
-
- property Name of the JavaBeans property whose setter method
- will be called.
-
- value String representation of the value to which this
- property will be set, after suitable type conversion
--->
-<!ELEMENT set-property EMPTY>
-<!ATTLIST set-property id ID #IMPLIED>
-<!ATTLIST set-property property %PropName; #REQUIRED>
-<!ATTLIST set-property value CDATA #REQUIRED>
-
-
-<!-- The "small-icon" element specifies the location, relative to the Struts
- configuration file, of a resource containing a small (16x16 pixel)
- icon image.
--->
-<!ELEMENT small-icon (%Location;)>
-<!ATTLIST small-icon id ID #IMPLIED>
-
Deleted: trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_0.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_0.dtd 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_0.dtd 2007-07-20 17:24:22 UTC (rev 2571)
@@ -1,247 +0,0 @@
-<!--
- DTD for the Validator Rules Configuration File, Version 1.0
-
- To allow for XML validation of your rules configuration
- file, include the following DOCTYPE element at the beginning (after
- the "xml" declaration):
-
- <!DOCTYPE form-validation PUBLIC
- "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
- "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
-
- $Id: validator_1_0.dtd,v 1.1.1.1 2004/10/06 17:32:28 sim Exp $
--->
-
-
-<!-- =================================================== Top Level Elements -->
-
-
-<!--
- The "form-validation" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT form-validation (global*, formset*)>
-
-
-<!--
- The elements defined here are all global and must be nested within a
- "global" element.
--->
-<!ELEMENT global (validator*, constant*)>
-
-
-<!--
- The "validator" element defines what validators objects can be used with
- the fields referenced by the formset elements. The validator element can
- accept 4 properties: name, classname, method, methodparams, msg, depends,
- and jsFunctionName.
--->
-<!ELEMENT validator (javascript?)>
-<!ATTLIST validator name CDATA #REQUIRED
- classname CDATA #REQUIRED
- method CDATA #REQUIRED
- methodParams CDATA #REQUIRED
- msg CDATA #REQUIRED
- depends CDATA #IMPLIED
- jsFunctionName CDATA #IMPLIED >
-
-
-<!--
- The "javascript" element defines a JavaScript that can be used to perform
- client-side validators.
--->
-<!ELEMENT javascript (#PCDATA)>
-
-
-<!--
- The "constant" element defines a static value that can be used as
- replacement parameters within "field" elements. The "constant-name" and
- "constant-value" elements define the constant's reference id and replacement
- value.
--->
-<!ELEMENT constant (constant-name, constant-value)>
-<!ELEMENT constant-name (#PCDATA)>
-<!ELEMENT constant-value (#PCDATA)>
-
-
-<!--
- The "formset" element defines a set of forms for a locale. Formsets for
- specific locales can override only those fields that change. The
- localization is properly scoped, so that a formset can override just the
- language, or just the country, or both.
--->
-<!ELEMENT formset (constant*, form*)>
-<!ATTLIST formset language CDATA #IMPLIED
- country CDATA #IMPLIED >
-
-
-<!--
- The "form" element defines a set of fields to be validated. The name
- corresponds to the identifer the application assigns to the form.
--->
-<!ELEMENT form (field* )>
-<!ATTLIST form name CDATA #REQUIRED>
-
-
-<!--
- The "field" element defines the properties to be validated. In a
- web application, a field would also correspond to a control on
- a HTML form. To validate the properties, the validator works through
- a JavaBean representation. The field element can accept up to 4
- attributes:
-
- property The property on the JavaBean corresponding to this
- field element.
-
- depends The comma-delimited list of validators to apply against
- this field. For the field to succeed, all the
- validators must succeed.
-
- page The JavaBean corresponding to this form may include
- a page property. Only fields with a "page" attribute
- value that is equal to or less than the page property
- on the form JavaBean are processed. This is useful when
- using a "wizard" approach to completing a large form,
- to ensure that a page is not skipped.
- [0]
-
- indexedListProperty
- The "indexedListProperty" is the method name that will
- return an array or a Collection used to retrieve the
- list and then loop through the list performing the
- validations for this field.
-
--->
-<!ELEMENT field (msg|arg0|arg1|arg2|arg3|var)*>
-<!ATTLIST field property CDATA #REQUIRED
- depends CDATA #IMPLIED
- page CDATA #IMPLIED
- indexedListProperty CDATA #IMPLIED >
-
-
-<!--
- The "msg" element defines a custom message key to use when one of the
- validators for this field fails. Each validator has a default message
- property that is used when a corresonding field msg is not specified.
- Each validator applied to a field may have its own msg element.
- The msg element accepts up to three attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT msg EMPTY>
-<!ATTLIST msg name CDATA #IMPLIED
- key CDATA #IMPLIED
- resource CDATA #IMPLIED >
-
-
-<!--
- The "arg0" element defines the first replacement value to use with the
- message template for this validator or this field.
- The arg0 element accepts up to three attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg0 EMPTY>
-<!ATTLIST arg0 name CDATA #IMPLIED
- key CDATA #IMPLIED
- resource CDATA #IMPLIED >
-
-
-<!--
- The "arg1" element defines the second replacement value to use with the
- message template for this validator or this field.
- The arg1 element accepts up to three attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg1 EMPTY>
-<!ATTLIST arg1 name CDATA #IMPLIED
- key CDATA #IMPLIED
- resource CDATA #IMPLIED >
-
-
-<!--
- The "arg2" element defines the third replacement value to use with the
- message template for this validator or this field.
- The arg2 element accepts up to three attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg2 EMPTY>
-<!ATTLIST arg2 name CDATA #IMPLIED
- key CDATA #IMPLIED
- resource CDATA #IMPLIED >
-
-<!--
- The "arg3" element defines the fourth replacement value to use with the
- message template for this validator or this field.
- The arg0 element accepts up to three attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg3 EMPTY>
-<!ATTLIST arg3 name CDATA #IMPLIED
- key CDATA #IMPLIED
- resource CDATA #IMPLIED >
-
-
-<!--
- The "var" element can set parameters that a field may need to pass to
- one of its validators, such as the minimum and maximum values in a
- range validation. These parameters may also be referenced by one of the
- arg? elements using a shell syntax: ${var:var-name}.
--->
-<!ELEMENT var (var-name, var-value)>
-
-
-
-<!--
- The name of the var parameter to provide to a field's validators.
--->
-<!ELEMENT var-name (#PCDATA)>
-
-
-
-<!--
- The value of the var parameter to provide to a field's validators.
--->
-<!ELEMENT var-value (#PCDATA)>
-
-<!-- eof -->
-
Deleted: trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_1_3.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_1_3.dtd 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_1_3.dtd 2007-07-20 17:24:22 UTC (rev 2571)
@@ -1,312 +0,0 @@
-<!--
- DTD for the Validator Rules Configuration File, Version 1.1.3
-
- To allow for XML validation of your rules configuration
- file, include the following DOCTYPE element at the beginning (after
- the "xml" declaration):
-
- <!DOCTYPE form-validation PUBLIC
- "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN"
- "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
-
- $Id: validator_1_1_3.dtd,v 1.1 2004/11/18 10:33:38 glory Exp $
--->
-
-
-
-<!--
- The "form-validation" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT form-validation (global*, formset*)>
-
-
-<!--
- The elements defined here are all global and must be nested within a
- "global" element.
--->
-<!ELEMENT global (validator*, constant*)>
-
-
-<!--
- The "validator" element defines what validator objects can be used with
- the fields referenced by the formset elements.
- elements:
- validator Defines a new validatior
- javascript The javascript source code for client side validation.
- attributes:
- name The name of this validation
- classname The java class name that handles server side validation
- method The java method that handles server side validation
- methodParams The java class types passed to the serverside method
- msg a generic message key to use when this validator fails.
- It can be overridden by the 'msg' element for a specific field.
- depends The comma-delimited list of validator that are called before this validator.
- For this validation to succeed, all the listed validators must succeed.
- jsFunctionName The name of the javascript function which returns all fields of a certain type.
- jsFunction The name of the javascript function which is passed the form for validation.
-
--->
-<!ELEMENT validator (javascript?)>
-<!ATTLIST validator name CDATA #REQUIRED>
-<!ATTLIST validator classname CDATA #REQUIRED>
-<!ATTLIST validator method CDATA #REQUIRED>
-<!ATTLIST validator methodParams CDATA #REQUIRED>
-<!ATTLIST validator msg CDATA #REQUIRED>
-<!ATTLIST validator depends CDATA #IMPLIED>
-<!ATTLIST validator jsFunctionName CDATA #IMPLIED>
-<!ATTLIST validator jsFunction CDATA #IMPLIED>
-
-
-<!--
- The "javascript" element defines a JavaScript that can be used to perform
- client-side validators.
--->
-<!ELEMENT javascript (#PCDATA)>
-
-
-<!--
- The "constant" element defines a static value that can be used as
- replacement parameters within "field" elements. The "constant-name" and
- "constant-value" elements define the constant's reference id and replacement
- value.
--->
-<!ELEMENT constant (constant-name, constant-value)>
-<!ELEMENT constant-name (#PCDATA)>
-<!ELEMENT constant-value (#PCDATA)>
-
-
-<!--
- The "formset" element defines a set of forms for a locale. Formsets for
- specific locales can override only those fields that change. The
- localization is properly scoped, so that a formset can override just the
- language, or just the country, or both.
--->
-<!ELEMENT formset (constant*, form*)>
-<!ATTLIST formset language CDATA #IMPLIED>
-<!ATTLIST formset country CDATA #IMPLIED>
-<!ATTLIST formset variant CDATA #IMPLIED>
-
-
-<!--
- The "form" element defines a set of fields to be validated. The name
- corresponds to the identifier the application assigns to the form.
--->
-<!ELEMENT form (field*)>
-<!ATTLIST form name CDATA #REQUIRED>
-
-
-<!--
- The "field" element defines the properties to be validated. In a
- web application, a field would also correspond to a control on
- a HTML form. To validate the properties, the validator works through
- a JavaBean representation. The field element accepts these
- attributes:
-
- property The property on the JavaBean corresponding to this
- field element.
-
- depends The comma-delimited list of validators to apply against
- this field. For the field to succeed, all the
- validators must succeed.
-
- page The JavaBean corresponding to this form may include
- a page property. Only fields with a "page" attribute
- value that is equal to or less than the page property
- on the form JavaBean are processed. This is useful when
- using a "wizard" approach to completing a large form,
- to ensure that a page is not skipped.
- [0]
-
- indexedListProperty
- The "indexedListProperty" is the method name that will
- return an array or a Collection used to retrieve the
- list and then loop through the list performing the
- validations for this field.
-
--->
-<!ELEMENT field (msg|arg|arg0|arg1|arg2|arg3|var)*>
-<!ATTLIST field property CDATA #REQUIRED>
-<!ATTLIST field depends CDATA #IMPLIED>
-<!ATTLIST field page CDATA #IMPLIED>
-<!ATTLIST field indexedListProperty CDATA #IMPLIED>
-
-
-<!--
- The "msg" element defines a custom message key to use when one of the
- validators for this field fails. Each validator has a default message
- property that is used when a corresponding field msg is not specified.
- Each validator applied to a field may have its own msg element.
- The msg element accepts these attributes.
-
- name The name of the validator corresponding to this msg.
-
- bundle The resource bundle name that the key should be resolved in.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT msg EMPTY>
-<!ATTLIST msg key CDATA #REQUIRED>
-<!ATTLIST msg name CDATA #REQUIRED>
-<!ATTLIST msg bundle CDATA #IMPLIED>
-<!ATTLIST msg resource CDATA #IMPLIED>
-
-
-
-<!--
- The "arg" element defines a replacement value to use with the
- message template for this validator or this field.
- The arg element accepts these attributes.
-
- name The name of the validator corresponding to this msg.
- If not supplied, this argument will be used in the given
- position for every validator.
-
- bundle The resource bundle name that the key should be resolved in.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
-
- position The position of this replacement parameter in the message.
- For example, position="0" will set the first argument.
- [0]
--->
-<!ELEMENT arg EMPTY>
-<!ATTLIST arg key CDATA #REQUIRED>
-<!ATTLIST arg bundle CDATA #IMPLIED>
-<!ATTLIST arg name CDATA #IMPLIED>
-<!ATTLIST arg resource CDATA #IMPLIED>
-<!ATTLIST arg position CDATA #IMPLIED>
-
-
-
-<!--
-
- DEPRECATED Use <arg position="0"/> instead.
-
- The "arg0" element defines the first replacement value to use with the
- message template for this validator or this field.
- The arg0 element accepts these attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg0 EMPTY>
-<!ATTLIST arg0 name CDATA #IMPLIED>
-<!ATTLIST arg0 key CDATA #IMPLIED>
-<!ATTLIST arg0 resource CDATA #IMPLIED>
-
-
-<!--
-
- DEPRECATED Use <arg position="1"/> instead.
-
- The "arg1" element defines the second replacement value to use with the
- message template for this validator or this field.
- The arg1 element accepts these attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg1 EMPTY>
-<!ATTLIST arg1 name CDATA #IMPLIED>
-<!ATTLIST arg1 key CDATA #IMPLIED>
-<!ATTLIST arg1 resource CDATA #IMPLIED>
-
-
-<!--
-
- DEPRECATED Use <arg position="2"/> instead.
-
- The "arg2" element defines the third replacement value to use with the
- message template for this validator or this field.
- The arg2 element accepts these attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg2 EMPTY>
-<!ATTLIST arg2 name CDATA #IMPLIED>
-<!ATTLIST arg2 key CDATA #IMPLIED>
-<!ATTLIST arg2 resource CDATA #IMPLIED>
-
-
-<!--
-
- DEPRECATED Use <arg position="3"/> instead.
-
- The "arg3" element defines the fourth replacement value to use with the
- message template for this validator or this field.
- The arg0 element accepts these attributes.
-
- name The name of the validator corresponding to this msg.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT arg3 EMPTY>
-<!ATTLIST arg3 name CDATA #IMPLIED>
-<!ATTLIST arg3 key CDATA #IMPLIED>
-<!ATTLIST arg3 resource CDATA #IMPLIED>
-
-
-<!--
- The "var" element can set parameters that a field may need to pass to
- one of its validators, such as the minimum and maximum values in a
- range validation. These parameters may also be referenced by one of the
- arg? elements using a shell syntax: ${var:var-name}.
--->
-<!ELEMENT var (var-name, var-value, var-jstype?)>
-
-
-
-<!--
- The name of the var parameter to provide to a field's validators.
--->
-<!ELEMENT var-name (#PCDATA)>
-
-
-
-<!--
- The value of the var parameter to provide to a field's validators.
--->
-<!ELEMENT var-value (#PCDATA)>
-
-<!--
- The java script type, Possible Values [int| string | regexp]
-
--->
-<!ELEMENT var-jstype (#PCDATA)>
-
Deleted: trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_2_0.dtd
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_2_0.dtd 2007-07-20 17:23:26 UTC (rev 2570)
+++ trunk/struts/plugins/org.jboss.tools.struts/resources/meta/validator_1_2_0.dtd 2007-07-20 17:24:22 UTC (rev 2571)
@@ -1,221 +0,0 @@
-<!--
- DTD for the Validator Rules Configuration File, Version 1.2.0
-
- To allow for XML validation of your rules configuration
- file, include the following DOCTYPE element at the beginning (after
- the "xml" declaration):
-
- <!DOCTYPE form-validation PUBLIC
- "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.2.0//EN"
- "http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd">
-
- $Id: validator_1_2_0.dtd,v 1.1 2004/11/18 10:33:38 glory Exp $
--->
-
-
-
-<!--
- The "form-validation" element is the root of the configuration file
- hierarchy, and contains nested elements for all of the other
- configuration settings.
--->
-<!ELEMENT form-validation (global*, formset*)>
-
-
-<!--
- The elements defined here are all global and must be nested within a
- "global" element.
--->
-<!ELEMENT global (validator*, constant*)>
-
-
-<!--
- The "validator" element defines what validator objects can be used with
- the fields referenced by the formset elements.
- elements:
- validator Defines a new validatior
- javascript The javascript source code for client side validation.
- attributes:
- name The name of this validation
- classname The java class name that handles server side validation
- method The java method that handles server side validation
- methodParams The java class types passed to the serverside method
- msg a generic message key to use when this validator fails.
- It can be overridden by the 'msg' element for a specific field.
- depends The comma-delimited list of validator that are called before this validator.
- For this validation to succeed, all the listed validators must succeed.
- jsFunctionName The name of the javascript function which returns all fields of a certain type.
- jsFunction The name of the javascript function which is passed the form for validation.
-
--->
-<!ELEMENT validator (javascript?)>
-<!ATTLIST validator name CDATA #REQUIRED>
-<!ATTLIST validator classname CDATA #REQUIRED>
-<!ATTLIST validator method CDATA #REQUIRED>
-<!ATTLIST validator methodParams CDATA #REQUIRED>
-<!ATTLIST validator msg CDATA #REQUIRED>
-<!ATTLIST validator depends CDATA #IMPLIED>
-<!ATTLIST validator jsFunctionName CDATA #IMPLIED>
-<!ATTLIST validator jsFunction CDATA #IMPLIED>
-
-
-
-<!--
- The "javascript" element defines a JavaScript that can be used to perform
- client-side validators.
--->
-<!ELEMENT javascript (#PCDATA)>
-
-
-<!--
- The "constant" element defines a static value that can be used as
- replacement parameters within "field" elements. The "constant-name" and
- "constant-value" elements define the constant's reference id and replacement
- value.
--->
-<!ELEMENT constant (constant-name, constant-value)>
-<!ELEMENT constant-name (#PCDATA)>
-<!ELEMENT constant-value (#PCDATA)>
-
-
-<!--
- The "formset" element defines a set of forms for a locale. Formsets for
- specific locales can override only those fields that change. The
- localization is properly scoped, so that a formset can override just the
- language, or just the country, or both.
--->
-<!ELEMENT formset (constant*, form*)>
-<!ATTLIST formset language CDATA #IMPLIED>
-<!ATTLIST formset country CDATA #IMPLIED>
-<!ATTLIST formset variant CDATA #IMPLIED>
-
-
-<!--
- The "form" element defines a set of fields to be validated. The name
- corresponds to the identifier the application assigns to the form.
--->
-<!ELEMENT form (field*)>
-<!ATTLIST form name CDATA #REQUIRED
- extends CDATA #IMPLIED>
-
-
-
-<!--
- The "field" element defines the properties to be validated. In a
- web application, a field would also correspond to a control on
- a HTML form. To validate the properties, the validator works through
- a JavaBean representation. The field element accepts these
- attributes:
-
- property The property on the JavaBean corresponding to this
- field element.
-
- depends The comma-delimited list of validators to apply against
- this field. For the field to succeed, all the
- validators must succeed.
-
- page The JavaBean corresponding to this form may include
- a page property. Only fields with a "page" attribute
- value that is equal to or less than the page property
- on the form JavaBean are processed. This is useful when
- using a "wizard" approach to completing a large form,
- to ensure that a page is not skipped.
- [0]
-
- indexedListProperty
- The "indexedListProperty" is the method name that will
- return an array or a Collection used to retrieve the
- list and then loop through the list performing the
- validations for this field.
-
--->
-<!ELEMENT field (msg|arg|arg0|arg1|arg2|arg3|var)*>
-<!ATTLIST field property CDATA #REQUIRED>
-<!ATTLIST field depends CDATA #IMPLIED>
-<!ATTLIST field page CDATA #IMPLIED>
-<!ATTLIST field indexedListProperty CDATA #IMPLIED>
-
-
-<!--
- The "msg" element defines a custom message key to use when one of the
- validators for this field fails. Each validator has a default message
- property that is used when a corresponding field msg is not specified.
- Each validator applied to a field may have its own msg element.
- The msg element accepts these attributes.
-
- name The name of the validator corresponding to this msg.
-
- bundle The resource bundle name that the key should be resolved in.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
--->
-<!ELEMENT msg EMPTY>
-<!ATTLIST msg key CDATA #REQUIRED>
-<!ATTLIST msg name CDATA #REQUIRED>
-<!ATTLIST msg bundle CDATA #IMPLIED>
-<!ATTLIST msg resource CDATA #IMPLIED>
-
-
-
-<!--
- The "arg" element defines a replacement value to use with the
- message template for this validator or this field.
- The arg element accepts these attributes.
-
- name The name of the validator corresponding to this msg.
- If not supplied, this argument will be used in the given
- position for every validator.
-
- bundle The resource bundle name that the key should be resolved in.
-
- key The key that will return the message template from a
- resource bundle.
-
- resource If set to "false", the key is taken to be a literal
- value rather than a bundle key.
- [true]
-
- position The position of this replacement parameter in the message.
- For example, position="0" will set the first argument.
- [0]
--->
-<!ELEMENT arg EMPTY>
-<!ATTLIST arg key CDATA #REQUIRED>
-<!ATTLIST arg bundle CDATA #IMPLIED>
-<!ATTLIST arg name CDATA #IMPLIED>
-<!ATTLIST arg resource CDATA #IMPLIED>
-<!ATTLIST arg position CDATA #IMPLIED>
-
-<!--
- The "var" element can set parameters that a field may need to pass to
- one of its validators, such as the minimum and maximum values in a
- range validation. These parameters may also be referenced by one of the
- arg? elements using a shell syntax: ${var:var-name}.
--->
-<!ELEMENT var (var-name, var-value, var-jstype?)>
-
-
-
-<!--
- The name of the var parameter to provide to a field's validators.
--->
-<!ELEMENT var-name (#PCDATA)>
-
-
-
-<!--
- The value of the var parameter to provide to a field's validators.
--->
-<!ELEMENT var-value (#PCDATA)>
-
-<!--
- The java script type, Possible Values [int| string | regexp]
-
--->
-<!ELEMENT var-jstype (#PCDATA)>
-
17 years, 3 months
JBoss Tools SVN: r2570 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors: parts and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-07-20 13:23:26 -0400 (Fri, 20 Jul 2007)
New Revision: 2570
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/TitleLabel.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java
Log:
http://jira.jboss.com/jira/browse/EXIN-365
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/TitleLabel.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/TitleLabel.java 2007-07-20 17:21:10 UTC (rev 2569)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/figures/TitleLabel.java 2007-07-20 17:23:26 UTC (rev 2570)
@@ -41,5 +41,6 @@
public void setHiden(boolean hiden) {
this.hiden = hiden;
+ repaint();
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-20 17:21:10 UTC (rev 2569)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-20 17:23:26 UTC (rev 2570)
@@ -23,6 +23,7 @@
import org.eclipse.swt.graphics.RGB;
import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.Table;
+import org.jboss.tools.hibernate.ui.veditor.editors.figures.ComponentFigure;
import org.jboss.tools.hibernate.ui.veditor.editors.figures.TitleLabel;
import org.jboss.tools.hibernate.ui.veditor.editors.figures.TopLineBorder;
import org.jboss.tools.hibernate.ui.veditor.editors.model.ComponentShape;
@@ -71,6 +72,7 @@
referenceList.add((OrmShape)getCastedModel().getParent());
refreshReference((ExpandeableShape)getCastedModel(), ((ExpandeableShape)getCastedModel()).isReferenceVisible());
+ ((TitleLabel)getFigure()).setHiden(!((ExpandeableShape)getCastedModel()).isReferenceVisible());
// ((IFigure)getFigure().getChildren().get(0)).setBackgroundColor(getSelectionColor());
// ((IFigure)getFigure().getChildren().get(0)).setForegroundColor(ResourceManager.getInstance().getColor(new RGB(255,255,255)));
} else {
17 years, 3 months
JBoss Tools SVN: r2569 - trunk/shale/plugins/org.jboss.tools.shale/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-20 13:21:10 -0400 (Fri, 20 Jul 2007)
New Revision: 2569
Removed:
trunk/shale/plugins/org.jboss.tools.shale/resources/meta/shale-clay-config_1_0.dtd
trunk/shale/plugins/org.jboss.tools.shale/resources/meta/shale-dialog-config_1_0.dtd
trunk/shale/plugins/org.jboss.tools.shale/resources/meta/spring-beans.dtd
Log:
EXIN-86 Third party dtds and schemas removed
Deleted: trunk/shale/plugins/org.jboss.tools.shale/resources/meta/shale-clay-config_1_0.dtd
===================================================================
--- trunk/shale/plugins/org.jboss.tools.shale/resources/meta/shale-clay-config_1_0.dtd 2007-07-20 17:19:09 UTC (rev 2568)
+++ trunk/shale/plugins/org.jboss.tools.shale/resources/meta/shale-clay-config_1_0.dtd 2007-07-20 17:21:10 UTC (rev 2569)
@@ -1,283 +0,0 @@
-<?xml version='1.0' encoding="UTF-8"?>
-
-
-<!--
-
- Copyright 2004-2005 The Apache Software Foundation.
-
- Licensed 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.
-
- $Id: shale-clay-config_1_0.dtd,v 1.1 2005/12/23 14:01:34 glory Exp $
-
--->
-
-<!--
-
- DTD for view definitions used by the "org.apache.shale.clay" package.
- To support validation of your configuration file, include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE view PUBLIC
- "-//Apache Software Foundation//DTD Shale Clay View Configuration 1.0//EN"
- "http://struts.apache.org/dtds/shale-clay-config_1_0.dtd">
-
--->
-
-<!--
- The BindingType enumeration defines how Expression Language (EL) binding is
- handled.
- VB - Use Value Binding
- MB - Use Method Binding
- None - No use of EL. The value passes through
- Early - EL evaluated before setting the component property/attribute.
--->
-<!ENTITY % BindingType "(VB|MB|None|Early)">
-
-
-<!--Boolean enumeration as two values that correspond to a boolean primitive data type-->
-<!ENTITY % Boolean "(true|false)">
-
-<!--
- The "attributes" node contains all of the attributes that will be applied to the
- the target "component" or "element". Individual attributes are specified using the
- "set" node, a child element.
-
- When using JSF/JSP tags to define composition, the attributes are specified in the body
- of the begining JSP tag. In clay, all components are represented generically by a top-level
- "component" or nested "element" node. The attributes are declared using the
- "attributes" node verses a unique tag for each specific type of component.
--->
-<!ELEMENT attributes (set+)>
-
-<!--
-The "symbols" node contains tokens that are replaced within meta-data attribute values.
-The symbol token identifier is the at, '@', character. The scope of the symbols is the
-"component" or "element" they are applied to. This includes all aggregated definitions.
-This means that symbols can also inherited from an outer scope. The bindingType
-attribute in the "set" node is ignored for the symbols collection.
--->
-
-<!ELEMENT symbols (set+)>
-
-<!--
- The "set" node represents an individual meta attribute that should be applied to the "component"
- or "element" nodes.
-
- name - The attribute name that corresponds to a component property. The parent "attributes" node
- container can be inherited. The "name" attribute acts as the "method signature" when
- resolving inheritance.
-
- bindingType - This attribute is of BindingType. It indicates the contract that a component
- property/attribute has with the proper use of EL. This attribute is only valid within
- the attributes collection.
-
- value - This attribute holds the value of the named attribute. A literal string value or a dynamic bound
- expression.
--->
-<!ELEMENT set EMPTY>
-<!ATTLIST set
- name CDATA #REQUIRED
- bindingType %BindingType; #IMPLIED
- value CDATA #IMPLIED
->
-
-<!--
- A "component" represents a single top-level simple component or a subtree of components.
-
- attributes - A container to hold attributes that will be applied to the target component.
-
- symbols - A container to hold tokens that are replaced within attribute values.
-
- converter - A component can have a single converter which is the same relationship that
- a JSF component would have to a Converter. JSF has a assumed rule that only components
- implementing the ValueHolder interfaces can be assigned converters. This rule is enforced
- at runtime and not through this document type definition.
-
- validator - A component can have zero or many associated validators. Only components that
- implement the EditableValueHolder interfaces can be assigned validators. This rule
- is enforced at runtime and not through this document type definition.
-
- actionListener - A component can have zero or many assigned actionListeners. Action listeners
- can only be assigned to components implementing the ActionSource interfaces. This rule is
- enforced at runtime.
-
- valueChangeListener - A component can have zero or many assigned valueChangeListeners. Change listeners
- can only be assigned to components implementing the EditableValueHolder interfaces. This rule is
- enforced at runtime.
-
-
- element - A top-level "component" can contain any number of sub "elements". Elements define
- composition for a complex component. The element is the glue that pulls in a "top-level"
- component. The element is kind of like an inner class in that it can extend the attributes
- of the "top-level" component that it's aggregating.
-
-
- jsfid - A unique identifier defining the component instances as it relates to the
- componentType. This is a required attribute.
-
- extends - A jsfid that this component will inherit characteristics from. A jsfid that this
- component will inherit characteristics from. By characteristics we mean parent "elements"
- and "attributes". This is an optional attribute.
-
- componentType - The component type will be the JSF registered logical name for Components,
- Validators and Converters in the faces-config.xml file. For ActionListeners and
- ValueChangeListeners, the component type will be the fully qualified class name. The
- componentType will be required when the extends attribute is not specified. If the
- extends attribute is specified it will inherit the attribute value from the parent
- component. It can also override a extended component's type morphing it into
- another type of component.
-
- allowBody - This attribute only applies when using the Clay template features and it
- is optional. A "true" value is returned if the HTML child nodes under the node that
- this meta component is bound to should be rendered; otherwise, a "false" value is
- returned indicating the child nodes should be ignored. This feature allows you to
- override design-time mockup HTML at runtime.
-
- facetName - Use this attribute to register the component in the facets collection rather
- than the children collection.
-
--->
-<!ELEMENT component (attributes?, symbols?, converter?, validator*, actionListener*, valueChangeListener*, element*)>
-<!ATTLIST component jsfid CDATA #REQUIRED
- extends CDATA #IMPLIED
- componentType CDATA #IMPLIED
- id CDATA #IMPLIED
- allowBody %Boolean; #IMPLIED
- facetName CDATA #IMPLIED
->
-
-<!--
- The element nodes are the composition glue. The jsfid represents the top-level component that
- the nested component will extend. The jsfid is used in the element like the componentType is
- to the "component". The renderId is the unique namespace within the owning "component" or "element".
- The key difference between an element and component is that a component can be reused within
- any number of compositions where an element is the structure for defining the composition.
-
- attributes - A container to hold attributes that will be applied to the target component. These
- attributes will override and extend attributes in the top-level component which is specified
- by the "jsfid" attribute.
-
- symbols - A container to hold tokens that are replaced within attribute values.
-
- converter - A component can have a single converter which is the same relationship that
- a JSF component would have to a Converter. JSF has a assumed rule that only components
- implementing the ValueHolder interfaces can be assigned converters. This rule is enforced
- at runtime and not through this document type definition.
-
- validator - A component can have zero or many associated validators. Only components that
- implement the EditableValueHolder interfaces can be assigned validators. This rule
- is enforced at runtime and not through this document type definition.
-
- actionListener - A component can have zero or many assigned actionListeners. Action listeners
- can only be assigned to components implementing the ActionSource interfaces. This rule is
- enforced at runtime.
-
- valueChangeListener - A component can have zero or many assigned valueChangeListeners. Change listeners
- can only be assigned to components implementing the EditableValueHolder interfaces. This rule is
- enforced at runtime.
-
- element - A "element" can contain any number of sub-elements. Elements define
- composition for a complex component. The element is the glue that pulls in a "top-level"
- component. The element is kind of like an inner class in that it can extend the attributes
- of the "top-level" component that it's aggregating.
-
- renderId - A numeric integer value that uniquely defines the element within a owning "component"
- or "element". It's the "method signature" used to resolve inheritances and also ordering
- within the parent. A component that extends another can override or add nested "element"s
- by renderId.
-
- id - This attribute corresponds to a JSF component's id attribute that will be used to derive
- the client id value within the HTML id attribute.
-
- facetName - Use this attribute to register the component in the facets collection rather
- than the children collection.
-
- componentType - The component type will be the JSF registered logical name for Components,
- Validators and Converters in the faces-config.xml file. For ActionListeners and
- ValueChangeListeners, the component type will be the fully qualified class name. The
- componentType will be required when the extends attribute is not specified. If the
- extends attribute is specified it will inherit the attribute value from the parent
- component. It can also override a extended component's type morphing it into
- another type of component.
-
--->
-<!ELEMENT element (attributes?, symbols?, converter?, validator*, actionListener*, valueChangeListener*, element*)>
-<!ATTLIST element
- renderId CDATA #REQUIRED
- jsfid CDATA #REQUIRED
- id CDATA #IMPLIED
- facetName CDATA #IMPLIED
- componentType CDATA #IMPLIED
->
-
-<!--
- A "converter" node is the meta component definition for a JSF converter. This
- node can exist under a "component" or "element" node. A converter can only be
- assigned to a JSF component implementing the ValueHolder interfaces.
-
- jsfid - The top-level component that defines a converter. The componentType
- attribute of this component will should be a converter-id registered in
- the faces-config.xml file.
--->
-<!ELEMENT converter (attributes?)>
-<!ATTLIST converter jsfid CDATA #REQUIRED>
-
-<!--
- A "actionListener" node is the meta component definition for a JSF action listener. This
- node can exist under a "component" or "element" node. A action listener can only be
- assigned to a JSF component implementing the ActionSource interfaces.
-
- jsfid - The top-level component that defines a converter. The componentType
- attribute of this component will should be a fully qualified class name
- of the java class implementing the ActionListener interfaces.
--->
-<!ELEMENT actionListener (attributes?)>
-<!ATTLIST actionListener jsfid CDATA #REQUIRED>
-
-<!--
- A "validator" node is the meta component definition for a JSF validator. This
- node can exist under a "component" or "element" node. A converter can only be
- assigned to a JSF component implementing the EditableValueHolder interfaces.
-
- jsfid - The top-level component that defines a validator. The componentType
- attribute of this component will should be a validator-id registered in
- the faces-config.xml file.
--->
-<!ELEMENT validator (attributes?)>
-<!ATTLIST validator jsfid CDATA #REQUIRED>
-
-<!--
- A "valueChangeListener" node is the meta component definition for a JSF value change listener.
- This node can exist under a "component" or "element" node. A value change listener can only be
- assigned to a JSF component implementing the EditableValueHolder interfaces.
-
- jsfid - The top-level component that defines a value change listener. The componentType
- attribute of this component will should be a fully qualified class name
- of the java class implementing the ValueChangeListener interfaces.
--->
-<!ELEMENT valueChangeListener (attributes?)>
-<!ATTLIST valueChangeListener jsfid CDATA #REQUIRED>
-
-<!--
- The "view" node is the root of the document. This document holds meta data used to
- construct a sub component tree. It's a stand-in for the JSF JSP tags meaning that
- the same information can be represented here using a very generic structure.
-
- component - A top-level meta component definition that can be reused across pages
- and subtree compositions.
-
- A component can be directly included from within a clay component by it's unique
- jsfid or tied to the view composition indirectly by a HTML template where the HTML
- element has a binding jsfid attribute.
--->
-<!ELEMENT view (component*)>
Deleted: trunk/shale/plugins/org.jboss.tools.shale/resources/meta/shale-dialog-config_1_0.dtd
===================================================================
--- trunk/shale/plugins/org.jboss.tools.shale/resources/meta/shale-dialog-config_1_0.dtd 2007-07-20 17:19:09 UTC (rev 2568)
+++ trunk/shale/plugins/org.jboss.tools.shale/resources/meta/shale-dialog-config_1_0.dtd 2007-07-20 17:21:10 UTC (rev 2569)
@@ -1,183 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-
- Copyright 2004-2005 The Apache Software Foundation.
-
- Licensed 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.
-
- $Id: shale-dialog-config_1_0.dtd,v 1.1 2005/12/23 14:01:34 glory Exp $
-
--->
-
-<!--
-
- DTD for dialog definitions used by the "org.apache.shale.dialog" package.
- To support validation of your configuration file, include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE dialogs PUBLIC
- "-//Apache Software Foundation//DTD Shale Dialog Configuration 1.0//EN"
- "http://struts.apache.org/dtds/shale-dialog-config_1_0.dtd">
-
--->
-
-
-<!-- ====================== Top Level Elements ============================= -->
-
-
-<!-- The "dialogs" element is the root of a single configuration file, and
- contains zero or more "dialog" elements defining the states and transitions
- for a particular dialog.
--->
-<!ELEMENT dialogs (dialog*)>
-
-
-<!-- The "dialog" element defines the states for a particular reusable dialog,
- which itself consists of zero or more states (of particular types). The
- following attributes are defined:
-
- className Fully qualified class name of the configuration
- object for this element.
- [org.apache.shale.dialog.impl.DialogImpl]
-
- name Name of this dialog (must be unique among
- all defined dialogs).
-
- start Name of the starting state for this dialog.
--->
-<!ELEMENT dialog ((transition|action|end|subdialog|view)*)>
-<!ATTLIST dialog className CDATA #IMPLIED>
-<!ATTLIST dialog name CDATA #REQUIRED>
-<!ATTLIST dialog start CDATA #REQUIRED>
-
-
-<!-- The "action" element represents an action state, which causes the
- invocation of a public method that takes no arguments, and returns
- the logical outcome as a String. The following attributes are defined:
-
- className Fully qualified class name of the configuration
- object for this element.
- [org.apache.shale.dialog.impl.ActionStateImpl]
-
- name Name of this state (must be unique among
- all states defined for this dialog).
-
- method Method binding expression ("#{...}") that
- identifies a public method that takes no
- arguments, and returns a String that represents
- the logical outcome of this state.
--->
-<!ELEMENT action (transition*)>
-<!ATTLIST action className CDATA #IMPLIED>
-<!ATTLIST action name CDATA #REQUIRED>
-<!ATTLIST action method CDATA #REQUIRED>
-
-
-<!-- The "subdialog" element represents a transition to a subordinate
- dialog, saving the current state in the currently executing dialog
- on a stack. When the subordinate dialog completes, the outcome it
- returns will be used to trigger a transition in this dialog.
- The following attributes are defined:
-
- className Fully qualified class name of the configuration
- object for this element.
- [org.apache.shale.dialog.impl.SubdialogStateImpl]
-
- name Name of this state (must be unique among
- all states defined for this dialog).
-
- dialogName Name of the subordinate dialog to be
- executed.
-
--->
-<!ELEMENT subdialog (transition*)>
-<!ATTLIST subdialog className CDATA #IMPLIED>
-<!ATTLIST subdialog name CDATA #REQUIRED>
-<!ATTLIST subdialog dialogName CDATA #REQUIRED>
-
-
-<!-- The "view" element represents a view state, which causes the rendering
- of the specified JavaServer Faces view. When the subsequent submit from
- this view is returned, the outcome returned by whatever action method was
- invoked is returned in order to determine the next transition. The
- following attributes are defined:
-
- className Fully qualified class name of the configuration
- object for this element.
- [org.apache.shale.dialog.impl.ViewStateImpl]
-
- name Name of this state (must be unique among
- all states defined for this dialog).
-
- viewId View identifier of the JavaServer Faces view
- that should be rendered. The logical outcome
- returned by whatever action handles the
- subsequent submit from this view will be used
- to determine the next state transition.
-
--->
-<!ELEMENT view (transition*)>
-<!ATTLIST view className CDATA #IMPLIED>
-<!ATTLIST view name CDATA #REQUIRED>
-<!ATTLIST view viewId CDATA #REQUIRED>
-
-
-<!-- The "end" element represents a state that terminates a dialog. If
- a view identifier is specified, it is rendered; otherwise, it is assumed
- that a parent dialog which invoked the current dialog will be responsible
- for producing the view for the current response.
-
- className Fully qualified class name of the configuration
- object for this element.
- [org.apache.shale.dialog.impl.EndStateImpl]
-
- name Name of this state (must be unique among
- all states defined for this dialog).
-
- viewId View identifier of the JavaServer Faces view
- that should be rendered (if any). The logical
- outcome returned by whatever action handles the
- subsequent submit from this view will be
- returned to the parent dialog to drive its
- own state transition.
--->
-<!ELEMENT end (transition*)>
-<!ATTLIST end className CDATA #IMPLIED>
-<!ATTLIST end name CDATA #REQUIRED>
-<!ATTLIST end viewId CDATA #IMPLIED>
-
-
-<!-- The "transition" element represents a state transition from the current
- state (in which this "transition" element is nested) to a subsequent
- state. The following attributes are defined:
-
- className Fully qualified class name of the configuration
- object for this element.
- [org.apache.shale.dialog.impl.TransitionImpl]
-
- outcome Logical outcome String returned by the invoked
- method (for an "action" element), or by the
- invoked action's action method (for a "view"
- element).
-
- target State name of the state to which control should
- be transitioned. Must match the "name"
- attribute of a state defined in this dialog.
--->
-
-<!ELEMENT transition EMPTY>
-<!ATTLIST transition className CDATA #IMPLIED>
-<!ATTLIST transition outcome CDATA #REQUIRED>
-<!ATTLIST transition target CDATA #REQUIRED>
-
Deleted: trunk/shale/plugins/org.jboss.tools.shale/resources/meta/spring-beans.dtd
===================================================================
--- trunk/shale/plugins/org.jboss.tools.shale/resources/meta/spring-beans.dtd 2007-07-20 17:19:09 UTC (rev 2568)
+++ trunk/shale/plugins/org.jboss.tools.shale/resources/meta/spring-beans.dtd 2007-07-20 17:21:10 UTC (rev 2569)
@@ -1,587 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Spring XML Beans DTD
- Authors: Rod Johnson, Juergen Hoeller, Alef Arendsen, Colin Sampaleanu
-
- This defines a simple and consistent way of creating a namespace
- of JavaBeans objects, managed by a Spring BeanFactory, read by
- XmlBeanDefinitionReader (with DefaultXmlBeanDefinitionParser).
-
- This document type is used by most Spring functionality, including
- web application contexts, which are based on bean factories.
-
- Each "bean" element in this document defines a JavaBean.
- Typically the bean class is specified, along with JavaBean properties
- and/or constructor arguments.
-
- Bean instances can be "singletons" (shared instances) or "prototypes"
- (independent instances). Further scopes are supposed to be built on top
- of the core BeanFactory infrastructure and are therefore not part of it.
-
- References among beans are supported, i.e. setting a JavaBean property
- or a constructor argument to refer to another bean in the same factory
- (or an ancestor factory).
-
- As alternative to bean references, "inner bean definitions" can be used.
- Singleton flags of such inner bean definitions are effectively ignored:
- Inner beans are typically anonymous prototypes.
-
- There is also support for lists, sets, maps, and java.util.Properties
- as bean property types or constructor argument types.
-
- As the format is simple, a DTD is sufficient, and there's no need
- for a schema at this point.
-
- XML documents that conform to this DTD should declare the following doctype:
-
- <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
- "http://www.springframework.org/dtd/spring-beans.dtd">
--->
-
-
-<!--
- The document root. A document can contain bean definitions only,
- imports only, or a mixture of both (typically with imports first).
--->
-<!ELEMENT beans (
- description?,
- (import | alias | bean)*
-)>
-
-<!--
- Default values for all bean definitions. Can be overridden at
- the "bean" level. See those attribute definitions for details.
--->
-<!ATTLIST beans default-lazy-init (true | false) "false">
-<!ATTLIST beans default-dependency-check (none | objects | simple | all) "none">
-<!ATTLIST beans default-autowire (no | byName | byType | constructor | autodetect) "no">
-
-<!--
- Element containing informative text describing the purpose of the enclosing
- element. Always optional.
- Used primarily for user documentation of XML bean definition documents.
--->
-<!ELEMENT description (#PCDATA)>
-
-
-<!--
- Specifies an XML bean definition resource to import.
--->
-<!ELEMENT import EMPTY>
-
-<!--
- The relative resource location of the XML bean definition file to import,
- for example "myImport.xml" or "includes/myImport.xml" or "../myImport.xml".
--->
-<!ATTLIST import resource CDATA #REQUIRED>
-
-
-<!--
- Defines an alias for a bean, which can reside in a different definition file.
--->
-<!ELEMENT alias EMPTY>
-
-<!--
- The name of the bean to define an alias for.
--->
-<!ATTLIST alias name CDATA #REQUIRED>
-
-<!--
- The alias name to define for the bean.
--->
-<!ATTLIST alias alias CDATA #REQUIRED>
-
-
-<!--
- Defines a single (usually named) bean.
-
- A bean definition may contain nested tags for constructor arguments,
- property values, lookup methods, and replaced methods. Mixing constructor
- injection and setter injection on the same bean is explicitly supported.
--->
-<!ELEMENT bean (
- description?,
- (constructor-arg | property | lookup-method | replaced-method)*
-)>
-
-<!--
- Beans can be identified by an id, to enable reference checking.
-
- There are constraints on a valid XML id: if you want to reference your bean
- in Java code using a name that's illegal as an XML id, use the optional
- "name" attribute. If neither is given, the bean class name is used as id
- (with an appended counter like "#2" if there is already a bean with that name).
--->
-<!ATTLIST bean id ID #IMPLIED>
-
-<!--
- Optional. Can be used to create one or more aliases illegal in an id.
- Multiple aliases can be separated by any number of spaces or commas.
--->
-<!ATTLIST bean name CDATA #IMPLIED>
-
-<!--
- Each bean definition must specify the fully qualified name of the class,
- except if it pure serves as parent for child bean definitions.
--->
-<!ATTLIST bean class CDATA #IMPLIED>
-
-<!--
- Optionally specify a parent bean definition.
-
- Will use the bean class of the parent if none specified, but can
- also override it. In the latter case, the child bean class must be
- compatible with the parent, i.e. accept the parent's property values
- and constructor argument values, if any.
-
- A child bean definition will inherit constructor argument values,
- property values and method overrides from the parent, with the option
- to add new values. If init method, destroy method, factory bean and/or factory
- method are specified, they will override the corresponding parent settings.
-
- The remaining settings will always be taken from the child definition:
- depends on, autowire mode, dependency check, singleton, lazy init.
--->
-<!ATTLIST bean parent CDATA #IMPLIED>
-
-<!--
- Is this bean "abstract", i.e. not meant to be instantiated itself but
- rather just serving as parent for concrete child bean definitions.
- Default is false. Specify true to tell the bean factory to not try to
- instantiate that particular bean in any case.
--->
-<!ATTLIST bean abstract (true | false) "false">
-
-<!--
- Is this bean a "singleton" (one shared instance, which will
- be returned by all calls to getBean() with the id),
- or a "prototype" (independent instance resulting from each call to
- getBean(). Default is singleton.
-
- Singletons are most commonly used, and are ideal for multi-threaded
- service objects.
--->
-<!ATTLIST bean singleton (true | false) "true">
-
-<!--
- If this bean should be lazily initialized.
- If false, it will get instantiated on startup by bean factories
- that perform eager initialization of singletons.
--->
-<!ATTLIST bean lazy-init (true | false | default) "default">
-
-<!--
- Optional attribute controlling whether to "autowire" bean properties.
- This is an automagical process in which bean references don't need to be coded
- explicitly in the XML bean definition file, but Spring works out dependencies.
-
- There are 5 modes:
-
- 1. "no"
- The traditional Spring default. No automagical wiring. Bean references
- must be defined in the XML file via the <ref> element. We recommend this
- in most cases as it makes documentation more explicit.
-
- 2. "byName"
- Autowiring by property name. If a bean of class Cat exposes a dog property,
- Spring will try to set this to the value of the bean "dog" in the current factory.
- If there is no matching bean by name, nothing special happens;
- use dependency-check="objects" to raise an error in that case.
-
- 3. "byType"
- Autowiring if there is exactly one bean of the property type in the bean factory.
- If there is more than one, a fatal error is raised, and you can't use byType
- autowiring for that bean. If there is none, nothing special happens;
- use dependency-check="objects" to raise an error in that case.
-
- 4. "constructor"
- Analogous to "byType" for constructor arguments. If there isn't exactly one bean
- of the constructor argument type in the bean factory, a fatal error is raised.
-
- 5. "autodetect"
- Chooses "constructor" or "byType" through introspection of the bean class.
- If a default constructor is found, "byType" gets applied.
-
- The latter two are similar to PicoContainer and make bean factories simple to
- configure for small namespaces, but doesn't work as well as standard Spring
- behaviour for bigger applications.
-
- Note that explicit dependencies, i.e. "property" and "constructor-arg" elements,
- always override autowiring. Autowire behaviour can be combined with dependency
- checking, which will be performed after all autowiring has been completed.
--->
-<!ATTLIST bean autowire (no | byName | byType | constructor | autodetect | default) "default">
-
-<!--
- Optional attribute controlling whether to check whether all this
- beans dependencies, expressed in its properties, are satisfied.
- Default is no dependency checking.
-
- "simple" type dependency checking includes primitives and String
- "object" includes collaborators (other beans in the factory)
- "all" includes both types of dependency checking
--->
-<!ATTLIST bean dependency-check (none | objects | simple | all | default) "default">
-
-<!--
- The names of the beans that this bean depends on being initialized.
- The bean factory will guarantee that these beans get initialized before.
-
- Note that dependencies are normally expressed through bean properties or
- constructor arguments. This property should just be necessary for other kinds
- of dependencies like statics (*ugh*) or database preparation on startup.
--->
-<!ATTLIST bean depends-on CDATA #IMPLIED>
-
-<!--
- Optional attribute for the name of the custom initialization method
- to invoke after setting bean properties. The method must have no arguments,
- but may throw any exception.
--->
-<!ATTLIST bean init-method CDATA #IMPLIED>
-
-<!--
- Optional attribute for the name of the custom destroy method to invoke
- on bean factory shutdown. The method must have no arguments,
- but may throw any exception. Note: Only invoked on singleton beans!
--->
-<!ATTLIST bean destroy-method CDATA #IMPLIED>
-
-<!--
- Optional attribute specifying the name of a factory method to use to
- create this object. Use constructor-arg elements to specify arguments
- to the factory method, if it takes arguments. Autowiring does not apply
- to factory methods.
-
- If the "class" attribute is present, the factory method will be a static
- method on the class specified by the "class" attribute on this bean
- definition. Often this will be the same class as that of the constructed
- object - for example, when the factory method is used as an alternative
- to a constructor. However, it may be on a different class. In that case,
- the created object will *not* be of the class specified in the "class"
- attribute. This is analogous to FactoryBean behavior.
-
- If the "factory-bean" attribute is present, the "class" attribute is not
- used, and the factory method will be an instance method on the object
- returned from a getBean call with the specified bean name. The factory
- bean may be defined as a singleton or a prototype.
-
- The factory method can have any number of arguments. Autowiring is not
- supported. Use indexed constructor-arg elements in conjunction with the
- factory-method attribute.
-
- Setter Injection can be used in conjunction with a factory method.
- Method Injection cannot, as the factory method returns an instance,
- which will be used when the container creates the bean.
--->
-<!ATTLIST bean factory-method CDATA #IMPLIED>
-
-<!--
- Alternative to class attribute for factory-method usage.
- If this is specified, no class attribute should be used.
- This should be set to the name of a bean in the current or
- ancestor factories that contains the relevant factory method.
- This allows the factory itself to be configured using Dependency
- Injection, and an instance (rather than static) method to be used.
--->
-<!ATTLIST bean factory-bean CDATA #IMPLIED>
-
-
-<!--
- Bean definitions can specify zero or more constructor arguments.
- This is an alternative to "autowire constructor".
- Arguments correspond to either a specific index of the constructor argument
- list or are supposed to be matched generically by type.
-
- Note: A single generic argument value will just be used once, rather than
- potentially matched multiple times (as of Spring 1.1).
-
- constructor-arg elements are also used in conjunction with the factory-method
- element to construct beans using static or instance factory methods.
--->
-<!ELEMENT constructor-arg (
- description?,
- (bean | ref | idref | value | null | list | set | map | props)?
-)>
-
-<!--
- The constructor-arg tag can have an optional index attribute,
- to specify the exact index in the constructor argument list. Only needed
- to avoid ambiguities, e.g. in case of 2 arguments of the same type.
--->
-<!ATTLIST constructor-arg index CDATA #IMPLIED>
-
-<!--
- The constructor-arg tag can have an optional type attribute,
- to specify the exact type of the constructor argument. Only needed
- to avoid ambiguities, e.g. in case of 2 single argument constructors
- that can both be converted from a String.
--->
-<!ATTLIST constructor-arg type CDATA #IMPLIED>
-
-<!--
- A short-cut alternative to a child element "ref bean=".
--->
-<!ATTLIST constructor-arg ref CDATA #IMPLIED>
-
-<!--
- A short-cut alternative to a child element "value".
--->
-<!ATTLIST constructor-arg value CDATA #IMPLIED>
-
-
-<!--
- Bean definitions can have zero or more properties.
- Property elements correspond to JavaBean setter methods exposed
- by the bean classes. Spring supports primitives, references to other
- beans in the same or related factories, lists, maps and properties.
--->
-<!ELEMENT property (
- description?,
- (bean | ref | idref | value | null | list | set | map | props)?
-)>
-
-<!--
- The property name attribute is the name of the JavaBean property.
- This follows JavaBean conventions: a name of "age" would correspond
- to setAge()/optional getAge() methods.
--->
-<!ATTLIST property name CDATA #REQUIRED>
-
-<!--
- A short-cut alternative to a child element "ref bean=".
--->
-<!ATTLIST property ref CDATA #IMPLIED>
-
-<!--
- A short-cut alternative to a child element "value".
--->
-<!ATTLIST property value CDATA #IMPLIED>
-
-
-<!--
- A lookup method causes the IoC container to override the given method and return
- the bean with the name given in the bean attribute. This is a form of Method Injection.
- It's particularly useful as an alternative to implementing the BeanFactoryAware
- interface, in order to be able to make getBean() calls for non-singleton instances
- at runtime. In this case, Method Injection is a less invasive alternative.
--->
-<!ELEMENT lookup-method EMPTY>
-
-<!--
- Name of a lookup method. This method should take no arguments.
--->
-<!ATTLIST lookup-method name CDATA #IMPLIED>
-
-<!--
- Name of the bean in the current or ancestor factories that the lookup method
- should resolve to. Often this bean will be a prototype, in which case the
- lookup method will return a distinct instance on every invocation. This
- is useful for single-threaded objects.
--->
-<!ATTLIST lookup-method bean CDATA #IMPLIED>
-
-
-<!--
- Similar to the lookup method mechanism, the replaced-method element is used to control
- IoC container method overriding: Method Injection. This mechanism allows the overriding
- of a method with arbitrary code.
--->
-<!ELEMENT replaced-method (
- (arg-type)*
-)>
-
-<!--
- Name of the method whose implementation should be replaced by the IoC container.
- If this method is not overloaded, there's no need to use arg-type subelements.
- If this method is overloaded, arg-type subelements must be used for all
- override definitions for the method.
--->
-<!ATTLIST replaced-method name CDATA #IMPLIED>
-
-<!--
- Bean name of an implementation of the MethodReplacer interface
- in the current or ancestor factories. This may be a singleton or prototype
- bean. If it's a prototype, a new instance will be used for each method replacement.
- Singleton usage is the norm.
--->
-<!ATTLIST replaced-method replacer CDATA #IMPLIED>
-
-<!--
- Subelement of replaced-method identifying an argument for a replaced method
- in the event of method overloading.
--->
-<!ELEMENT arg-type (#PCDATA)>
-
-<!--
- Specification of the type of an overloaded method argument as a String.
- For convenience, this may be a substring of the FQN. E.g. all the
- following would match "java.lang.String":
- - java.lang.String
- - String
- - Str
-
- As the number of arguments will be checked also, this convenience can often
- be used to save typing.
--->
-<!ATTLIST arg-type match CDATA #IMPLIED>
-
-
-<!--
- Defines a reference to another bean in this factory or an external
- factory (parent or included factory).
--->
-<!ELEMENT ref EMPTY>
-
-<!--
- References must specify a name of the target bean.
- The "bean" attribute can reference any name from any bean in the context,
- to be checked at runtime.
- Local references, using the "local" attribute, have to use bean ids;
- they can be checked by this DTD, thus should be preferred for references
- within the same bean factory XML file.
--->
-<!ATTLIST ref bean CDATA #IMPLIED>
-<!ATTLIST ref local IDREF #IMPLIED>
-<!ATTLIST ref parent CDATA #IMPLIED>
-
-
-<!--
- Defines a string property value, which must also be the id of another
- bean in this factory or an external factory (parent or included factory).
- While a regular 'value' element could instead be used for the same effect,
- using idref in this case allows validation of local bean ids by the xml
- parser, and name completion by helper tools.
--->
-<!ELEMENT idref EMPTY>
-
-<!--
- ID refs must specify a name of the target bean.
- The "bean" attribute can reference any name from any bean in the context,
- potentially to be checked at runtime by bean factory implementations.
- Local references, using the "local" attribute, have to use bean ids;
- they can be checked by this DTD, thus should be preferred for references
- within the same bean factory XML file.
--->
-<!ATTLIST idref bean CDATA #IMPLIED>
-<!ATTLIST idref local IDREF #IMPLIED>
-
-
-<!--
- Contains a string representation of a property value.
- The property may be a string, or may be converted to the
- required type using the JavaBeans PropertyEditor
- machinery. This makes it possible for application developers
- to write custom PropertyEditor implementations that can
- convert strings to objects.
-
- Note that this is recommended for simple objects only.
- Configure more complex objects by populating JavaBean
- properties with references to other beans.
--->
-<!ELEMENT value (#PCDATA)>
-
-<!--
- The value tag can have an optional type attribute, to specify the
- exact type that the value should be converted to. Only needed
- if the type of the target property or constructor argument is
- too generic: for example, in case of a collection element.
--->
-<!ATTLIST value type CDATA #IMPLIED>
-
-<!--
- Denotes a Java null value. Necessary because an empty "value" tag
- will resolve to an empty String, which will not be resolved to a
- null value unless a special PropertyEditor does so.
--->
-<!ELEMENT null (#PCDATA)>
-
-
-<!--
- A list can contain multiple inner bean, ref, collection, or value elements.
- Java lists are untyped, pending generics support in Java 1.5,
- although references will be strongly typed.
- A list can also map to an array type. The necessary conversion
- is automatically performed by the BeanFactory.
--->
-<!ELEMENT list (
- (bean | ref | idref | value | null | list | set | map | props)*
-)>
-
-<!--
- A set can contain multiple inner bean, ref, collection, or value elements.
- Java sets are untyped, pending generics support in Java 1.5,
- although references will be strongly typed.
--->
-<!ELEMENT set (
- (bean | ref | idref | value | null | list | set | map | props)*
-)>
-
-
-<!--
- A Spring map is a mapping from a string key to object.
- Maps may be empty.
--->
-<!ELEMENT map (
- (entry)*
-)>
-
-<!--
- A map entry can be an inner bean, ref, value, or collection.
- The key of the entry is given by the "key" attribute or child element.
--->
-<!ELEMENT entry (
- key?,
- (bean | ref | idref | value | null | list | set | map | props)?
-)>
-
-<!--
- Each map element must specify its key as attribute or as child element.
- A key attribute is always a String value.
--->
-<!ATTLIST entry key CDATA #IMPLIED>
-
-<!--
- A short-cut alternative to a "key" element with a "ref bean=" child element.
--->
-<!ATTLIST entry key-ref CDATA #IMPLIED>
-
-<!--
- A short-cut alternative to a child element "value".
--->
-<!ATTLIST entry value CDATA #IMPLIED>
-
-<!--
- A short-cut alternative to a child element "ref bean=".
--->
-<!ATTLIST entry value-ref CDATA #IMPLIED>
-
-<!--
- A key element can contain an inner bean, ref, value, or collection.
--->
-<!ELEMENT key (
- (bean | ref | idref | value | null | list | set | map | props)
-)>
-
-
-<!--
- Props elements differ from map elements in that values must be strings.
- Props may be empty.
--->
-<!ELEMENT props (
- (prop)*
-)>
-
-<!--
- Element content is the string value of the property.
- Note that whitespace is trimmed off to avoid unwanted whitespace
- caused by typical XML formatting.
--->
-<!ELEMENT prop (#PCDATA)>
-
-<!--
- Each property element must specify its key.
--->
-<!ATTLIST prop key CDATA #REQUIRED>
-
17 years, 3 months
JBoss Tools SVN: r2567 - in trunk/jsf/plugins/org.jboss.tools.jsf: dtds and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-07-20 13:15:38 -0400 (Fri, 20 Jul 2007)
New Revision: 2567
Removed:
trunk/jsf/plugins/org.jboss.tools.jsf/dtds/web-facesconfig_1_0.dtd
trunk/jsf/plugins/org.jboss.tools.jsf/dtds/web-facesconfig_1_1.dtd
trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_0.dtd
trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_1.dtd
trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_2.xsd
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
Log:
EXIN-86 Third party dtds and schemas removed
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf/dtds/web-facesconfig_1_0.dtd
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/dtds/web-facesconfig_1_0.dtd 2007-07-20 17:14:31 UTC (rev 2566)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/dtds/web-facesconfig_1_0.dtd 2007-07-20 17:15:38 UTC (rev 2567)
@@ -1,879 +0,0 @@
-<!--
- Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
--->
-
-<!--
- DTD for the JavaServer Faces Application Configuration File (Version 1.0)
-
- To support validation of your configuration file(s), include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
-
- $Id: web-facesconfig_1_0.dtd,v 1.1 2004/10/27 16:45:18 xden Exp $
-
--->
-
-
-<!-- ==================== Defined Types =================================== -->
-
-
-<!--
- An "Action" is a String that represents a method binding
- expression that points at a method with no arguments that returns a
- String. It must be bracketed with "#{}", for example,
- "#{cardemo.buyCar}".
--->
-<!ENTITY % Action "CDATA">
-
-
-<!--
- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!--
- An "Identifier" is a string of characters that conforms to the variable
- naming conventions of the Java programming language (JLS Section ?.?.?).
--->
-<!ENTITY % Identifier "CDATA">
-
-
-<!--
- A "JavaType" is either the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element, or
- the name of a Java primitive type (such as int or char). The class name
- or primitive type may optionally be followed by "[]" to indicate that
- the underlying data must be an array, rather than a scalar variable.
--->
-<!ENTITY % JavaType "CDATA">
-
-
-<!--
- A "Language" is a lower case two-letter code for a language as defined
- by ISL-639.
--->
-<!ENTITY % Language "CDATA">
-
-
-<!--
- A "ResourcePath" is the relative or absolute path to a resource file
- (such as a logo image).
--->
-<!ENTITY % ResourcePath "CDATA">
-
-
-<!--
- A "Scope" is the well-known name of a scope in which managed beans may
- optionally be defined to be created in.
--->
-<!ENTITY % Scope "(request|session|application)">
-
-
-
-<!--
- A "ScopeOrNone" element defines the legal values for the
- <managed-bean-scope> element's body content, which includes
- all of the scopes respresented by the "Scope" type, plus the
- "none" value indicating that a created bean should not be
- stored into any scope.
--->
-<!ENTITY % ScopeOrNone "(request|session|application|none)">
-
-
-<!--
- A "ViewIdPattern" is a pattern for matching view identifiers in
- order to determine whether a particular navigation rule should be
- fired. It must contain one of the following values:
-
- - The exact match for a view identifier that is recognized
- by the the ViewHandler implementation being used (such as
- "/index.jsp" if you are using the default ViewHandler).
-
- - A proper prefix of a view identifier, plus a trailing "*"
- character. This pattern indicates that all view identifiers that
- match the portion of the pattern up to the asterisk will match the
- surrounding rule. When more than one match exists, the match with
- the longest pattern is selected.
-
- - An "*" character, which means that this pattern applies to all
- view identifiers.
--->
-<!ENTITY % ViewIdPattern "CDATA">
-
-
-<!-- ==================== Top Level Elements ============================== -->
-
-
-<!--
- The "faces-config" element is the root of the configuration information
- hierarchy, and contains nested elements for all of the other configuration
- settings.
--->
-<!ELEMENT faces-config ((application|factory|component|converter|managed-bean|navigation-rule|referenced-bean|render-kit|lifecycle|validator)*)>
-<!ATTLIST faces-config
- xmlns CDATA #FIXED "http://java.sun.com/JSF/Configuration">
-
-
-
-<!-- ==================== Definition Elements ============================= -->
-
-
-<!--
- The "application" element provides a mechanism to define the various
- per-application-singleton implementation artifacts for a particular web
- application that is utilizing JavaServer Faces. For nested elements
- that are not specified, the JSF implementation must provide a suitable
- default.
--->
-<!ELEMENT application ((action-listener|default-render-kit-id|message-bundle|navigation-handler|view-handler|state-manager|property-resolver|variable-resolver|locale-config)*)>
-
-
-<!--
- The "factory" element provides a mechanism to define the various
- Factories that comprise parts of the implementation of JavaServer
- Faces. For nested elements that are not specified, the JSF
- implementation must provide a suitable default.
--->
-<!ELEMENT factory ((application-factory|faces-context-factory|lifecycle-factory|render-kit-factory)*)>
-
-
-<!--
- The "attribute" element represents a named, typed, value associated with
- the parent UIComponent via the generic attributes mechanism.
-
- Attribute names must be unique within the scope of the parent (or related)
- component.
--->
-<!ELEMENT attribute (description*, display-name*, icon*, attribute-name, attribute-class, default-value?, suggested-value?, attribute-extension*)>
-
-<!--
- Extension element for attribute. May contain implementation
- specific content.
--->
-<!ELEMENT attribute-extension ANY>
-
-
-<!--
- The "component" element represents a concrete UIComponent implementation
- class that should be registered under the specified type identifier,
- along with its associated properties and attributes. Component types must
- be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that are recognized
- by the implementation logic of this component. Nested "property" elements
- identify JavaBeans properties of the component class that may be exposed
- for manipulation via tools.
--->
-<!ELEMENT component (description*, display-name*, icon*, component-type, component-class, attribute*, property*, component-extension*)>
-
-<!--
- Extension element for component. May contain implementation
- specific content.
--->
-<!ELEMENT component-extension ANY>
-
-
-
-<!--
- The "converter" element represents a concrete Converter implementation
- class that should be registered under the specified converter identifier.
- Converter identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Converter. Nested "property" elements identify JavaBeans
- properties of the Converter implementation class that may be configured
- to affect the operation of the Converter.
--->
-<!ELEMENT converter (description*, display-name*, icon*, (converter-id | converter-for-class), converter-class, attribute*, property*)>
-
-
-<!--
- The "icon" element contains "small-icon" and "large-icon" elements that
- specify the resoruce paths for small and large GIF or JPG icon images
- used to represent the parent element in a GUI tool.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon xml:lang %Language; #IMPLIED>
-
-<!--
- The "lifecycle" element provides a mechanism to specify
- modifications to the behaviour of the default Lifecycle
- implementation for this web application.
--->
-<!ELEMENT lifecycle (phase-listener*)>
-
-<!--
- The "locale-config" element allows the app developer to declare the
- supported locales for this application.
--->
-<!ELEMENT locale-config (default-locale?, supported-locale*)>
-
-<!--
- The "managed-bean" element represents a JavaBean, of a particular class,
- that will be dynamically instantiated at runtime (by the default
- VariableResolver implementation) if it is referenced as the first element
- of a value binding expression, and no corresponding bean can be
- identified in any scope. In addition to the creation of the managed bean,
- and the optional storing of it into the specified scope, the nested
- managed-property elements can be used to initialize the contents of
- settable JavaBeans properties of the created instance.
--->
-<!ELEMENT managed-bean (description*, display-name*, icon*, managed-bean-name, managed-bean-class, managed-bean-scope, (managed-property* | map-entries | list-entries))>
-
-
-<!--
- The "managed-property" element represents an individual property of a
- managed bean that will be configured to the specified value (or value set)
- if the corresponding managed bean is automatically created.
--->
-<!ELEMENT managed-property (description*, display-name*, icon*, property-name, property-class?, (map-entries|null-value|value|list-entries))>
-
-
-<!--
- The "map-entry" element reprsents a single key-entry pair that
- will be added to the computed value of a managed property of type
- java.util.Map.
--->
-<!ELEMENT map-entry (key, (null-value|value))>
-
-
-<!--
- The "map-entries' element represents a set of key-entry pairs that
- will be added to the computed value of a managed property of type
- java.util.Map. In addition, the Java class types of the key and entry
- values may be optionally declared.
--->
-<!ELEMENT map-entries (key-class?, value-class?, map-entry*)>
-
-
-<!--
- The base name of a resource bundle representing the message resources
- for this application. See the JavaDocs for the "java.util.ResourceBundle"
- class for more information on the syntax of resource bundle names.
--->
-
-<!ELEMENT message-bundle (#PCDATA)>
-
-
-<!--
- The "navigation-case" element describes a particular combination of
- conditions that must match for this case to be executed, and the
- view id of the component tree that should be selected next.
--->
-<!ELEMENT navigation-case (description*, display-name*, icon*, from-action?, from-outcome?, to-view-id, redirect?)>
-
-
-<!--
- The "navigation-rule" element represents an individual decision rule
- that will be utilized by the default NavigationHandler
- implementation to make decisions on what view should be displayed
- next, based on the view id being processed.
--->
-<!ELEMENT navigation-rule (description*, display-name*, icon*, from-view-id?, navigation-case*)>
-
-
-<!--
- The "property" element represents a JavaBean property of the Java class
- represented by our parent element.
-
- Property names must be unique within the scope of the Java class
- that is represented by the parent element, and must correspond to
- property names that will be recognized when performing introspection
- against that class via java.beans.Introspector.
--->
-<!ELEMENT property (description*, display-name*, icon*, property-name, property-class, default-value?, suggested-value?, property-extension*)>
-
-<!--
- Extension element for property. May contain implementation
- specific content.
--->
-<!ELEMENT property-extension ANY>
-
-<!--
- The "referenced-bean" element represents at design time the promise
- that a Java object of the specified type will exist at runtime in some
- scope, under the specified key. This can be used by design time tools
- to construct user interface dialogs based on the properties of the
- specified class. The presence or absence of a referenced bean
- element has no impact on the JavaServer Faces runtime environment
- inside a web application.
--->
-<!ELEMENT referenced-bean (description*, display-name*, icon*, referenced-bean-name, referenced-bean-class)>
-
-
-<!--
- The "render-kit" element represents a concrete RenderKit implementation
- that should be registered under the specified render-kit-id. If no
- render-kit-id is specified, the identifier of the default RenderKit
- (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
--->
-<!ELEMENT render-kit (description*, display-name*, icon*, render-kit-id?, render-kit-class?, renderer*)>
-
-
-<!--
- The "renderer" element represents a concrete Renderer implementation
- class that should be registered under the specified component family
- and renderer type identifiers, in the RenderKit associated with the
- parent "render-kit" element. Combinations of component family and renderer
- type must be unique within the RenderKit associated with the parent
- "render-kit" element.
-
- Nested "attribute" elements identify generic component attributes that
- are recognized by this renderer.
--->
-<!ELEMENT renderer (description*, display-name*, icon*, component-family, renderer-type, renderer-class, attribute*, renderer-extension*)>
-
-<!--
- Extension element for renderer. May contain implementation
- specific content.
--->
-<!ELEMENT renderer-extension ANY>
-
-<!--
- The "validator" element represents a concrete Validator implementation
- class that should be registered under the specified validator identifier.
- Validator identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Validator. Nested "property" elements identify JavaBeans
- properties of the Validator implementation class that may be configured
- to affect the operation of the Validator.
--->
-<!ELEMENT validator (description*, display-name*, icon*, validator-id, validator-class, attribute*, property*)>
-
-
-<!--
- The "list-entries" element represents a set of initialization
- elements for a managed property that is a java.util.List or an
- array. In the former case, the "value-class" element can optionally
- be used to declare the Java type to which each value should be
- converted before adding it to the Collection.
--->
-<!ELEMENT list-entries (value-class?, (null-value|value)*)>
-
-
-<!-- ==================== Subordinate Elements ============================ -->
-
-
-<!--
- The "action-listener" element contains the fully qualified class name
- of the concrete ActionListener implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle.
- It must be of type "ClassName".
--->
-<!ELEMENT action-listener (#PCDATA)>
-
-<!--
- The "application-factory" element contains the fully qualified class
- name of the concrete ApplicationFactory implementation class that
- will be called when FactoryFinder.getFactory(APPLICATION_FACTORY) is
- called. It must be of type "ClassName".
--->
-<!ELEMENT application-factory (#PCDATA)>
-
-<!--
- The "attribute-class" element represents the Java type of the value
- associated with this attribute name. It must be of type "ClassName".
--->
-<!ELEMENT attribute-class (#PCDATA)>
-
-
-<!--
- The "attribute-name" element represents the name under which the
- corresponding value will be stored, in the generic attributes of the
- UIComponent we are related to.
--->
-<!ELEMENT attribute-name (#PCDATA)>
-
-
-<!--
- The "component-class" element represents the fully qualified class name
- of a concrete UIComponent implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT component-class (#PCDATA)>
-
-
-<!--
- The "component-family" element represents the component family for
- which the Renderer represented by the parent "renderer" element will be
- used.
--->
-<!ELEMENT component-family (#PCDATA)>
-
-<!--
- The "component-type" element represents the name under which the
- corresponding UIComponent class should be registered.
--->
-<!ELEMENT component-type (#PCDATA)>
-
-
-<!--
- The "converter-class" element represents the fully qualified class name
- of a concrete Converter implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-class (#PCDATA)>
-
-
-<!--
- The "converter-for-class" element represents the fully qualified class name
- for which a Converter class will be registered. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-for-class (#PCDATA)>
-
-
-<!--
- The "converter-id" element represents the identifier under which the
- corresponding Converter class should be registered.
--->
-<!ELEMENT converter-id (#PCDATA)>
-
-<!--
- The "default-render-kit-id" element allows the application to define
- a renderkit to be used other than the standard one.
--->
-<!ELEMENT default-render-kit-id (#PCDATA)>
-
-<!--
- The "default-locale" element declares the default locale for this
- application instance. It must be specified as
- :language:[_:country:[_:variant:]] without the colons, for example
- "ja_JP_SJIS". The separators between the segments may be '-' or
- '_'.
--->
-<!ELEMENT default-locale (#PCDATA)>
-
-<!--
- The "default-value" contains the value for the property or attribute
- in which this element resides. This value differs from the
- "suggested-value" in that the property or attribute must take the
- value, whereas in "suggested-value" taking the value is optional.
--->
-<!ELEMENT default-value (#PCDATA)>
-
-<!--
- The "description" element contains a textual description of the element
- it is nested in, optionally flagged with a language code using the
- "xml:lang" attribute.
--->
-<!ELEMENT description ANY>
-<!ATTLIST description xml:lang %Language; #IMPLIED>
-
-
-<!--
- The "display-name" element is a short descriptive name describing the
- entity associated with the element it is nested in, intended to be
- displayed by tools, and optionally flagged with a language code using
- the "xml:lang" attribute.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name xml:lang %Language; #IMPLIED>
-
-<!--
- The "faces-context-factory" element contains the fully qualified
- class name of the concrete FacesContextFactory implementation class
- that will be called when
- FactoryFinder.getFactory(FACES_CONTEXT_FACTORY) is called. It must
- be of type "ClassName".
--->
-<!ELEMENT faces-context-factory (#PCDATA)>
-
-<!--
- The "from-action" element contains an action reference expression
- that must have been executed (by the default ActionListener for handling
- application level events) in order to select this navigation rule. If
- not specified, this rule will be relevant no matter which action reference
- was executed (or if no action reference was executed).
-
- This value must be of type "Action".
--->
-<!ELEMENT from-action (#PCDATA)>
-
-
-<!--
- The "from-outcome" element contains a logical outcome string returned
- by the execution of an application action method selected via an
- "actionRef" property (or a literal value specified by an "action"
- property) of a UICommand component. If specified, this rule will be
- relevant only if the outcome value matches this element's value. If
- not specified, this rule will be relevant no matter what the outcome
- value was.
--->
-<!ELEMENT from-outcome (#PCDATA)>
-
-
-<!--
- The "from-view-id" element contains the view identifier of the view
- for which the containing navigation rule is relevant. If no
- "from-view" element is specified, this rule applies to navigation
- decisions on all views. If this element is not specified, a value
- of "*" is assumed, meaning that this navigation rule applies to all
- views.
-
- This value must be of type "ViewIdPattern".
--->
-<!ELEMENT from-view-id (#PCDATA)>
-
-
-<!--
- The "key" element is the String representation of a map key that
- will be stored in a managed property of type java.util.Map.
--->
-<!ELEMENT key (#PCDATA)>
-
-
-<!--
- The "key-class" element defines the Java type to which each "key"
- element in a set of "map-entry" elements will be converted to. It
- must be of type "ClassName". If omitted, "java.lang.String"
- is assumed.
--->
-<!ELEMENT key-class (#PCDATA)>
-
-
-<!--
- The "large-icon" element contains the resource path to a large (32x32)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
- The "lifecycle-factory" element contains the fully qualified class name
- of the concrete LifecycleFactory implementation class that will be called
- when FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT lifecycle-factory (#PCDATA)>
-
-<!--
- The "managed-bean-class" element represents the fully qualified class
- name of the Java class that will be used to instantiate a new instance
- if creation of the specified managed bean is requested. It must be of
- type "ClassName".
-
- The specified class must conform to standard JavaBeans conventions.
- In particular, it must have a public zero-arguments constructor, and
- zero or more public property setters.
--->
-<!ELEMENT managed-bean-class (#PCDATA)>
-
-
-<!--
- The "managed-bean-name" element represents the attribute name under
- which a managed bean will be searched for, as well as stored (unless
- the "managed-bean-scope" value is "none"). It must be of type
- "Identifier".
--->
-<!ELEMENT managed-bean-name (#PCDATA)>
-
-
-<!--
- The "managed-bean-scope" element represents the scope into which a newly
- created instance of the specified managed bean will be stored (unless
- the value is "none"). It must be of type "ScopeOrNone".
--->
-<!ELEMENT managed-bean-scope (#PCDATA)>
-
-<!--
- The "navigation-handler" element contains the fully qualified class name
- of the concrete NavigationHandler implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle,
- if the default ActionListener (provided by the JSF implementation) is used.
- It must be of type "ClassName".
--->
-<!ELEMENT navigation-handler (#PCDATA)>
-
-<!--
-The "phase-listener" element contains the fully qualified class
-name of the concrete PhaseListener implementation class that will be
-registered on the Lifecycle. It must be of type "ClassName".
--->
-<!ELEMENT phase-listener (#PCDATA)>
-
-<!--
- The "redirect" element indicates that navigation to the specified
- "to-view-id" should be accomplished by performing an HTTP redirect
- rather than the usual ViewHandler mechanisms.
--->
-<!ELEMENT redirect EMPTY>
-
-<!--
- The "suggested-value" contains the value for the property or
- attribute in which this element resides. This value is advisory
- only and is intended for tools to use when populating pallettes.
--->
-<!ELEMENT suggested-value (#PCDATA)>
-
-
-<!--
-
- The "view-handler" element contains the fully qualified class name
- of the concrete ViewHandler implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT view-handler (#PCDATA)>
-
-<!--
-
- The "state-manager" element contains the fully qualified class name
- of the concrete StateManager implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT state-manager (#PCDATA)>
-
-<!--
- The "null-value" element indicates that the managed property in which we
- are nested will be explicitly set to null if our managed bean is
- automatically created. This is different from omitting the managed
- property element entirely, which will cause no property setter to be
- called for this property.
-
- The "null-value" element can only be used when the associated
- "property-class" identifies a Java class, not a Java primitive.
--->
-<!ELEMENT null-value EMPTY>
-
-
-<!--
- The "property-class" element represents the Java type of the value
- associated with this property name. It must be of type "JavaType".
- If not specified, it can be inferred from existing classes; however,
- this element should be specified if the configuration file is going
- to be the source for generating the corresponding classes.
--->
-<!ELEMENT property-class (#PCDATA)>
-
-
-<!--
- The "property-name" element represents the JavaBeans property name
- under which the corresponding value may be stored.
--->
-<!ELEMENT property-name (#PCDATA)>
-
-
-<!--
- The "property-resolver" element contains the fully qualified class name
- of the concrete PropertyResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT property-resolver (#PCDATA)>
-
-
-<!--
- The "referenced-bean-class" element represents the fully qualified class
- name of the Java class (either abstract or concrete) or Java interface
- implemented by the corresponding referenced bean. It must be of type
- "ClassName".
--->
-<!ELEMENT referenced-bean-class (#PCDATA)>
-
-
-<!--
- The "referenced-bean-name" element represents the attribute name under
- which the corresponding referenced bean may be assumed to be stored,
- in one of the scopes defined by the "Scope" type. It must be of type
- "Identifier".
--->
-<!ELEMENT referenced-bean-name (#PCDATA)>
-
-
-<!--
- The "render-kit-id" element represents an identifier for the
- RenderKit represented by the parent "render-kit" element.
--->
-<!ELEMENT render-kit-id (#PCDATA)>
-
-
-<!--
- The "render-kit-class" element represents the fully qualified class name
- of a concrete RenderKit implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT render-kit-class (#PCDATA)>
-
-
-<!--
- The "renderer-class" element represents the fully qualified class name
- of a concrete Renderer implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT renderer-class (#PCDATA)>
-
-<!--
- The "render-kit-factory" element contains the fully qualified class name
- of the concrete RenderKitFactory implementation class that will be called
- when FactoryFinder.getFactory(RENDER_KIT_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT render-kit-factory (#PCDATA)>
-
-<!--
- The "renderer-type" element represents a renderer type identifier for the
- Renderer represented by the parent "renderer" element.
--->
-<!ELEMENT renderer-type (#PCDATA)>
-
-<!--
- The "small-icon" element contains the resource path to a large (16x16)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
- The "supported-locale" element allows authors to declare which
- locales are supported in this application instance.
-
- It must be specified as :language:[_:country:[_:variant:]] without
- the colons, for example "ja_JP_SJIS". The separators between the
- segments may be '-' or '_'.
--->
-<!ELEMENT supported-locale (#PCDATA)>
-
-<!--
- The "to-view" element contains the view identifier of the next view
- that should be displayed if this navigation rule is matched. It
- must be of type "ViewId".
--->
-<!ELEMENT to-view-id (#PCDATA)>
-
-
-<!--
- The "validator-class" element represents the fully qualified class name
- of a concrete Validator implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT validator-class (#PCDATA)>
-
-
-<!--
- The "validator-id" element represents the identifier under which the
- corresponding Validator class should be registered.
--->
-<!ELEMENT validator-id (#PCDATA)>
-
-
-<!--
- The "value" element is the String representation of a literal
- value to which a scalar managed property will be set, or a value
- binding expression ("#{...}") that will be used to calculate the
- required value. It will be converted as specified for the actual
- property type.
--->
-<!ELEMENT value (#PCDATA)>
-
-
-<!--
- The "value-class" element defines the Java type to which each
- "value" element's value will be converted to, prior to adding it to
- the "list-entries" list for a managed property that is a
- java.util.List, or a "map-entries" map for a managed property that
- is a java.util.Map. It must be of type "ClassName". If omitted,
- "java.lang.String" is assumed.
--->
-<!ELEMENT value-class (#PCDATA)>
-
-<!--
- The "variable-resolver" element contains the fully qualified class name
- of the concrete VariableResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT variable-resolver (#PCDATA)>
-
-
-<!-- ============================ Identifier Attributes ==================== -->
-
-
-<!ATTLIST action-listener id ID #IMPLIED>
-<!ATTLIST application id ID #IMPLIED>
-<!ATTLIST application-factory id ID #IMPLIED>
-<!ATTLIST attribute id ID #IMPLIED>
-<!ATTLIST attribute-class id ID #IMPLIED>
-<!ATTLIST attribute-extension id ID #IMPLIED>
-<!ATTLIST attribute-name id ID #IMPLIED>
-<!ATTLIST component id ID #IMPLIED>
-<!ATTLIST component-class id ID #IMPLIED>
-<!ATTLIST component-extension id ID #IMPLIED>
-<!ATTLIST component-family id ID #IMPLIED>
-<!ATTLIST component-type id ID #IMPLIED>
-<!ATTLIST converter id ID #IMPLIED>
-<!ATTLIST converter-class id ID #IMPLIED>
-<!ATTLIST converter-for-class id ID #IMPLIED>
-<!ATTLIST converter-id id ID #IMPLIED>
-<!ATTLIST default-locale id ID #IMPLIED>
-<!ATTLIST default-render-kit-id id ID #IMPLIED>
-<!ATTLIST default-value id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST faces-config id ID #IMPLIED>
-<!ATTLIST faces-context-factory id ID #IMPLIED>
-<!ATTLIST factory id ID #IMPLIED>
-<!ATTLIST from-action id ID #IMPLIED>
-<!ATTLIST from-outcome id ID #IMPLIED>
-<!ATTLIST from-view-id id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST key id ID #IMPLIED>
-<!ATTLIST key-class id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST lifecycle id ID #IMPLIED>
-<!ATTLIST lifecycle-factory id ID #IMPLIED>
-<!ATTLIST list-entries id ID #IMPLIED>
-<!ATTLIST locale-config id ID #IMPLIED>
-<!ATTLIST managed-bean id ID #IMPLIED>
-<!ATTLIST managed-bean-class id ID #IMPLIED>
-<!ATTLIST managed-bean-name id ID #IMPLIED>
-<!ATTLIST managed-bean-scope id ID #IMPLIED>
-<!ATTLIST managed-property id ID #IMPLIED>
-<!ATTLIST map-entries id ID #IMPLIED>
-<!ATTLIST map-entry id ID #IMPLIED>
-<!ATTLIST message-bundle id ID #IMPLIED>
-<!ATTLIST navigation-case id ID #IMPLIED>
-<!ATTLIST navigation-handler id ID #IMPLIED>
-<!ATTLIST navigation-rule id ID #IMPLIED>
-<!ATTLIST null-value id ID #IMPLIED>
-<!ATTLIST phase-listener id ID #IMPLIED>
-<!ATTLIST property id ID #IMPLIED>
-<!ATTLIST property-class id ID #IMPLIED>
-<!ATTLIST property-extension id ID #IMPLIED>
-<!ATTLIST property-name id ID #IMPLIED>
-<!ATTLIST property-resolver id ID #IMPLIED>
-<!ATTLIST redirect id ID #IMPLIED>
-<!ATTLIST referenced-bean id ID #IMPLIED>
-<!ATTLIST referenced-bean-class id ID #IMPLIED>
-<!ATTLIST referenced-bean-name id ID #IMPLIED>
-<!ATTLIST render-kit id ID #IMPLIED>
-<!ATTLIST render-kit-class id ID #IMPLIED>
-<!ATTLIST render-kit-factory id ID #IMPLIED>
-<!ATTLIST render-kit-id id ID #IMPLIED>
-<!ATTLIST renderer id ID #IMPLIED>
-<!ATTLIST renderer-class id ID #IMPLIED>
-<!ATTLIST renderer-extension id ID #IMPLIED>
-<!ATTLIST renderer-type id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST state-manager id ID #IMPLIED>
-<!ATTLIST suggested-value id ID #IMPLIED>
-<!ATTLIST supported-locale id ID #IMPLIED>
-<!ATTLIST to-view-id id ID #IMPLIED>
-<!ATTLIST validator id ID #IMPLIED>
-<!ATTLIST validator-class id ID #IMPLIED>
-<!ATTLIST validator-id id ID #IMPLIED>
-<!ATTLIST value id ID #IMPLIED>
-<!ATTLIST value-class id ID #IMPLIED>
-<!ATTLIST variable-resolver id ID #IMPLIED>
-<!ATTLIST view-handler id ID #IMPLIED>
-
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf/dtds/web-facesconfig_1_1.dtd
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/dtds/web-facesconfig_1_1.dtd 2007-07-20 17:14:31 UTC (rev 2566)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/dtds/web-facesconfig_1_1.dtd 2007-07-20 17:15:38 UTC (rev 2567)
@@ -1,900 +0,0 @@
-<!--
- Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
--->
-
-<!--
- DTD for the JavaServer Faces Application Configuration File (Version 1.1)
-
- To support validation of your configuration file(s), include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-
- $Id: web-facesconfig_1_1.dtd,v 1.1 2004/10/27 16:45:18 xden Exp $
-
--->
-
-
-<!-- ==================== Defined Types =================================== -->
-
-
-<!--
- An "Action" is a String that represents a method binding
- expression that points at a method with no arguments that returns a
- String. It must be bracketed with "#{}", for example,
- "#{cardemo.buyCar}".
--->
-<!ENTITY % Action "CDATA">
-
-
-<!--
- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!--
- An "Identifier" is a string of characters that conforms to the variable
- naming conventions of the Java programming language (JLS Section ?.?.?).
--->
-<!ENTITY % Identifier "CDATA">
-
-
-<!--
- A "JavaType" is either the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element, or
- the name of a Java primitive type (such as int or char). The class name
- or primitive type may optionally be followed by "[]" to indicate that
- the underlying data must be an array, rather than a scalar variable.
--->
-<!ENTITY % JavaType "CDATA">
-
-
-<!--
- A "Language" is a lower case two-letter code for a language as defined
- by ISL-639.
--->
-<!ENTITY % Language "CDATA">
-
-
-<!--
- A "ResourcePath" is the relative or absolute path to a resource file
- (such as a logo image).
--->
-<!ENTITY % ResourcePath "CDATA">
-
-
-<!--
- A "Scope" is the well-known name of a scope in which managed beans may
- optionally be defined to be created in.
--->
-<!ENTITY % Scope "(request|session|application)">
-
-
-
-<!--
- A "ScopeOrNone" element defines the legal values for the
- <managed-bean-scope> element's body content, which includes
- all of the scopes respresented by the "Scope" type, plus the
- "none" value indicating that a created bean should not be
- stored into any scope.
--->
-<!ENTITY % ScopeOrNone "(request|session|application|none)">
-
-
-<!--
- A "ViewIdPattern" is a pattern for matching view identifiers in
- order to determine whether a particular navigation rule should be
- fired. It must contain one of the following values:
-
- - The exact match for a view identifier that is recognized
- by the the ViewHandler implementation being used (such as
- "/index.jsp" if you are using the default ViewHandler).
-
- - A proper prefix of a view identifier, plus a trailing "*"
- character. This pattern indicates that all view identifiers that
- match the portion of the pattern up to the asterisk will match the
- surrounding rule. When more than one match exists, the match with
- the longest pattern is selected.
-
- - An "*" character, which means that this pattern applies to all
- view identifiers.
--->
-<!ENTITY % ViewIdPattern "CDATA">
-
-
-<!-- ==================== Top Level Elements ============================== -->
-
-
-<!--
- The "faces-config" element is the root of the configuration information
- hierarchy, and contains nested elements for all of the other configuration
- settings.
--->
-<!ELEMENT faces-config ((application|factory|component|converter|managed-bean|navigation-rule|referenced-bean|render-kit|lifecycle|validator)*)>
-<!ATTLIST faces-config
- xmlns CDATA #FIXED "http://java.sun.com/JSF/Configuration">
-
-
-
-<!-- ==================== Definition Elements ============================= -->
-
-
-<!--
- The "application" element provides a mechanism to define the various
- per-application-singleton implementation artifacts for a particular web
- application that is utilizing JavaServer Faces. For nested elements
- that are not specified, the JSF implementation must provide a suitable
- default.
--->
-<!ELEMENT application ((action-listener|default-render-kit-id|message-bundle|navigation-handler|view-handler|state-manager|property-resolver|variable-resolver|locale-config)*)>
-
-
-<!--
- The "factory" element provides a mechanism to define the various
- Factories that comprise parts of the implementation of JavaServer
- Faces. For nested elements that are not specified, the JSF
- implementation must provide a suitable default.
--->
-<!ELEMENT factory ((application-factory|faces-context-factory|lifecycle-factory|render-kit-factory)*)>
-
-
-<!--
- The "attribute" element represents a named, typed, value associated with
- the parent UIComponent via the generic attributes mechanism.
-
- Attribute names must be unique within the scope of the parent (or related)
- component.
--->
-<!ELEMENT attribute (description*, display-name*, icon*, attribute-name, attribute-class, default-value?, suggested-value?, attribute-extension*)>
-
-<!--
- Extension element for attribute. May contain implementation
- specific content.
--->
-<!ELEMENT attribute-extension ANY>
-
-
-<!--
- The "component" element represents a concrete UIComponent implementation
- class that should be registered under the specified type identifier,
- along with its associated properties and attributes. Component types must
- be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that are recognized
- by the implementation logic of this component. Nested "property" elements
- identify JavaBeans properties of the component class that may be exposed
- for manipulation via tools.
--->
-<!ELEMENT component (description*, display-name*, icon*, component-type, component-class, facet*, attribute*, property*, component-extension*)>
-
-<!--
- Extension element for component. May contain implementation
- specific content.
--->
-<!ELEMENT component-extension ANY>
-
-<!--
- Define the name and other design-time information for a facet that is
- associated with a renderer or a component.
--->
-
-<!ELEMENT facet (description*, display-name*, icon*, facet-name, facet-extension*)>
-
-<!--
- Extension element for facet. May contain implementation
- specific content.
--->
-<!ELEMENT facet-extension ANY>
-
-<!--
- The "facet-name" element represents the facet name under which a
- UIComponent will be added to its parent. It must be of type
- "Identifier".
--->
-<!ELEMENT facet-name (#PCDATA)>
-
-<!--
- The "converter" element represents a concrete Converter implementation
- class that should be registered under the specified converter identifier.
- Converter identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Converter. Nested "property" elements identify JavaBeans
- properties of the Converter implementation class that may be configured
- to affect the operation of the Converter.
--->
-<!ELEMENT converter (description*, display-name*, icon*, (converter-id | converter-for-class), converter-class, attribute*, property*)>
-
-
-<!--
- The "icon" element contains "small-icon" and "large-icon" elements that
- specify the resoruce paths for small and large GIF or JPG icon images
- used to represent the parent element in a GUI tool.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon xml:lang %Language; #IMPLIED>
-
-<!--
- The "lifecycle" element provides a mechanism to specify
- modifications to the behaviour of the default Lifecycle
- implementation for this web application.
--->
-<!ELEMENT lifecycle (phase-listener*)>
-
-<!--
- The "locale-config" element allows the app developer to declare the
- supported locales for this application.
--->
-<!ELEMENT locale-config (default-locale?, supported-locale*)>
-
-<!--
- The "managed-bean" element represents a JavaBean, of a particular class,
- that will be dynamically instantiated at runtime (by the default
- VariableResolver implementation) if it is referenced as the first element
- of a value binding expression, and no corresponding bean can be
- identified in any scope. In addition to the creation of the managed bean,
- and the optional storing of it into the specified scope, the nested
- managed-property elements can be used to initialize the contents of
- settable JavaBeans properties of the created instance.
--->
-<!ELEMENT managed-bean (description*, display-name*, icon*, managed-bean-name, managed-bean-class, managed-bean-scope, (managed-property* | map-entries | list-entries))>
-
-
-<!--
- The "managed-property" element represents an individual property of a
- managed bean that will be configured to the specified value (or value set)
- if the corresponding managed bean is automatically created.
--->
-<!ELEMENT managed-property (description*, display-name*, icon*, property-name, property-class?, (map-entries|null-value|value|list-entries))>
-
-
-<!--
- The "map-entry" element reprsents a single key-entry pair that
- will be added to the computed value of a managed property of type
- java.util.Map.
--->
-<!ELEMENT map-entry (key, (null-value|value))>
-
-
-<!--
- The "map-entries' element represents a set of key-entry pairs that
- will be added to the computed value of a managed property of type
- java.util.Map. In addition, the Java class types of the key and entry
- values may be optionally declared.
--->
-<!ELEMENT map-entries (key-class?, value-class?, map-entry*)>
-
-
-<!--
- The base name of a resource bundle representing the message resources
- for this application. See the JavaDocs for the "java.util.ResourceBundle"
- class for more information on the syntax of resource bundle names.
--->
-
-<!ELEMENT message-bundle (#PCDATA)>
-
-
-<!--
- The "navigation-case" element describes a particular combination of
- conditions that must match for this case to be executed, and the
- view id of the component tree that should be selected next.
--->
-<!ELEMENT navigation-case (description*, display-name*, icon*, from-action?, from-outcome?, to-view-id, redirect?)>
-
-
-<!--
- The "navigation-rule" element represents an individual decision rule
- that will be utilized by the default NavigationHandler
- implementation to make decisions on what view should be displayed
- next, based on the view id being processed.
--->
-<!ELEMENT navigation-rule (description*, display-name*, icon*, from-view-id?, navigation-case*)>
-
-
-<!--
- The "property" element represents a JavaBean property of the Java class
- represented by our parent element.
-
- Property names must be unique within the scope of the Java class
- that is represented by the parent element, and must correspond to
- property names that will be recognized when performing introspection
- against that class via java.beans.Introspector.
--->
-<!ELEMENT property (description*, display-name*, icon*, property-name, property-class, default-value?, suggested-value?, property-extension*)>
-
-<!--
- Extension element for property. May contain implementation
- specific content.
--->
-<!ELEMENT property-extension ANY>
-
-<!--
- The "referenced-bean" element represents at design time the promise
- that a Java object of the specified type will exist at runtime in some
- scope, under the specified key. This can be used by design time tools
- to construct user interface dialogs based on the properties of the
- specified class. The presence or absence of a referenced bean
- element has no impact on the JavaServer Faces runtime environment
- inside a web application.
--->
-<!ELEMENT referenced-bean (description*, display-name*, icon*, referenced-bean-name, referenced-bean-class)>
-
-
-<!--
- The "render-kit" element represents a concrete RenderKit implementation
- that should be registered under the specified render-kit-id. If no
- render-kit-id is specified, the identifier of the default RenderKit
- (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
--->
-<!ELEMENT render-kit (description*, display-name*, icon*, render-kit-id?, render-kit-class?, renderer*)>
-
-
-<!--
- The "renderer" element represents a concrete Renderer implementation
- class that should be registered under the specified component family
- and renderer type identifiers, in the RenderKit associated with the
- parent "render-kit" element. Combinations of component family and renderer
- type must be unique within the RenderKit associated with the parent
- "render-kit" element.
-
- Nested "attribute" elements identify generic component attributes that
- are recognized by this renderer.
--->
-<!ELEMENT renderer (description*, display-name*, icon*, component-family, renderer-type, renderer-class, facet*, attribute*, renderer-extension*)>
-
-<!--
- Extension element for renderer. May contain implementation
- specific content.
--->
-<!ELEMENT renderer-extension ANY>
-
-<!--
- The "validator" element represents a concrete Validator implementation
- class that should be registered under the specified validator identifier.
- Validator identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Validator. Nested "property" elements identify JavaBeans
- properties of the Validator implementation class that may be configured
- to affect the operation of the Validator.
--->
-<!ELEMENT validator (description*, display-name*, icon*, validator-id, validator-class, attribute*, property*)>
-
-
-<!--
- The "list-entries" element represents a set of initialization
- elements for a managed property that is a java.util.List or an
- array. In the former case, the "value-class" element can optionally
- be used to declare the Java type to which each value should be
- converted before adding it to the Collection.
--->
-<!ELEMENT list-entries (value-class?, (null-value|value)*)>
-
-
-<!-- ==================== Subordinate Elements ============================ -->
-
-
-<!--
- The "action-listener" element contains the fully qualified class name
- of the concrete ActionListener implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle.
- It must be of type "ClassName".
--->
-<!ELEMENT action-listener (#PCDATA)>
-
-<!--
- The "application-factory" element contains the fully qualified class
- name of the concrete ApplicationFactory implementation class that
- will be called when FactoryFinder.getFactory(APPLICATION_FACTORY) is
- called. It must be of type "ClassName".
--->
-<!ELEMENT application-factory (#PCDATA)>
-
-<!--
- The "attribute-class" element represents the Java type of the value
- associated with this attribute name. It must be of type "ClassName".
--->
-<!ELEMENT attribute-class (#PCDATA)>
-
-
-<!--
- The "attribute-name" element represents the name under which the
- corresponding value will be stored, in the generic attributes of the
- UIComponent we are related to.
--->
-<!ELEMENT attribute-name (#PCDATA)>
-
-
-<!--
- The "component-class" element represents the fully qualified class name
- of a concrete UIComponent implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT component-class (#PCDATA)>
-
-
-<!--
- The "component-family" element represents the component family for
- which the Renderer represented by the parent "renderer" element will be
- used.
--->
-<!ELEMENT component-family (#PCDATA)>
-
-<!--
- The "component-type" element represents the name under which the
- corresponding UIComponent class should be registered.
--->
-<!ELEMENT component-type (#PCDATA)>
-
-
-<!--
- The "converter-class" element represents the fully qualified class name
- of a concrete Converter implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-class (#PCDATA)>
-
-
-<!--
- The "converter-for-class" element represents the fully qualified class name
- for which a Converter class will be registered. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-for-class (#PCDATA)>
-
-
-<!--
- The "converter-id" element represents the identifier under which the
- corresponding Converter class should be registered.
--->
-<!ELEMENT converter-id (#PCDATA)>
-
-<!--
- The "default-render-kit-id" element allows the application to define
- a renderkit to be used other than the standard one.
--->
-<!ELEMENT default-render-kit-id (#PCDATA)>
-
-<!--
- The "default-locale" element declares the default locale for this
- application instance. It must be specified as
- :language:[_:country:[_:variant:]] without the colons, for example
- "ja_JP_SJIS". The separators between the segments may be '-' or
- '_'.
--->
-<!ELEMENT default-locale (#PCDATA)>
-
-<!--
- The "default-value" contains the value for the property or attribute
- in which this element resides. This value differs from the
- "suggested-value" in that the property or attribute must take the
- value, whereas in "suggested-value" taking the value is optional.
--->
-<!ELEMENT default-value (#PCDATA)>
-
-<!--
- The "description" element contains a textual description of the element
- it is nested in, optionally flagged with a language code using the
- "xml:lang" attribute.
--->
-<!ELEMENT description ANY>
-<!ATTLIST description xml:lang %Language; #IMPLIED>
-
-
-<!--
- The "display-name" element is a short descriptive name describing the
- entity associated with the element it is nested in, intended to be
- displayed by tools, and optionally flagged with a language code using
- the "xml:lang" attribute.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name xml:lang %Language; #IMPLIED>
-
-<!--
- The "faces-context-factory" element contains the fully qualified
- class name of the concrete FacesContextFactory implementation class
- that will be called when
- FactoryFinder.getFactory(FACES_CONTEXT_FACTORY) is called. It must
- be of type "ClassName".
--->
-<!ELEMENT faces-context-factory (#PCDATA)>
-
-<!--
- The "from-action" element contains an action reference expression
- that must have been executed (by the default ActionListener for handling
- application level events) in order to select this navigation rule. If
- not specified, this rule will be relevant no matter which action reference
- was executed (or if no action reference was executed).
-
- This value must be of type "Action".
--->
-<!ELEMENT from-action (#PCDATA)>
-
-
-<!--
- The "from-outcome" element contains a logical outcome string returned
- by the execution of an application action method selected via an
- "actionRef" property (or a literal value specified by an "action"
- property) of a UICommand component. If specified, this rule will be
- relevant only if the outcome value matches this element's value. If
- not specified, this rule will be relevant no matter what the outcome
- value was.
--->
-<!ELEMENT from-outcome (#PCDATA)>
-
-
-<!--
- The "from-view-id" element contains the view identifier of the view
- for which the containing navigation rule is relevant. If no
- "from-view" element is specified, this rule applies to navigation
- decisions on all views. If this element is not specified, a value
- of "*" is assumed, meaning that this navigation rule applies to all
- views.
-
- This value must be of type "ViewIdPattern".
--->
-<!ELEMENT from-view-id (#PCDATA)>
-
-
-<!--
- The "key" element is the String representation of a map key that
- will be stored in a managed property of type java.util.Map.
--->
-<!ELEMENT key (#PCDATA)>
-
-
-<!--
- The "key-class" element defines the Java type to which each "key"
- element in a set of "map-entry" elements will be converted to. It
- must be of type "ClassName". If omitted, "java.lang.String"
- is assumed.
--->
-<!ELEMENT key-class (#PCDATA)>
-
-
-<!--
- The "large-icon" element contains the resource path to a large (32x32)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
- The "lifecycle-factory" element contains the fully qualified class name
- of the concrete LifecycleFactory implementation class that will be called
- when FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT lifecycle-factory (#PCDATA)>
-
-<!--
- The "managed-bean-class" element represents the fully qualified class
- name of the Java class that will be used to instantiate a new instance
- if creation of the specified managed bean is requested. It must be of
- type "ClassName".
-
- The specified class must conform to standard JavaBeans conventions.
- In particular, it must have a public zero-arguments constructor, and
- zero or more public property setters.
--->
-<!ELEMENT managed-bean-class (#PCDATA)>
-
-
-<!--
- The "managed-bean-name" element represents the attribute name under
- which a managed bean will be searched for, as well as stored (unless
- the "managed-bean-scope" value is "none"). It must be of type
- "Identifier".
--->
-<!ELEMENT managed-bean-name (#PCDATA)>
-
-
-<!--
- The "managed-bean-scope" element represents the scope into which a newly
- created instance of the specified managed bean will be stored (unless
- the value is "none"). It must be of type "ScopeOrNone".
--->
-<!ELEMENT managed-bean-scope (#PCDATA)>
-
-<!--
- The "navigation-handler" element contains the fully qualified class name
- of the concrete NavigationHandler implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle,
- if the default ActionListener (provided by the JSF implementation) is used.
- It must be of type "ClassName".
--->
-<!ELEMENT navigation-handler (#PCDATA)>
-
-<!--
-The "phase-listener" element contains the fully qualified class
-name of the concrete PhaseListener implementation class that will be
-registered on the Lifecycle. It must be of type "ClassName".
--->
-<!ELEMENT phase-listener (#PCDATA)>
-
-<!--
- The "redirect" element indicates that navigation to the specified
- "to-view-id" should be accomplished by performing an HTTP redirect
- rather than the usual ViewHandler mechanisms.
--->
-<!ELEMENT redirect EMPTY>
-
-<!--
- The "suggested-value" contains the value for the property or
- attribute in which this element resides. This value is advisory
- only and is intended for tools to use when populating pallettes.
--->
-<!ELEMENT suggested-value (#PCDATA)>
-
-
-<!--
-
- The "view-handler" element contains the fully qualified class name
- of the concrete ViewHandler implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT view-handler (#PCDATA)>
-
-<!--
-
- The "state-manager" element contains the fully qualified class name
- of the concrete StateManager implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT state-manager (#PCDATA)>
-
-<!--
- The "null-value" element indicates that the managed property in which we
- are nested will be explicitly set to null if our managed bean is
- automatically created. This is different from omitting the managed
- property element entirely, which will cause no property setter to be
- called for this property.
-
- The "null-value" element can only be used when the associated
- "property-class" identifies a Java class, not a Java primitive.
--->
-<!ELEMENT null-value EMPTY>
-
-
-<!--
- The "property-class" element represents the Java type of the value
- associated with this property name. It must be of type "JavaType".
- If not specified, it can be inferred from existing classes; however,
- this element should be specified if the configuration file is going
- to be the source for generating the corresponding classes.
--->
-<!ELEMENT property-class (#PCDATA)>
-
-
-<!--
- The "property-name" element represents the JavaBeans property name
- under which the corresponding value may be stored.
--->
-<!ELEMENT property-name (#PCDATA)>
-
-
-<!--
- The "property-resolver" element contains the fully qualified class name
- of the concrete PropertyResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT property-resolver (#PCDATA)>
-
-
-<!--
- The "referenced-bean-class" element represents the fully qualified class
- name of the Java class (either abstract or concrete) or Java interface
- implemented by the corresponding referenced bean. It must be of type
- "ClassName".
--->
-<!ELEMENT referenced-bean-class (#PCDATA)>
-
-
-<!--
- The "referenced-bean-name" element represents the attribute name under
- which the corresponding referenced bean may be assumed to be stored,
- in one of the scopes defined by the "Scope" type. It must be of type
- "Identifier".
--->
-<!ELEMENT referenced-bean-name (#PCDATA)>
-
-
-<!--
- The "render-kit-id" element represents an identifier for the
- RenderKit represented by the parent "render-kit" element.
--->
-<!ELEMENT render-kit-id (#PCDATA)>
-
-
-<!--
- The "render-kit-class" element represents the fully qualified class name
- of a concrete RenderKit implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT render-kit-class (#PCDATA)>
-
-
-<!--
- The "renderer-class" element represents the fully qualified class name
- of a concrete Renderer implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT renderer-class (#PCDATA)>
-
-<!--
- The "render-kit-factory" element contains the fully qualified class name
- of the concrete RenderKitFactory implementation class that will be called
- when FactoryFinder.getFactory(RENDER_KIT_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT render-kit-factory (#PCDATA)>
-
-<!--
- The "renderer-type" element represents a renderer type identifier for the
- Renderer represented by the parent "renderer" element.
--->
-<!ELEMENT renderer-type (#PCDATA)>
-
-<!--
- The "small-icon" element contains the resource path to a large (16x16)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
- The "supported-locale" element allows authors to declare which
- locales are supported in this application instance.
-
- It must be specified as :language:[_:country:[_:variant:]] without
- the colons, for example "ja_JP_SJIS". The separators between the
- segments may be '-' or '_'.
--->
-<!ELEMENT supported-locale (#PCDATA)>
-
-<!--
- The "to-view" element contains the view identifier of the next view
- that should be displayed if this navigation rule is matched. It
- must be of type "ViewId".
--->
-<!ELEMENT to-view-id (#PCDATA)>
-
-
-<!--
- The "validator-class" element represents the fully qualified class name
- of a concrete Validator implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT validator-class (#PCDATA)>
-
-
-<!--
- The "validator-id" element represents the identifier under which the
- corresponding Validator class should be registered.
--->
-<!ELEMENT validator-id (#PCDATA)>
-
-
-<!--
- The "value" element is the String representation of a literal
- value to which a scalar managed property will be set, or a value
- binding expression ("#{...}") that will be used to calculate the
- required value. It will be converted as specified for the actual
- property type.
--->
-<!ELEMENT value (#PCDATA)>
-
-
-<!--
- The "value-class" element defines the Java type to which each
- "value" element's value will be converted to, prior to adding it to
- the "list-entries" list for a managed property that is a
- java.util.List, or a "map-entries" map for a managed property that
- is a java.util.Map. It must be of type "ClassName". If omitted,
- "java.lang.String" is assumed.
--->
-<!ELEMENT value-class (#PCDATA)>
-
-<!--
- The "variable-resolver" element contains the fully qualified class name
- of the concrete VariableResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT variable-resolver (#PCDATA)>
-
-
-<!-- ============================ Identifier Attributes ==================== -->
-
-
-<!ATTLIST action-listener id ID #IMPLIED>
-<!ATTLIST application id ID #IMPLIED>
-<!ATTLIST application-factory id ID #IMPLIED>
-<!ATTLIST attribute id ID #IMPLIED>
-<!ATTLIST attribute-class id ID #IMPLIED>
-<!ATTLIST attribute-extension id ID #IMPLIED>
-<!ATTLIST attribute-name id ID #IMPLIED>
-<!ATTLIST component id ID #IMPLIED>
-<!ATTLIST component-class id ID #IMPLIED>
-<!ATTLIST component-extension id ID #IMPLIED>
-<!ATTLIST component-family id ID #IMPLIED>
-<!ATTLIST component-type id ID #IMPLIED>
-<!ATTLIST converter id ID #IMPLIED>
-<!ATTLIST converter-class id ID #IMPLIED>
-<!ATTLIST converter-for-class id ID #IMPLIED>
-<!ATTLIST converter-id id ID #IMPLIED>
-<!ATTLIST default-locale id ID #IMPLIED>
-<!ATTLIST default-render-kit-id id ID #IMPLIED>
-<!ATTLIST default-value id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST faces-config id ID #IMPLIED>
-<!ATTLIST faces-context-factory id ID #IMPLIED>
-<!ATTLIST facet id ID #IMPLIED>
-<!ATTLIST facet-extension id ID #IMPLIED>
-<!ATTLIST facet-name id ID #IMPLIED>
-<!ATTLIST factory id ID #IMPLIED>
-<!ATTLIST from-action id ID #IMPLIED>
-<!ATTLIST from-outcome id ID #IMPLIED>
-<!ATTLIST from-view-id id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST key id ID #IMPLIED>
-<!ATTLIST key-class id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST lifecycle id ID #IMPLIED>
-<!ATTLIST lifecycle-factory id ID #IMPLIED>
-<!ATTLIST list-entries id ID #IMPLIED>
-<!ATTLIST locale-config id ID #IMPLIED>
-<!ATTLIST managed-bean id ID #IMPLIED>
-<!ATTLIST managed-bean-class id ID #IMPLIED>
-<!ATTLIST managed-bean-name id ID #IMPLIED>
-<!ATTLIST managed-bean-scope id ID #IMPLIED>
-<!ATTLIST managed-property id ID #IMPLIED>
-<!ATTLIST map-entries id ID #IMPLIED>
-<!ATTLIST map-entry id ID #IMPLIED>
-<!ATTLIST message-bundle id ID #IMPLIED>
-<!ATTLIST navigation-case id ID #IMPLIED>
-<!ATTLIST navigation-handler id ID #IMPLIED>
-<!ATTLIST navigation-rule id ID #IMPLIED>
-<!ATTLIST null-value id ID #IMPLIED>
-<!ATTLIST phase-listener id ID #IMPLIED>
-<!ATTLIST property id ID #IMPLIED>
-<!ATTLIST property-class id ID #IMPLIED>
-<!ATTLIST property-extension id ID #IMPLIED>
-<!ATTLIST property-name id ID #IMPLIED>
-<!ATTLIST property-resolver id ID #IMPLIED>
-<!ATTLIST redirect id ID #IMPLIED>
-<!ATTLIST referenced-bean id ID #IMPLIED>
-<!ATTLIST referenced-bean-class id ID #IMPLIED>
-<!ATTLIST referenced-bean-name id ID #IMPLIED>
-<!ATTLIST render-kit id ID #IMPLIED>
-<!ATTLIST render-kit-class id ID #IMPLIED>
-<!ATTLIST render-kit-factory id ID #IMPLIED>
-<!ATTLIST render-kit-id id ID #IMPLIED>
-<!ATTLIST renderer id ID #IMPLIED>
-<!ATTLIST renderer-class id ID #IMPLIED>
-<!ATTLIST renderer-extension id ID #IMPLIED>
-<!ATTLIST renderer-type id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST state-manager id ID #IMPLIED>
-<!ATTLIST suggested-value id ID #IMPLIED>
-<!ATTLIST supported-locale id ID #IMPLIED>
-<!ATTLIST to-view-id id ID #IMPLIED>
-<!ATTLIST validator id ID #IMPLIED>
-<!ATTLIST validator-class id ID #IMPLIED>
-<!ATTLIST validator-id id ID #IMPLIED>
-<!ATTLIST value id ID #IMPLIED>
-<!ATTLIST value-class id ID #IMPLIED>
-<!ATTLIST variable-resolver id ID #IMPLIED>
-<!ATTLIST view-handler id ID #IMPLIED>
-
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2007-07-20 17:14:31 UTC (rev 2566)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/plugin.xml 2007-07-20 17:15:38 UTC (rev 2567)
@@ -1588,12 +1588,6 @@
<extension
point="org.eclipse.wst.xml.core.catalogContributions">
<catalogContribution id="default">
- <public
- publicId="-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
- uri="dtds/web-facesconfig_1_0.dtd" />
- <public
- publicId="-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- uri="dtds/web-facesconfig_1_1.dtd" />
</catalogContribution>
</extension>
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_0.dtd
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_0.dtd 2007-07-20 17:14:31 UTC (rev 2566)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_0.dtd 2007-07-20 17:15:38 UTC (rev 2567)
@@ -1,879 +0,0 @@
-<!--
- Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
--->
-
-<!--
- DTD for the JavaServer Faces Application Configuration File (Version 1.0)
-
- To support validation of your configuration file(s), include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
-
- $Id: web-facesconfig_1_0.dtd,v 1.1.1.1 2004/10/06 17:31:39 sim Exp $
-
--->
-
-
-<!-- ==================== Defined Types =================================== -->
-
-
-<!--
- An "Action" is a String that represents a method binding
- expression that points at a method with no arguments that returns a
- String. It must be bracketed with "#{}", for example,
- "#{cardemo.buyCar}".
--->
-<!ENTITY % Action "CDATA">
-
-
-<!--
- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!--
- An "Identifier" is a string of characters that conforms to the variable
- naming conventions of the Java programming language (JLS Section ?.?.?).
--->
-<!ENTITY % Identifier "CDATA">
-
-
-<!--
- A "JavaType" is either the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element, or
- the name of a Java primitive type (such as int or char). The class name
- or primitive type may optionally be followed by "[]" to indicate that
- the underlying data must be an array, rather than a scalar variable.
--->
-<!ENTITY % JavaType "CDATA">
-
-
-<!--
- A "Language" is a lower case two-letter code for a language as defined
- by ISL-639.
--->
-<!ENTITY % Language "CDATA">
-
-
-<!--
- A "ResourcePath" is the relative or absolute path to a resource file
- (such as a logo image).
--->
-<!ENTITY % ResourcePath "CDATA">
-
-
-<!--
- A "Scope" is the well-known name of a scope in which managed beans may
- optionally be defined to be created in.
--->
-<!ENTITY % Scope "(request|session|application)">
-
-
-
-<!--
- A "ScopeOrNone" element defines the legal values for the
- <managed-bean-scope> element's body content, which includes
- all of the scopes respresented by the "Scope" type, plus the
- "none" value indicating that a created bean should not be
- stored into any scope.
--->
-<!ENTITY % ScopeOrNone "(request|session|application|none)">
-
-
-<!--
- A "ViewIdPattern" is a pattern for matching view identifiers in
- order to determine whether a particular navigation rule should be
- fired. It must contain one of the following values:
-
- - The exact match for a view identifier that is recognized
- by the the ViewHandler implementation being used (such as
- "/index.jsp" if you are using the default ViewHandler).
-
- - A proper prefix of a view identifier, plus a trailing "*"
- character. This pattern indicates that all view identifiers that
- match the portion of the pattern up to the asterisk will match the
- surrounding rule. When more than one match exists, the match with
- the longest pattern is selected.
-
- - An "*" character, which means that this pattern applies to all
- view identifiers.
--->
-<!ENTITY % ViewIdPattern "CDATA">
-
-
-<!-- ==================== Top Level Elements ============================== -->
-
-
-<!--
- The "faces-config" element is the root of the configuration information
- hierarchy, and contains nested elements for all of the other configuration
- settings.
--->
-<!ELEMENT faces-config ((application|factory|component|converter|managed-bean|navigation-rule|referenced-bean|render-kit|lifecycle|validator)*)>
-<!ATTLIST faces-config
- xmlns CDATA #FIXED "http://java.sun.com/JSF/Configuration">
-
-
-
-<!-- ==================== Definition Elements ============================= -->
-
-
-<!--
- The "application" element provides a mechanism to define the various
- per-application-singleton implementation artifacts for a particular web
- application that is utilizing JavaServer Faces. For nested elements
- that are not specified, the JSF implementation must provide a suitable
- default.
--->
-<!ELEMENT application ((action-listener|default-render-kit-id|message-bundle|navigation-handler|view-handler|state-manager|property-resolver|variable-resolver|locale-config)*)>
-
-
-<!--
- The "factory" element provides a mechanism to define the various
- Factories that comprise parts of the implementation of JavaServer
- Faces. For nested elements that are not specified, the JSF
- implementation must provide a suitable default.
--->
-<!ELEMENT factory ((application-factory|faces-context-factory|lifecycle-factory|render-kit-factory)*)>
-
-
-<!--
- The "attribute" element represents a named, typed, value associated with
- the parent UIComponent via the generic attributes mechanism.
-
- Attribute names must be unique within the scope of the parent (or related)
- component.
--->
-<!ELEMENT attribute (description*, display-name*, icon*, attribute-name, attribute-class, default-value?, suggested-value?, attribute-extension*)>
-
-<!--
- Extension element for attribute. May contain implementation
- specific content.
--->
-<!ELEMENT attribute-extension ANY>
-
-
-<!--
- The "component" element represents a concrete UIComponent implementation
- class that should be registered under the specified type identifier,
- along with its associated properties and attributes. Component types must
- be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that are recognized
- by the implementation logic of this component. Nested "property" elements
- identify JavaBeans properties of the component class that may be exposed
- for manipulation via tools.
--->
-<!ELEMENT component (description*, display-name*, icon*, component-type, component-class, attribute*, property*, component-extension*)>
-
-<!--
- Extension element for component. May contain implementation
- specific content.
--->
-<!ELEMENT component-extension ANY>
-
-
-
-<!--
- The "converter" element represents a concrete Converter implementation
- class that should be registered under the specified converter identifier.
- Converter identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Converter. Nested "property" elements identify JavaBeans
- properties of the Converter implementation class that may be configured
- to affect the operation of the Converter.
--->
-<!ELEMENT converter (description*, display-name*, icon*, (converter-id | converter-for-class), converter-class, attribute*, property*)>
-
-
-<!--
- The "icon" element contains "small-icon" and "large-icon" elements that
- specify the resoruce paths for small and large GIF or JPG icon images
- used to represent the parent element in a GUI tool.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon xml:lang %Language; #IMPLIED>
-
-<!--
- The "lifecycle" element provides a mechanism to specify
- modifications to the behaviour of the default Lifecycle
- implementation for this web application.
--->
-<!ELEMENT lifecycle (phase-listener*)>
-
-<!--
- The "locale-config" element allows the app developer to declare the
- supported locales for this application.
--->
-<!ELEMENT locale-config (default-locale?, supported-locale*)>
-
-<!--
- The "managed-bean" element represents a JavaBean, of a particular class,
- that will be dynamically instantiated at runtime (by the default
- VariableResolver implementation) if it is referenced as the first element
- of a value binding expression, and no corresponding bean can be
- identified in any scope. In addition to the creation of the managed bean,
- and the optional storing of it into the specified scope, the nested
- managed-property elements can be used to initialize the contents of
- settable JavaBeans properties of the created instance.
--->
-<!ELEMENT managed-bean (description*, display-name*, icon*, managed-bean-name, managed-bean-class, managed-bean-scope, (managed-property* | map-entries | list-entries))>
-
-
-<!--
- The "managed-property" element represents an individual property of a
- managed bean that will be configured to the specified value (or value set)
- if the corresponding managed bean is automatically created.
--->
-<!ELEMENT managed-property (description*, display-name*, icon*, property-name, property-class?, (map-entries|null-value|value|list-entries))>
-
-
-<!--
- The "map-entry" element reprsents a single key-entry pair that
- will be added to the computed value of a managed property of type
- java.util.Map.
--->
-<!ELEMENT map-entry (key, (null-value|value))>
-
-
-<!--
- The "map-entries' element represents a set of key-entry pairs that
- will be added to the computed value of a managed property of type
- java.util.Map. In addition, the Java class types of the key and entry
- values may be optionally declared.
--->
-<!ELEMENT map-entries (key-class?, value-class?, map-entry*)>
-
-
-<!--
- The base name of a resource bundle representing the message resources
- for this application. See the JavaDocs for the "java.util.ResourceBundle"
- class for more information on the syntax of resource bundle names.
--->
-
-<!ELEMENT message-bundle (#PCDATA)>
-
-
-<!--
- The "navigation-case" element describes a particular combination of
- conditions that must match for this case to be executed, and the
- view id of the component tree that should be selected next.
--->
-<!ELEMENT navigation-case (description*, display-name*, icon*, from-action?, from-outcome?, to-view-id, redirect?)>
-
-
-<!--
- The "navigation-rule" element represents an individual decision rule
- that will be utilized by the default NavigationHandler
- implementation to make decisions on what view should be displayed
- next, based on the view id being processed.
--->
-<!ELEMENT navigation-rule (description*, display-name*, icon*, from-view-id?, navigation-case*)>
-
-
-<!--
- The "property" element represents a JavaBean property of the Java class
- represented by our parent element.
-
- Property names must be unique within the scope of the Java class
- that is represented by the parent element, and must correspond to
- property names that will be recognized when performing introspection
- against that class via java.beans.Introspector.
--->
-<!ELEMENT property (description*, display-name*, icon*, property-name, property-class, default-value?, suggested-value?, property-extension*)>
-
-<!--
- Extension element for property. May contain implementation
- specific content.
--->
-<!ELEMENT property-extension ANY>
-
-<!--
- The "referenced-bean" element represents at design time the promise
- that a Java object of the specified type will exist at runtime in some
- scope, under the specified key. This can be used by design time tools
- to construct user interface dialogs based on the properties of the
- specified class. The presence or absence of a referenced bean
- element has no impact on the JavaServer Faces runtime environment
- inside a web application.
--->
-<!ELEMENT referenced-bean (description*, display-name*, icon*, referenced-bean-name, referenced-bean-class)>
-
-
-<!--
- The "render-kit" element represents a concrete RenderKit implementation
- that should be registered under the specified render-kit-id. If no
- render-kit-id is specified, the identifier of the default RenderKit
- (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
--->
-<!ELEMENT render-kit (description*, display-name*, icon*, render-kit-id?, render-kit-class?, renderer*)>
-
-
-<!--
- The "renderer" element represents a concrete Renderer implementation
- class that should be registered under the specified component family
- and renderer type identifiers, in the RenderKit associated with the
- parent "render-kit" element. Combinations of component family and renderer
- type must be unique within the RenderKit associated with the parent
- "render-kit" element.
-
- Nested "attribute" elements identify generic component attributes that
- are recognized by this renderer.
--->
-<!ELEMENT renderer (description*, display-name*, icon*, component-family, renderer-type, renderer-class, attribute*, renderer-extension*)>
-
-<!--
- Extension element for renderer. May contain implementation
- specific content.
--->
-<!ELEMENT renderer-extension ANY>
-
-<!--
- The "validator" element represents a concrete Validator implementation
- class that should be registered under the specified validator identifier.
- Validator identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Validator. Nested "property" elements identify JavaBeans
- properties of the Validator implementation class that may be configured
- to affect the operation of the Validator.
--->
-<!ELEMENT validator (description*, display-name*, icon*, validator-id, validator-class, attribute*, property*)>
-
-
-<!--
- The "list-entries" element represents a set of initialization
- elements for a managed property that is a java.util.List or an
- array. In the former case, the "value-class" element can optionally
- be used to declare the Java type to which each value should be
- converted before adding it to the Collection.
--->
-<!ELEMENT list-entries (value-class?, (null-value|value)*)>
-
-
-<!-- ==================== Subordinate Elements ============================ -->
-
-
-<!--
- The "action-listener" element contains the fully qualified class name
- of the concrete ActionListener implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle.
- It must be of type "ClassName".
--->
-<!ELEMENT action-listener (#PCDATA)>
-
-<!--
- The "application-factory" element contains the fully qualified class
- name of the concrete ApplicationFactory implementation class that
- will be called when FactoryFinder.getFactory(APPLICATION_FACTORY) is
- called. It must be of type "ClassName".
--->
-<!ELEMENT application-factory (#PCDATA)>
-
-<!--
- The "attribute-class" element represents the Java type of the value
- associated with this attribute name. It must be of type "ClassName".
--->
-<!ELEMENT attribute-class (#PCDATA)>
-
-
-<!--
- The "attribute-name" element represents the name under which the
- corresponding value will be stored, in the generic attributes of the
- UIComponent we are related to.
--->
-<!ELEMENT attribute-name (#PCDATA)>
-
-
-<!--
- The "component-class" element represents the fully qualified class name
- of a concrete UIComponent implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT component-class (#PCDATA)>
-
-
-<!--
- The "component-family" element represents the component family for
- which the Renderer represented by the parent "renderer" element will be
- used.
--->
-<!ELEMENT component-family (#PCDATA)>
-
-<!--
- The "component-type" element represents the name under which the
- corresponding UIComponent class should be registered.
--->
-<!ELEMENT component-type (#PCDATA)>
-
-
-<!--
- The "converter-class" element represents the fully qualified class name
- of a concrete Converter implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-class (#PCDATA)>
-
-
-<!--
- The "converter-for-class" element represents the fully qualified class name
- for which a Converter class will be registered. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-for-class (#PCDATA)>
-
-
-<!--
- The "converter-id" element represents the identifier under which the
- corresponding Converter class should be registered.
--->
-<!ELEMENT converter-id (#PCDATA)>
-
-<!--
- The "default-render-kit-id" element allows the application to define
- a renderkit to be used other than the standard one.
--->
-<!ELEMENT default-render-kit-id (#PCDATA)>
-
-<!--
- The "default-locale" element declares the default locale for this
- application instance. It must be specified as
- :language:[_:country:[_:variant:]] without the colons, for example
- "ja_JP_SJIS". The separators between the segments may be '-' or
- '_'.
--->
-<!ELEMENT default-locale (#PCDATA)>
-
-<!--
- The "default-value" contains the value for the property or attribute
- in which this element resides. This value differs from the
- "suggested-value" in that the property or attribute must take the
- value, whereas in "suggested-value" taking the value is optional.
--->
-<!ELEMENT default-value (#PCDATA)>
-
-<!--
- The "description" element contains a textual description of the element
- it is nested in, optionally flagged with a language code using the
- "xml:lang" attribute.
--->
-<!ELEMENT description ANY>
-<!ATTLIST description xml:lang %Language; #IMPLIED>
-
-
-<!--
- The "display-name" element is a short descriptive name describing the
- entity associated with the element it is nested in, intended to be
- displayed by tools, and optionally flagged with a language code using
- the "xml:lang" attribute.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name xml:lang %Language; #IMPLIED>
-
-<!--
- The "faces-context-factory" element contains the fully qualified
- class name of the concrete FacesContextFactory implementation class
- that will be called when
- FactoryFinder.getFactory(FACES_CONTEXT_FACTORY) is called. It must
- be of type "ClassName".
--->
-<!ELEMENT faces-context-factory (#PCDATA)>
-
-<!--
- The "from-action" element contains an action reference expression
- that must have been executed (by the default ActionListener for handling
- application level events) in order to select this navigation rule. If
- not specified, this rule will be relevant no matter which action reference
- was executed (or if no action reference was executed).
-
- This value must be of type "Action".
--->
-<!ELEMENT from-action (#PCDATA)>
-
-
-<!--
- The "from-outcome" element contains a logical outcome string returned
- by the execution of an application action method selected via an
- "actionRef" property (or a literal value specified by an "action"
- property) of a UICommand component. If specified, this rule will be
- relevant only if the outcome value matches this element's value. If
- not specified, this rule will be relevant no matter what the outcome
- value was.
--->
-<!ELEMENT from-outcome (#PCDATA)>
-
-
-<!--
- The "from-view-id" element contains the view identifier of the view
- for which the containing navigation rule is relevant. If no
- "from-view" element is specified, this rule applies to navigation
- decisions on all views. If this element is not specified, a value
- of "*" is assumed, meaning that this navigation rule applies to all
- views.
-
- This value must be of type "ViewIdPattern".
--->
-<!ELEMENT from-view-id (#PCDATA)>
-
-
-<!--
- The "key" element is the String representation of a map key that
- will be stored in a managed property of type java.util.Map.
--->
-<!ELEMENT key (#PCDATA)>
-
-
-<!--
- The "key-class" element defines the Java type to which each "key"
- element in a set of "map-entry" elements will be converted to. It
- must be of type "ClassName". If omitted, "java.lang.String"
- is assumed.
--->
-<!ELEMENT key-class (#PCDATA)>
-
-
-<!--
- The "large-icon" element contains the resource path to a large (32x32)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
- The "lifecycle-factory" element contains the fully qualified class name
- of the concrete LifecycleFactory implementation class that will be called
- when FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT lifecycle-factory (#PCDATA)>
-
-<!--
- The "managed-bean-class" element represents the fully qualified class
- name of the Java class that will be used to instantiate a new instance
- if creation of the specified managed bean is requested. It must be of
- type "ClassName".
-
- The specified class must conform to standard JavaBeans conventions.
- In particular, it must have a public zero-arguments constructor, and
- zero or more public property setters.
--->
-<!ELEMENT managed-bean-class (#PCDATA)>
-
-
-<!--
- The "managed-bean-name" element represents the attribute name under
- which a managed bean will be searched for, as well as stored (unless
- the "managed-bean-scope" value is "none"). It must be of type
- "Identifier".
--->
-<!ELEMENT managed-bean-name (#PCDATA)>
-
-
-<!--
- The "managed-bean-scope" element represents the scope into which a newly
- created instance of the specified managed bean will be stored (unless
- the value is "none"). It must be of type "ScopeOrNone".
--->
-<!ELEMENT managed-bean-scope (#PCDATA)>
-
-<!--
- The "navigation-handler" element contains the fully qualified class name
- of the concrete NavigationHandler implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle,
- if the default ActionListener (provided by the JSF implementation) is used.
- It must be of type "ClassName".
--->
-<!ELEMENT navigation-handler (#PCDATA)>
-
-<!--
-The "phase-listener" element contains the fully qualified class
-name of the concrete PhaseListener implementation class that will be
-registered on the Lifecycle. It must be of type "ClassName".
--->
-<!ELEMENT phase-listener (#PCDATA)>
-
-<!--
- The "redirect" element indicates that navigation to the specified
- "to-view-id" should be accomplished by performing an HTTP redirect
- rather than the usual ViewHandler mechanisms.
--->
-<!ELEMENT redirect EMPTY>
-
-<!--
- The "suggested-value" contains the value for the property or
- attribute in which this element resides. This value is advisory
- only and is intended for tools to use when populating pallettes.
--->
-<!ELEMENT suggested-value (#PCDATA)>
-
-
-<!--
-
- The "view-handler" element contains the fully qualified class name
- of the concrete ViewHandler implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT view-handler (#PCDATA)>
-
-<!--
-
- The "state-manager" element contains the fully qualified class name
- of the concrete StateManager implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT state-manager (#PCDATA)>
-
-<!--
- The "null-value" element indicates that the managed property in which we
- are nested will be explicitly set to null if our managed bean is
- automatically created. This is different from omitting the managed
- property element entirely, which will cause no property setter to be
- called for this property.
-
- The "null-value" element can only be used when the associated
- "property-class" identifies a Java class, not a Java primitive.
--->
-<!ELEMENT null-value EMPTY>
-
-
-<!--
- The "property-class" element represents the Java type of the value
- associated with this property name. It must be of type "JavaType".
- If not specified, it can be inferred from existing classes; however,
- this element should be specified if the configuration file is going
- to be the source for generating the corresponding classes.
--->
-<!ELEMENT property-class (#PCDATA)>
-
-
-<!--
- The "property-name" element represents the JavaBeans property name
- under which the corresponding value may be stored.
--->
-<!ELEMENT property-name (#PCDATA)>
-
-
-<!--
- The "property-resolver" element contains the fully qualified class name
- of the concrete PropertyResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT property-resolver (#PCDATA)>
-
-
-<!--
- The "referenced-bean-class" element represents the fully qualified class
- name of the Java class (either abstract or concrete) or Java interface
- implemented by the corresponding referenced bean. It must be of type
- "ClassName".
--->
-<!ELEMENT referenced-bean-class (#PCDATA)>
-
-
-<!--
- The "referenced-bean-name" element represents the attribute name under
- which the corresponding referenced bean may be assumed to be stored,
- in one of the scopes defined by the "Scope" type. It must be of type
- "Identifier".
--->
-<!ELEMENT referenced-bean-name (#PCDATA)>
-
-
-<!--
- The "render-kit-id" element represents an identifier for the
- RenderKit represented by the parent "render-kit" element.
--->
-<!ELEMENT render-kit-id (#PCDATA)>
-
-
-<!--
- The "render-kit-class" element represents the fully qualified class name
- of a concrete RenderKit implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT render-kit-class (#PCDATA)>
-
-
-<!--
- The "renderer-class" element represents the fully qualified class name
- of a concrete Renderer implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT renderer-class (#PCDATA)>
-
-<!--
- The "render-kit-factory" element contains the fully qualified class name
- of the concrete RenderKitFactory implementation class that will be called
- when FactoryFinder.getFactory(RENDER_KIT_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT render-kit-factory (#PCDATA)>
-
-<!--
- The "renderer-type" element represents a renderer type identifier for the
- Renderer represented by the parent "renderer" element.
--->
-<!ELEMENT renderer-type (#PCDATA)>
-
-<!--
- The "small-icon" element contains the resource path to a large (16x16)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
- The "supported-locale" element allows authors to declare which
- locales are supported in this application instance.
-
- It must be specified as :language:[_:country:[_:variant:]] without
- the colons, for example "ja_JP_SJIS". The separators between the
- segments may be '-' or '_'.
--->
-<!ELEMENT supported-locale (#PCDATA)>
-
-<!--
- The "to-view" element contains the view identifier of the next view
- that should be displayed if this navigation rule is matched. It
- must be of type "ViewId".
--->
-<!ELEMENT to-view-id (#PCDATA)>
-
-
-<!--
- The "validator-class" element represents the fully qualified class name
- of a concrete Validator implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT validator-class (#PCDATA)>
-
-
-<!--
- The "validator-id" element represents the identifier under which the
- corresponding Validator class should be registered.
--->
-<!ELEMENT validator-id (#PCDATA)>
-
-
-<!--
- The "value" element is the String representation of a literal
- value to which a scalar managed property will be set, or a value
- binding expression ("#{...}") that will be used to calculate the
- required value. It will be converted as specified for the actual
- property type.
--->
-<!ELEMENT value (#PCDATA)>
-
-
-<!--
- The "value-class" element defines the Java type to which each
- "value" element's value will be converted to, prior to adding it to
- the "list-entries" list for a managed property that is a
- java.util.List, or a "map-entries" map for a managed property that
- is a java.util.Map. It must be of type "ClassName". If omitted,
- "java.lang.String" is assumed.
--->
-<!ELEMENT value-class (#PCDATA)>
-
-<!--
- The "variable-resolver" element contains the fully qualified class name
- of the concrete VariableResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT variable-resolver (#PCDATA)>
-
-
-<!-- ============================ Identifier Attributes ==================== -->
-
-
-<!ATTLIST action-listener id ID #IMPLIED>
-<!ATTLIST application id ID #IMPLIED>
-<!ATTLIST application-factory id ID #IMPLIED>
-<!ATTLIST attribute id ID #IMPLIED>
-<!ATTLIST attribute-class id ID #IMPLIED>
-<!ATTLIST attribute-extension id ID #IMPLIED>
-<!ATTLIST attribute-name id ID #IMPLIED>
-<!ATTLIST component id ID #IMPLIED>
-<!ATTLIST component-class id ID #IMPLIED>
-<!ATTLIST component-extension id ID #IMPLIED>
-<!ATTLIST component-family id ID #IMPLIED>
-<!ATTLIST component-type id ID #IMPLIED>
-<!ATTLIST converter id ID #IMPLIED>
-<!ATTLIST converter-class id ID #IMPLIED>
-<!ATTLIST converter-for-class id ID #IMPLIED>
-<!ATTLIST converter-id id ID #IMPLIED>
-<!ATTLIST default-locale id ID #IMPLIED>
-<!ATTLIST default-render-kit-id id ID #IMPLIED>
-<!ATTLIST default-value id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST faces-config id ID #IMPLIED>
-<!ATTLIST faces-context-factory id ID #IMPLIED>
-<!ATTLIST factory id ID #IMPLIED>
-<!ATTLIST from-action id ID #IMPLIED>
-<!ATTLIST from-outcome id ID #IMPLIED>
-<!ATTLIST from-view-id id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST key id ID #IMPLIED>
-<!ATTLIST key-class id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST lifecycle id ID #IMPLIED>
-<!ATTLIST lifecycle-factory id ID #IMPLIED>
-<!ATTLIST list-entries id ID #IMPLIED>
-<!ATTLIST locale-config id ID #IMPLIED>
-<!ATTLIST managed-bean id ID #IMPLIED>
-<!ATTLIST managed-bean-class id ID #IMPLIED>
-<!ATTLIST managed-bean-name id ID #IMPLIED>
-<!ATTLIST managed-bean-scope id ID #IMPLIED>
-<!ATTLIST managed-property id ID #IMPLIED>
-<!ATTLIST map-entries id ID #IMPLIED>
-<!ATTLIST map-entry id ID #IMPLIED>
-<!ATTLIST message-bundle id ID #IMPLIED>
-<!ATTLIST navigation-case id ID #IMPLIED>
-<!ATTLIST navigation-handler id ID #IMPLIED>
-<!ATTLIST navigation-rule id ID #IMPLIED>
-<!ATTLIST null-value id ID #IMPLIED>
-<!ATTLIST phase-listener id ID #IMPLIED>
-<!ATTLIST property id ID #IMPLIED>
-<!ATTLIST property-class id ID #IMPLIED>
-<!ATTLIST property-extension id ID #IMPLIED>
-<!ATTLIST property-name id ID #IMPLIED>
-<!ATTLIST property-resolver id ID #IMPLIED>
-<!ATTLIST redirect id ID #IMPLIED>
-<!ATTLIST referenced-bean id ID #IMPLIED>
-<!ATTLIST referenced-bean-class id ID #IMPLIED>
-<!ATTLIST referenced-bean-name id ID #IMPLIED>
-<!ATTLIST render-kit id ID #IMPLIED>
-<!ATTLIST render-kit-class id ID #IMPLIED>
-<!ATTLIST render-kit-factory id ID #IMPLIED>
-<!ATTLIST render-kit-id id ID #IMPLIED>
-<!ATTLIST renderer id ID #IMPLIED>
-<!ATTLIST renderer-class id ID #IMPLIED>
-<!ATTLIST renderer-extension id ID #IMPLIED>
-<!ATTLIST renderer-type id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST state-manager id ID #IMPLIED>
-<!ATTLIST suggested-value id ID #IMPLIED>
-<!ATTLIST supported-locale id ID #IMPLIED>
-<!ATTLIST to-view-id id ID #IMPLIED>
-<!ATTLIST validator id ID #IMPLIED>
-<!ATTLIST validator-class id ID #IMPLIED>
-<!ATTLIST validator-id id ID #IMPLIED>
-<!ATTLIST value id ID #IMPLIED>
-<!ATTLIST value-class id ID #IMPLIED>
-<!ATTLIST variable-resolver id ID #IMPLIED>
-<!ATTLIST view-handler id ID #IMPLIED>
-
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_1.dtd
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_1.dtd 2007-07-20 17:14:31 UTC (rev 2566)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_1.dtd 2007-07-20 17:15:38 UTC (rev 2567)
@@ -1,900 +0,0 @@
-<!--
- Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
--->
-
-<!--
- DTD for the JavaServer Faces Application Configuration File (Version 1.1)
-
- To support validation of your configuration file(s), include the following
- DOCTYPE element at the beginning (after the "xml" declaration):
-
- <!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-
- $Id: web-facesconfig_1_1.dtd,v 1.1.1.1 2004/10/06 17:31:39 sim Exp $
-
--->
-
-
-<!-- ==================== Defined Types =================================== -->
-
-
-<!--
- An "Action" is a String that represents a method binding
- expression that points at a method with no arguments that returns a
- String. It must be bracketed with "#{}", for example,
- "#{cardemo.buyCar}".
--->
-<!ENTITY % Action "CDATA">
-
-
-<!--
- A "ClassName" is the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element.
--->
-<!ENTITY % ClassName "CDATA">
-
-
-<!--
- An "Identifier" is a string of characters that conforms to the variable
- naming conventions of the Java programming language (JLS Section ?.?.?).
--->
-<!ENTITY % Identifier "CDATA">
-
-
-<!--
- A "JavaType" is either the fully qualified name of a Java class that is
- instantiated to provide the functionality of the enclosing element, or
- the name of a Java primitive type (such as int or char). The class name
- or primitive type may optionally be followed by "[]" to indicate that
- the underlying data must be an array, rather than a scalar variable.
--->
-<!ENTITY % JavaType "CDATA">
-
-
-<!--
- A "Language" is a lower case two-letter code for a language as defined
- by ISL-639.
--->
-<!ENTITY % Language "CDATA">
-
-
-<!--
- A "ResourcePath" is the relative or absolute path to a resource file
- (such as a logo image).
--->
-<!ENTITY % ResourcePath "CDATA">
-
-
-<!--
- A "Scope" is the well-known name of a scope in which managed beans may
- optionally be defined to be created in.
--->
-<!ENTITY % Scope "(request|session|application)">
-
-
-
-<!--
- A "ScopeOrNone" element defines the legal values for the
- <managed-bean-scope> element's body content, which includes
- all of the scopes respresented by the "Scope" type, plus the
- "none" value indicating that a created bean should not be
- stored into any scope.
--->
-<!ENTITY % ScopeOrNone "(request|session|application|none)">
-
-
-<!--
- A "ViewIdPattern" is a pattern for matching view identifiers in
- order to determine whether a particular navigation rule should be
- fired. It must contain one of the following values:
-
- - The exact match for a view identifier that is recognized
- by the the ViewHandler implementation being used (such as
- "/index.jsp" if you are using the default ViewHandler).
-
- - A proper prefix of a view identifier, plus a trailing "*"
- character. This pattern indicates that all view identifiers that
- match the portion of the pattern up to the asterisk will match the
- surrounding rule. When more than one match exists, the match with
- the longest pattern is selected.
-
- - An "*" character, which means that this pattern applies to all
- view identifiers.
--->
-<!ENTITY % ViewIdPattern "CDATA">
-
-
-<!-- ==================== Top Level Elements ============================== -->
-
-
-<!--
- The "faces-config" element is the root of the configuration information
- hierarchy, and contains nested elements for all of the other configuration
- settings.
--->
-<!ELEMENT faces-config ((application|factory|component|converter|managed-bean|navigation-rule|referenced-bean|render-kit|lifecycle|validator)*)>
-<!ATTLIST faces-config
- xmlns CDATA #FIXED "http://java.sun.com/JSF/Configuration">
-
-
-
-<!-- ==================== Definition Elements ============================= -->
-
-
-<!--
- The "application" element provides a mechanism to define the various
- per-application-singleton implementation artifacts for a particular web
- application that is utilizing JavaServer Faces. For nested elements
- that are not specified, the JSF implementation must provide a suitable
- default.
--->
-<!ELEMENT application ((action-listener|default-render-kit-id|message-bundle|navigation-handler|view-handler|state-manager|property-resolver|variable-resolver|locale-config)*)>
-
-
-<!--
- The "factory" element provides a mechanism to define the various
- Factories that comprise parts of the implementation of JavaServer
- Faces. For nested elements that are not specified, the JSF
- implementation must provide a suitable default.
--->
-<!ELEMENT factory ((application-factory|faces-context-factory|lifecycle-factory|render-kit-factory)*)>
-
-
-<!--
- The "attribute" element represents a named, typed, value associated with
- the parent UIComponent via the generic attributes mechanism.
-
- Attribute names must be unique within the scope of the parent (or related)
- component.
--->
-<!ELEMENT attribute (description*, display-name*, icon*, attribute-name, attribute-class, default-value?, suggested-value?, attribute-extension*)>
-
-<!--
- Extension element for attribute. May contain implementation
- specific content.
--->
-<!ELEMENT attribute-extension ANY>
-
-
-<!--
- The "component" element represents a concrete UIComponent implementation
- class that should be registered under the specified type identifier,
- along with its associated properties and attributes. Component types must
- be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that are recognized
- by the implementation logic of this component. Nested "property" elements
- identify JavaBeans properties of the component class that may be exposed
- for manipulation via tools.
--->
-<!ELEMENT component (description*, display-name*, icon*, component-type, component-class, facet*, attribute*, property*, component-extension*)>
-
-<!--
- Extension element for component. May contain implementation
- specific content.
--->
-<!ELEMENT component-extension ANY>
-
-<!--
- Define the name and other design-time information for a facet that is
- associated with a renderer or a component.
--->
-
-<!ELEMENT facet (description*, display-name*, icon*, facet-name, facet-extension*)>
-
-<!--
- Extension element for facet. May contain implementation
- specific content.
--->
-<!ELEMENT facet-extension ANY>
-
-<!--
- The "facet-name" element represents the facet name under which a
- UIComponent will be added to its parent. It must be of type
- "Identifier".
--->
-<!ELEMENT facet-name (#PCDATA)>
-
-<!--
- The "converter" element represents a concrete Converter implementation
- class that should be registered under the specified converter identifier.
- Converter identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Converter. Nested "property" elements identify JavaBeans
- properties of the Converter implementation class that may be configured
- to affect the operation of the Converter.
--->
-<!ELEMENT converter (description*, display-name*, icon*, (converter-id | converter-for-class), converter-class, attribute*, property*)>
-
-
-<!--
- The "icon" element contains "small-icon" and "large-icon" elements that
- specify the resoruce paths for small and large GIF or JPG icon images
- used to represent the parent element in a GUI tool.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-<!ATTLIST icon xml:lang %Language; #IMPLIED>
-
-<!--
- The "lifecycle" element provides a mechanism to specify
- modifications to the behaviour of the default Lifecycle
- implementation for this web application.
--->
-<!ELEMENT lifecycle (phase-listener*)>
-
-<!--
- The "locale-config" element allows the app developer to declare the
- supported locales for this application.
--->
-<!ELEMENT locale-config (default-locale?, supported-locale*)>
-
-<!--
- The "managed-bean" element represents a JavaBean, of a particular class,
- that will be dynamically instantiated at runtime (by the default
- VariableResolver implementation) if it is referenced as the first element
- of a value binding expression, and no corresponding bean can be
- identified in any scope. In addition to the creation of the managed bean,
- and the optional storing of it into the specified scope, the nested
- managed-property elements can be used to initialize the contents of
- settable JavaBeans properties of the created instance.
--->
-<!ELEMENT managed-bean (description*, display-name*, icon*, managed-bean-name, managed-bean-class, managed-bean-scope, (managed-property* | map-entries | list-entries))>
-
-
-<!--
- The "managed-property" element represents an individual property of a
- managed bean that will be configured to the specified value (or value set)
- if the corresponding managed bean is automatically created.
--->
-<!ELEMENT managed-property (description*, display-name*, icon*, property-name, property-class?, (map-entries|null-value|value|list-entries))>
-
-
-<!--
- The "map-entry" element reprsents a single key-entry pair that
- will be added to the computed value of a managed property of type
- java.util.Map.
--->
-<!ELEMENT map-entry (key, (null-value|value))>
-
-
-<!--
- The "map-entries' element represents a set of key-entry pairs that
- will be added to the computed value of a managed property of type
- java.util.Map. In addition, the Java class types of the key and entry
- values may be optionally declared.
--->
-<!ELEMENT map-entries (key-class?, value-class?, map-entry*)>
-
-
-<!--
- The base name of a resource bundle representing the message resources
- for this application. See the JavaDocs for the "java.util.ResourceBundle"
- class for more information on the syntax of resource bundle names.
--->
-
-<!ELEMENT message-bundle (#PCDATA)>
-
-
-<!--
- The "navigation-case" element describes a particular combination of
- conditions that must match for this case to be executed, and the
- view id of the component tree that should be selected next.
--->
-<!ELEMENT navigation-case (description*, display-name*, icon*, from-action?, from-outcome?, to-view-id, redirect?)>
-
-
-<!--
- The "navigation-rule" element represents an individual decision rule
- that will be utilized by the default NavigationHandler
- implementation to make decisions on what view should be displayed
- next, based on the view id being processed.
--->
-<!ELEMENT navigation-rule (description*, display-name*, icon*, from-view-id?, navigation-case*)>
-
-
-<!--
- The "property" element represents a JavaBean property of the Java class
- represented by our parent element.
-
- Property names must be unique within the scope of the Java class
- that is represented by the parent element, and must correspond to
- property names that will be recognized when performing introspection
- against that class via java.beans.Introspector.
--->
-<!ELEMENT property (description*, display-name*, icon*, property-name, property-class, default-value?, suggested-value?, property-extension*)>
-
-<!--
- Extension element for property. May contain implementation
- specific content.
--->
-<!ELEMENT property-extension ANY>
-
-<!--
- The "referenced-bean" element represents at design time the promise
- that a Java object of the specified type will exist at runtime in some
- scope, under the specified key. This can be used by design time tools
- to construct user interface dialogs based on the properties of the
- specified class. The presence or absence of a referenced bean
- element has no impact on the JavaServer Faces runtime environment
- inside a web application.
--->
-<!ELEMENT referenced-bean (description*, display-name*, icon*, referenced-bean-name, referenced-bean-class)>
-
-
-<!--
- The "render-kit" element represents a concrete RenderKit implementation
- that should be registered under the specified render-kit-id. If no
- render-kit-id is specified, the identifier of the default RenderKit
- (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
--->
-<!ELEMENT render-kit (description*, display-name*, icon*, render-kit-id?, render-kit-class?, renderer*)>
-
-
-<!--
- The "renderer" element represents a concrete Renderer implementation
- class that should be registered under the specified component family
- and renderer type identifiers, in the RenderKit associated with the
- parent "render-kit" element. Combinations of component family and renderer
- type must be unique within the RenderKit associated with the parent
- "render-kit" element.
-
- Nested "attribute" elements identify generic component attributes that
- are recognized by this renderer.
--->
-<!ELEMENT renderer (description*, display-name*, icon*, component-family, renderer-type, renderer-class, facet*, attribute*, renderer-extension*)>
-
-<!--
- Extension element for renderer. May contain implementation
- specific content.
--->
-<!ELEMENT renderer-extension ANY>
-
-<!--
- The "validator" element represents a concrete Validator implementation
- class that should be registered under the specified validator identifier.
- Validator identifiers must be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that may be
- configured on the corresponding UIComponent in order to affect the
- operation of the Validator. Nested "property" elements identify JavaBeans
- properties of the Validator implementation class that may be configured
- to affect the operation of the Validator.
--->
-<!ELEMENT validator (description*, display-name*, icon*, validator-id, validator-class, attribute*, property*)>
-
-
-<!--
- The "list-entries" element represents a set of initialization
- elements for a managed property that is a java.util.List or an
- array. In the former case, the "value-class" element can optionally
- be used to declare the Java type to which each value should be
- converted before adding it to the Collection.
--->
-<!ELEMENT list-entries (value-class?, (null-value|value)*)>
-
-
-<!-- ==================== Subordinate Elements ============================ -->
-
-
-<!--
- The "action-listener" element contains the fully qualified class name
- of the concrete ActionListener implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle.
- It must be of type "ClassName".
--->
-<!ELEMENT action-listener (#PCDATA)>
-
-<!--
- The "application-factory" element contains the fully qualified class
- name of the concrete ApplicationFactory implementation class that
- will be called when FactoryFinder.getFactory(APPLICATION_FACTORY) is
- called. It must be of type "ClassName".
--->
-<!ELEMENT application-factory (#PCDATA)>
-
-<!--
- The "attribute-class" element represents the Java type of the value
- associated with this attribute name. It must be of type "ClassName".
--->
-<!ELEMENT attribute-class (#PCDATA)>
-
-
-<!--
- The "attribute-name" element represents the name under which the
- corresponding value will be stored, in the generic attributes of the
- UIComponent we are related to.
--->
-<!ELEMENT attribute-name (#PCDATA)>
-
-
-<!--
- The "component-class" element represents the fully qualified class name
- of a concrete UIComponent implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT component-class (#PCDATA)>
-
-
-<!--
- The "component-family" element represents the component family for
- which the Renderer represented by the parent "renderer" element will be
- used.
--->
-<!ELEMENT component-family (#PCDATA)>
-
-<!--
- The "component-type" element represents the name under which the
- corresponding UIComponent class should be registered.
--->
-<!ELEMENT component-type (#PCDATA)>
-
-
-<!--
- The "converter-class" element represents the fully qualified class name
- of a concrete Converter implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-class (#PCDATA)>
-
-
-<!--
- The "converter-for-class" element represents the fully qualified class name
- for which a Converter class will be registered. It must be of
- type "ClassName".
--->
-<!ELEMENT converter-for-class (#PCDATA)>
-
-
-<!--
- The "converter-id" element represents the identifier under which the
- corresponding Converter class should be registered.
--->
-<!ELEMENT converter-id (#PCDATA)>
-
-<!--
- The "default-render-kit-id" element allows the application to define
- a renderkit to be used other than the standard one.
--->
-<!ELEMENT default-render-kit-id (#PCDATA)>
-
-<!--
- The "default-locale" element declares the default locale for this
- application instance. It must be specified as
- :language:[_:country:[_:variant:]] without the colons, for example
- "ja_JP_SJIS". The separators between the segments may be '-' or
- '_'.
--->
-<!ELEMENT default-locale (#PCDATA)>
-
-<!--
- The "default-value" contains the value for the property or attribute
- in which this element resides. This value differs from the
- "suggested-value" in that the property or attribute must take the
- value, whereas in "suggested-value" taking the value is optional.
--->
-<!ELEMENT default-value (#PCDATA)>
-
-<!--
- The "description" element contains a textual description of the element
- it is nested in, optionally flagged with a language code using the
- "xml:lang" attribute.
--->
-<!ELEMENT description ANY>
-<!ATTLIST description xml:lang %Language; #IMPLIED>
-
-
-<!--
- The "display-name" element is a short descriptive name describing the
- entity associated with the element it is nested in, intended to be
- displayed by tools, and optionally flagged with a language code using
- the "xml:lang" attribute.
--->
-<!ELEMENT display-name (#PCDATA)>
-<!ATTLIST display-name xml:lang %Language; #IMPLIED>
-
-<!--
- The "faces-context-factory" element contains the fully qualified
- class name of the concrete FacesContextFactory implementation class
- that will be called when
- FactoryFinder.getFactory(FACES_CONTEXT_FACTORY) is called. It must
- be of type "ClassName".
--->
-<!ELEMENT faces-context-factory (#PCDATA)>
-
-<!--
- The "from-action" element contains an action reference expression
- that must have been executed (by the default ActionListener for handling
- application level events) in order to select this navigation rule. If
- not specified, this rule will be relevant no matter which action reference
- was executed (or if no action reference was executed).
-
- This value must be of type "Action".
--->
-<!ELEMENT from-action (#PCDATA)>
-
-
-<!--
- The "from-outcome" element contains a logical outcome string returned
- by the execution of an application action method selected via an
- "actionRef" property (or a literal value specified by an "action"
- property) of a UICommand component. If specified, this rule will be
- relevant only if the outcome value matches this element's value. If
- not specified, this rule will be relevant no matter what the outcome
- value was.
--->
-<!ELEMENT from-outcome (#PCDATA)>
-
-
-<!--
- The "from-view-id" element contains the view identifier of the view
- for which the containing navigation rule is relevant. If no
- "from-view" element is specified, this rule applies to navigation
- decisions on all views. If this element is not specified, a value
- of "*" is assumed, meaning that this navigation rule applies to all
- views.
-
- This value must be of type "ViewIdPattern".
--->
-<!ELEMENT from-view-id (#PCDATA)>
-
-
-<!--
- The "key" element is the String representation of a map key that
- will be stored in a managed property of type java.util.Map.
--->
-<!ELEMENT key (#PCDATA)>
-
-
-<!--
- The "key-class" element defines the Java type to which each "key"
- element in a set of "map-entry" elements will be converted to. It
- must be of type "ClassName". If omitted, "java.lang.String"
- is assumed.
--->
-<!ELEMENT key-class (#PCDATA)>
-
-
-<!--
- The "large-icon" element contains the resource path to a large (32x32)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
- The "lifecycle-factory" element contains the fully qualified class name
- of the concrete LifecycleFactory implementation class that will be called
- when FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT lifecycle-factory (#PCDATA)>
-
-<!--
- The "managed-bean-class" element represents the fully qualified class
- name of the Java class that will be used to instantiate a new instance
- if creation of the specified managed bean is requested. It must be of
- type "ClassName".
-
- The specified class must conform to standard JavaBeans conventions.
- In particular, it must have a public zero-arguments constructor, and
- zero or more public property setters.
--->
-<!ELEMENT managed-bean-class (#PCDATA)>
-
-
-<!--
- The "managed-bean-name" element represents the attribute name under
- which a managed bean will be searched for, as well as stored (unless
- the "managed-bean-scope" value is "none"). It must be of type
- "Identifier".
--->
-<!ELEMENT managed-bean-name (#PCDATA)>
-
-
-<!--
- The "managed-bean-scope" element represents the scope into which a newly
- created instance of the specified managed bean will be stored (unless
- the value is "none"). It must be of type "ScopeOrNone".
--->
-<!ELEMENT managed-bean-scope (#PCDATA)>
-
-<!--
- The "navigation-handler" element contains the fully qualified class name
- of the concrete NavigationHandler implementation class that will be called
- during the Invoke Application phase of the request processing lifecycle,
- if the default ActionListener (provided by the JSF implementation) is used.
- It must be of type "ClassName".
--->
-<!ELEMENT navigation-handler (#PCDATA)>
-
-<!--
-The "phase-listener" element contains the fully qualified class
-name of the concrete PhaseListener implementation class that will be
-registered on the Lifecycle. It must be of type "ClassName".
--->
-<!ELEMENT phase-listener (#PCDATA)>
-
-<!--
- The "redirect" element indicates that navigation to the specified
- "to-view-id" should be accomplished by performing an HTTP redirect
- rather than the usual ViewHandler mechanisms.
--->
-<!ELEMENT redirect EMPTY>
-
-<!--
- The "suggested-value" contains the value for the property or
- attribute in which this element resides. This value is advisory
- only and is intended for tools to use when populating pallettes.
--->
-<!ELEMENT suggested-value (#PCDATA)>
-
-
-<!--
-
- The "view-handler" element contains the fully qualified class name
- of the concrete ViewHandler implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT view-handler (#PCDATA)>
-
-<!--
-
- The "state-manager" element contains the fully qualified class name
- of the concrete StateManager implementation class that will be called
- during the Restore View and Render Response phases of the request
- processing lifecycle. The faces implementation must provide a
- default implementation of this class
--->
-<!ELEMENT state-manager (#PCDATA)>
-
-<!--
- The "null-value" element indicates that the managed property in which we
- are nested will be explicitly set to null if our managed bean is
- automatically created. This is different from omitting the managed
- property element entirely, which will cause no property setter to be
- called for this property.
-
- The "null-value" element can only be used when the associated
- "property-class" identifies a Java class, not a Java primitive.
--->
-<!ELEMENT null-value EMPTY>
-
-
-<!--
- The "property-class" element represents the Java type of the value
- associated with this property name. It must be of type "JavaType".
- If not specified, it can be inferred from existing classes; however,
- this element should be specified if the configuration file is going
- to be the source for generating the corresponding classes.
--->
-<!ELEMENT property-class (#PCDATA)>
-
-
-<!--
- The "property-name" element represents the JavaBeans property name
- under which the corresponding value may be stored.
--->
-<!ELEMENT property-name (#PCDATA)>
-
-
-<!--
- The "property-resolver" element contains the fully qualified class name
- of the concrete PropertyResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT property-resolver (#PCDATA)>
-
-
-<!--
- The "referenced-bean-class" element represents the fully qualified class
- name of the Java class (either abstract or concrete) or Java interface
- implemented by the corresponding referenced bean. It must be of type
- "ClassName".
--->
-<!ELEMENT referenced-bean-class (#PCDATA)>
-
-
-<!--
- The "referenced-bean-name" element represents the attribute name under
- which the corresponding referenced bean may be assumed to be stored,
- in one of the scopes defined by the "Scope" type. It must be of type
- "Identifier".
--->
-<!ELEMENT referenced-bean-name (#PCDATA)>
-
-
-<!--
- The "render-kit-id" element represents an identifier for the
- RenderKit represented by the parent "render-kit" element.
--->
-<!ELEMENT render-kit-id (#PCDATA)>
-
-
-<!--
- The "render-kit-class" element represents the fully qualified class name
- of a concrete RenderKit implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT render-kit-class (#PCDATA)>
-
-
-<!--
- The "renderer-class" element represents the fully qualified class name
- of a concrete Renderer implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT renderer-class (#PCDATA)>
-
-<!--
- The "render-kit-factory" element contains the fully qualified class name
- of the concrete RenderKitFactory implementation class that will be called
- when FactoryFinder.getFactory(RENDER_KIT_FACTORY) is called. It must be
- of type "ClassName".
--->
-<!ELEMENT render-kit-factory (#PCDATA)>
-
-<!--
- The "renderer-type" element represents a renderer type identifier for the
- Renderer represented by the parent "renderer" element.
--->
-<!ELEMENT renderer-type (#PCDATA)>
-
-<!--
- The "small-icon" element contains the resource path to a large (16x16)
- icon image. The image may be in either GIF or JPG format.
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
- The "supported-locale" element allows authors to declare which
- locales are supported in this application instance.
-
- It must be specified as :language:[_:country:[_:variant:]] without
- the colons, for example "ja_JP_SJIS". The separators between the
- segments may be '-' or '_'.
--->
-<!ELEMENT supported-locale (#PCDATA)>
-
-<!--
- The "to-view" element contains the view identifier of the next view
- that should be displayed if this navigation rule is matched. It
- must be of type "ViewId".
--->
-<!ELEMENT to-view-id (#PCDATA)>
-
-
-<!--
- The "validator-class" element represents the fully qualified class name
- of a concrete Validator implementation class. It must be of
- type "ClassName".
--->
-<!ELEMENT validator-class (#PCDATA)>
-
-
-<!--
- The "validator-id" element represents the identifier under which the
- corresponding Validator class should be registered.
--->
-<!ELEMENT validator-id (#PCDATA)>
-
-
-<!--
- The "value" element is the String representation of a literal
- value to which a scalar managed property will be set, or a value
- binding expression ("#{...}") that will be used to calculate the
- required value. It will be converted as specified for the actual
- property type.
--->
-<!ELEMENT value (#PCDATA)>
-
-
-<!--
- The "value-class" element defines the Java type to which each
- "value" element's value will be converted to, prior to adding it to
- the "list-entries" list for a managed property that is a
- java.util.List, or a "map-entries" map for a managed property that
- is a java.util.Map. It must be of type "ClassName". If omitted,
- "java.lang.String" is assumed.
--->
-<!ELEMENT value-class (#PCDATA)>
-
-<!--
- The "variable-resolver" element contains the fully qualified class name
- of the concrete VariableResolver implementation class that will be used
- during the processing of value binding expressions.
- It must be of type "ClassName".
--->
-<!ELEMENT variable-resolver (#PCDATA)>
-
-
-<!-- ============================ Identifier Attributes ==================== -->
-
-
-<!ATTLIST action-listener id ID #IMPLIED>
-<!ATTLIST application id ID #IMPLIED>
-<!ATTLIST application-factory id ID #IMPLIED>
-<!ATTLIST attribute id ID #IMPLIED>
-<!ATTLIST attribute-class id ID #IMPLIED>
-<!ATTLIST attribute-extension id ID #IMPLIED>
-<!ATTLIST attribute-name id ID #IMPLIED>
-<!ATTLIST component id ID #IMPLIED>
-<!ATTLIST component-class id ID #IMPLIED>
-<!ATTLIST component-extension id ID #IMPLIED>
-<!ATTLIST component-family id ID #IMPLIED>
-<!ATTLIST component-type id ID #IMPLIED>
-<!ATTLIST converter id ID #IMPLIED>
-<!ATTLIST converter-class id ID #IMPLIED>
-<!ATTLIST converter-for-class id ID #IMPLIED>
-<!ATTLIST converter-id id ID #IMPLIED>
-<!ATTLIST default-locale id ID #IMPLIED>
-<!ATTLIST default-render-kit-id id ID #IMPLIED>
-<!ATTLIST default-value id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST faces-config id ID #IMPLIED>
-<!ATTLIST faces-context-factory id ID #IMPLIED>
-<!ATTLIST facet id ID #IMPLIED>
-<!ATTLIST facet-extension id ID #IMPLIED>
-<!ATTLIST facet-name id ID #IMPLIED>
-<!ATTLIST factory id ID #IMPLIED>
-<!ATTLIST from-action id ID #IMPLIED>
-<!ATTLIST from-outcome id ID #IMPLIED>
-<!ATTLIST from-view-id id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST key id ID #IMPLIED>
-<!ATTLIST key-class id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST lifecycle id ID #IMPLIED>
-<!ATTLIST lifecycle-factory id ID #IMPLIED>
-<!ATTLIST list-entries id ID #IMPLIED>
-<!ATTLIST locale-config id ID #IMPLIED>
-<!ATTLIST managed-bean id ID #IMPLIED>
-<!ATTLIST managed-bean-class id ID #IMPLIED>
-<!ATTLIST managed-bean-name id ID #IMPLIED>
-<!ATTLIST managed-bean-scope id ID #IMPLIED>
-<!ATTLIST managed-property id ID #IMPLIED>
-<!ATTLIST map-entries id ID #IMPLIED>
-<!ATTLIST map-entry id ID #IMPLIED>
-<!ATTLIST message-bundle id ID #IMPLIED>
-<!ATTLIST navigation-case id ID #IMPLIED>
-<!ATTLIST navigation-handler id ID #IMPLIED>
-<!ATTLIST navigation-rule id ID #IMPLIED>
-<!ATTLIST null-value id ID #IMPLIED>
-<!ATTLIST phase-listener id ID #IMPLIED>
-<!ATTLIST property id ID #IMPLIED>
-<!ATTLIST property-class id ID #IMPLIED>
-<!ATTLIST property-extension id ID #IMPLIED>
-<!ATTLIST property-name id ID #IMPLIED>
-<!ATTLIST property-resolver id ID #IMPLIED>
-<!ATTLIST redirect id ID #IMPLIED>
-<!ATTLIST referenced-bean id ID #IMPLIED>
-<!ATTLIST referenced-bean-class id ID #IMPLIED>
-<!ATTLIST referenced-bean-name id ID #IMPLIED>
-<!ATTLIST render-kit id ID #IMPLIED>
-<!ATTLIST render-kit-class id ID #IMPLIED>
-<!ATTLIST render-kit-factory id ID #IMPLIED>
-<!ATTLIST render-kit-id id ID #IMPLIED>
-<!ATTLIST renderer id ID #IMPLIED>
-<!ATTLIST renderer-class id ID #IMPLIED>
-<!ATTLIST renderer-extension id ID #IMPLIED>
-<!ATTLIST renderer-type id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST state-manager id ID #IMPLIED>
-<!ATTLIST suggested-value id ID #IMPLIED>
-<!ATTLIST supported-locale id ID #IMPLIED>
-<!ATTLIST to-view-id id ID #IMPLIED>
-<!ATTLIST validator id ID #IMPLIED>
-<!ATTLIST validator-class id ID #IMPLIED>
-<!ATTLIST validator-id id ID #IMPLIED>
-<!ATTLIST value id ID #IMPLIED>
-<!ATTLIST value-class id ID #IMPLIED>
-<!ATTLIST variable-resolver id ID #IMPLIED>
-<!ATTLIST view-handler id ID #IMPLIED>
-
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_2.xsd
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_2.xsd 2007-07-20 17:14:31 UTC (rev 2566)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/resources/meta/web-facesconfig_1_2.xsd 2007-07-20 17:15:38 UTC (rev 2567)
@@ -1,2070 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<xsd:schema
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xml="http://www.w3.org/XML/1998/namespace"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.2">
-
- <xsd:annotation>
- <xsd:documentation>
- $Id: web-facesconfig_1_2.xsd,v 1.1 2006/03/01 17:26:28 glory Exp $
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2005 Sun Microsystems, Inc.,
- 901 San Antonio Road,
- Palo Alto, California 94303, U.S.A.
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property
- rights relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, Java EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- <![CDATA[
-
- The XML Schema for the JavaServer Faces Application
- Configuration File (Version 1.2).
-
- All JavaServer Faces configuration files must indicate
- the JavaServer Faces schema by indicating the JavaServer
- Faces namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and by indicating the version of the schema by
- using the version element as shown below:
-
- <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="..."
- version="1.2">
- ...
- </faces-config>
-
- The instance documents may indicate the published
- version of the schema using xsi:schemaLocation attribute
- for javaee namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd
-
- ]]>
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_5.xsd"/>
-
- <!-- **************************************************** -->
-
- <xsd:element name = "faces-config" type="javaee:faces-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "faces-config" element is the root of the configuration
- information hierarchy, and contains nested elements for all
- of the other configuration settings.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:unique name="faces-config-converter-ID-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- Converter IDs must be unique within a document.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:selector xpath="javaee:converter"/>
- <xsd:field xpath="javaee:converter-id"/>
- </xsd:unique>
-
- <xsd:unique name="faces-config-converter-for-class-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- 'converter-for-class' element values must be unique
- within a document.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:selector xpath="javaee:converter"/>
- <xsd:field xpath="javaee:converter-for-class"/>
- </xsd:unique>
-
- <xsd:unique name="faces-config-validator-ID-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- Validator IDs must be unique within a document.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:selector xpath="javaee:validator"/>
- <xsd:field xpath="javaee:validator-id"/>
- </xsd:unique>
-
- <xsd:unique name="faces-config-managed-bean-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- Managed bean names must be unique within a document.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:selector xpath="javaee:managed-bean"/>
- <xsd:field xpath="javaee:managed-bean-name"/>
- </xsd:unique>
- </xsd:element>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "faces-config" element is the root of the configuration
- information hierarchy, and contains nested elements for all
- of the other configuration settings.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="application"
- type="javaee:faces-config-applicationType"/>
- <xsd:element name="factory"
- type="javaee:faces-config-factoryType"/>
- <xsd:element name="component"
- type="javaee:faces-config-componentType"/>
- <xsd:element name="converter"
- type="javaee:faces-config-converterType"/>
- <xsd:element name="managed-bean"
- type="javaee:faces-config-managed-beanType"/>
- <xsd:element name="navigation-rule"
- type="javaee:faces-config-navigation-ruleType"/>
- <xsd:element name="referenced-bean"
- type="javaee:faces-config-referenced-beanType"/>
- <xsd:element name="render-kit"
- type="javaee:faces-config-render-kitType"/>
- <xsd:element name="lifecycle"
- type="javaee:faces-config-lifecycleType"/>
- <xsd:element name="validator"
- type="javaee:faces-config-validatorType"/>
- <xsd:element name="faces-config-extension"
- type="javaee:faces-config-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:choice>
- <xsd:attribute name = "id" type = "xsd:ID"/>
- <xsd:attribute name="version"
- type="javaee:faces-config-versionType"
- use="required"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for faces-config. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-applicationType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "application" element provides a mechanism to define the
- various per-application-singleton implementation artifacts for
- a particular web application that is utilizing
- JavaServer Faces. For nested elements that are not specified,
- the JSF implementation must provide a suitable default.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="action-listener"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "action-listener" element contains the fully
- qualified class name of the concrete
- ActionListener implementation class that will be
- called during the Invoke Application phase of the
- request processing lifecycle.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="default-render-kit-id"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "default-render-kit-id" element allows the
- application to define a renderkit to be used other
- than the standard one.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="message-bundle"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The base name of a resource bundle representing
- the message resources for this application. See
- the JavaDocs for the "java.util.ResourceBundle"
- class for more information on the syntax of
- resource bundle names.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="navigation-handler"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "navigation-handler" element contains the
- fully qualified class name of the concrete
- NavigationHandler implementation class that will
- be called during the Invoke Application phase
- of the request processing lifecycle, if the
- default ActionListener (provided by the JSF
- implementation) is used.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="view-handler"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "view-handler" element contains the fully
- qualified class name of the concrete ViewHandler
- implementation class that will be called during
- the Restore View and Render Response phases of the
- request processing lifecycle. The faces
- implementation must provide a default
- implementation of this class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="state-manager"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "state-manager" element contains the fully
- qualified class name of the concrete StateManager
- implementation class that will be called during
- the Restore View and Render Response phases of the
- request processing lifecycle. The faces
- implementation must provide a default
- implementation of this class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="el-resolver"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "el-resolver" element contains the fully
- qualified class name of the concrete
- javax.el.ELResolver implementation class
- that will be used during the processing of
- EL expressions.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="property-resolver"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property-resolver" element contains the fully
- qualified class name of the concrete
- PropertyResolver implementation class that will
- be used during the processing of value binding
- expressions.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="variable-resolver"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "variable-resolver" element contains the fully
- qualified class name of the concrete
- VariableResolver implementation class that will
- be used during the processing of value binding
- expressions.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element
- name="locale-config"
- type="javaee:faces-config-locale-configType"/>
- <xsd:element
- name="resource-bundle"
- type="javaee:faces-config-application-resource-bundleType"/>
- <xsd:element name="application-extension"
- type="javaee:faces-config-application-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:choice>
- <xsd:attribute name = "id" type = "xsd:ID"/>
- </xsd:complexType>
-
- <xsd:complexType name="faces-config-application-resource-bundleType">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-bundle element inside the application element
- references a java.util.ResourceBundle instance by name
- using the var element. ResourceBundles referenced in this
- manner may be returned by a call to
- Application.getResourceBundle() passing the current
- FacesContext for this request and the value of the var
- element below.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="base-name"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The fully qualified class name of the
- java.util.ResourceBundle instance.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="var"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The name by which this ResourceBundle instance
- is retrieved by a call to
- Application.getResourceBundle().
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-application-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for application. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-factoryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "factory" element provides a mechanism to define the
- various Factories that comprise parts of the implementation
- of JavaServer Faces. For nested elements that are not
- specified, the JSF implementation must provide a suitable
- default.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="application-factory"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "application-factory" element contains the
- fully qualified class name of the concrete
- ApplicationFactory implementation class that will
- be called when
- FactoryFinder.getFactory(APPLICATION_FACTORY) is
- called.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="faces-context-factory"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "faces-context-factory" element contains the
- fully qualified class name of the concrete
- FacesContextFactory implementation class that will
- be called when
- FactoryFinder.getFactory(FACES_CONTEXT_FACTORY)
- is called.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="lifecycle-factory"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "lifecycle-factory" element contains the fully
- qualified class name of the concrete LifecycleFactory
- implementation class that will be called when
- FactoryFinder.getFactory(LIFECYCLE_FACTORY) is called.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="render-kit-factory"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "render-kit-factory" element contains the fully
- qualified class name of the concrete RenderKitFactory
- implementation class that will be called when
- FactoryFinder.getFactory(RENDER_KIT_FACTORY) is
- called.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="factory-extension"
- type="javaee:faces-config-factory-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:choice>
- <xsd:attribute name = "id" type = "xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-factory-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for factory. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-attributeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "attribute" element represents a named, typed, value
- associated with the parent UIComponent via the generic
- attributes mechanism.
-
- Attribute names must be unique within the scope of the parent
- (or related) component.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="attribute-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "attribute-name" element represents the name under
- which the corresponding value will be stored, in the
- generic attributes of the UIComponent we are related
- to.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="attribute-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "attribute-class" element represents the Java type
- of the value associated with this attribute name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="default-value"
- type="javaee:faces-config-default-valueType"
- minOccurs="0"/>
- <xsd:element name="suggested-value"
- type="javaee:faces-config-suggested-valueType"
- minOccurs="0"/>
- <xsd:element name="attribute-extension"
- type="javaee:faces-config-attribute-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name = "id" type = "xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-attribute-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for attribute. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-componentType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "component" element represents a concrete UIComponent
- implementation class that should be registered under the
- specified type identifier, along with its associated
- properties and attributes. Component types must be unique
- within the entire web application.
-
- Nested "attribute" elements identify generic attributes that
- are recognized by the implementation logic of this component.
- Nested "property" elements identify JavaBeans properties of
- the component class that may be exposed for manipulation
- via tools.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="component-type"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "component-type" element represents the name under
- which the corresponding UIComponent class should be
- registered.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="component-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "component-class" element represents the fully
- qualified class name of a concrete UIComponent
- implementation class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="facet"
- type="javaee:faces-config-facetType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="attribute"
- type="javaee:faces-config-attributeType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="property"
- type="javaee:faces-config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="component-extension"
- type="javaee:faces-config-component-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-component-extensionType">
- <xsd:annotation>
- <xsd:documentation>
- Extension element for component. It may contain
- implementation specific content.
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-default-localeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "default-locale" element declares the default locale
- for this application instance.
-
- It must be specified as :language:[_:country:[_:variant:]]
- without the colons, for example "ja_JP_SJIS". The
- separators between the segments may be '-' or '_'.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:faces-config-localeType">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
-
- <xsd:complexType name="faces-config-default-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "default-value" contains the value for the property or
- attribute in which this element resides. This value differs
- from the "suggested-value" in that the property or attribute
- must take the value, whereas in "suggested-value" taking the
- value is optional.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="faces-config-el-expressionType">
- <xsd:annotation>
- <xsd:documentation>
-
- EL expressions present within a faces config file
- must start with the character sequence of '#{' and
- end with '}'.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="#\{.*\}"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-facetType">
- <xsd:annotation>
- <xsd:documentation>
-
- Define the name and other design-time information for a facet
- that is associated with a renderer or a component.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="facet-name"
- type="javaee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "facet-name" element represents the facet name
- under which a UIComponent will be added to its parent.
- It must be of type "Identifier".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="facet-extension"
- type="javaee:faces-config-facet-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-facet-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for facet. It may contain implementation
- specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-from-view-idType">
- <xsd:annotation>
- <xsd:documentation>
-
- The value of from-view-id must contain one of the following
- values:
-
- - The exact match for a view identifier that is recognized
- by the the ViewHandler implementation being used (such as
- "/index.jsp" if you are using the default ViewHandler).
-
- - A proper prefix of a view identifier, plus a trailing
- "*" character. This pattern indicates that all view
- identifiers that match the portion of the pattern up to
- the asterisk will match the surrounding rule. When more
- than one match exists, the match with the longest pattern
- is selected.
-
- - An "*" character, which means that this pattern applies
- to all view identifiers.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-from-actionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "from-action" element contains an action reference
- expression that must have been executed (by the default
- ActionListener for handling application level events)
- in order to select the navigation rule. If not specified,
- this rule will be relevant no matter which action reference
- was executed (or if no action reference was executed).
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:faces-config-el-expressionType">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-converterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "converter" element represents a concrete Converter
- implementation class that should be registered under the
- specified converter identifier. Converter identifiers must
- be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that
- may be configured on the corresponding UIComponent in order
- to affect the operation of the Converter. Nested "property"
- elements identify JavaBeans properties of the Converter
- implementation class that may be configured to affect the
- operation of the Converter. "attribute" and "property"
- elements are intended to allow component developers to
- more completely describe their components to tools and users.
- These elements have no required runtime semantics.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:choice>
- <xsd:element name="converter-id"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "converter-id" element represents the
- identifier under which the corresponding
- Converter class should be registered.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="converter-for-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "converter-for-class" element represents the
- fully qualified class name for which a Converter
- class will be registered.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
-
- <xsd:element name="converter-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "converter-class" element represents the fully
- qualified class name of a concrete Converter
- implementation class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="attribute"
- type="javaee:faces-config-attributeType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Nested "attribute" elements identify generic
- attributes that may be configured on the
- corresponding UIComponent in order to affect the
- operation of the Converter. This attribute is
- primarily for design-time tools and is not
- specified to have any meaning at runtime.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="property"
- type="javaee:faces-config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Nested "property" elements identify JavaBeans
- properties of the Converter implementation class
- that may be configured to affect the operation of
- the Converter. This attribute is primarily for
- design-time tools and is not specified to have
- any meaning at runtime.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="converter-extension"
- type="javaee:faces-config-converter-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-converter-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for converter. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-lifecycleType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "lifecycle" element provides a mechanism to specify
- modifications to the behaviour of the default Lifecycle
- implementation for this web application.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="phase-listener"
- type="javaee:fully-qualified-classType"
- minOccurs="0"
- maxOccurs="unbounded">
-
- <xsd:annotation>
- <xsd:documentation>
-
- The "phase-listener" element contains the fully
- qualified class name of the concrete PhaseListener
- implementation class that will be registered on
- the Lifecycle.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="lifecycle-extension"
- type="javaee:faces-config-lifecycle-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-lifecycle-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for lifecycle. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="faces-config-localeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The localeType defines valid locale defined by ISO-639-1
- and ISO-3166.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:string">
- <xsd:pattern value="[a-z]{2}(_|-)?([\p{L}\-\p{Nd}]{2})?"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-locale-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "locale-config" element allows the app developer to
- declare the supported locales for this application.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="default-locale"
- type="javaee:faces-config-default-localeType"
- minOccurs="0">
- </xsd:element>
- <xsd:element name="supported-locale"
- type="javaee:faces-config-supported-localeType"
- minOccurs="0"
- maxOccurs="unbounded">
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-managed-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "managed-bean" element represents a JavaBean, of a
- particular class, that will be dynamically instantiated
- at runtime (by the default VariableResolver implementation)
- if it is referenced as the first element of a value binding
- expression, and no corresponding bean can be identified in
- any scope. In addition to the creation of the managed bean,
- and the optional storing of it into the specified scope,
- the nested managed-property elements can be used to
- initialize the contents of settable JavaBeans properties of
- the created instance.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="managed-bean-name"
- type="javaee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "managed-bean-name" element represents the
- attribute name under which a managed bean will
- be searched for, as well as stored (unless the
- "managed-bean-scope" value is "none").
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="managed-bean-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "managed-bean-class" element represents the fully
- qualified class name of the Java class that will be
- used`to instantiate a new instance if creation of the
- specified`managed bean is requested.
-
- The specified class must conform to standard JavaBeans
- conventions. In particular, it must have a public
- zero-arguments constructor, and zero or more public
- property setters.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element
- name="managed-bean-scope"
- type="javaee:faces-config-managed-bean-scopeOrNoneType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "managed-bean-scope" element represents the scope
- into which a newly created instance of the specified
- managed bean will be stored (unless the value is
- "none").
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice>
- <xsd:element name="managed-property"
- type="javaee:faces-config-managed-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="map-entries"
- type="javaee:faces-config-map-entriesType"/>
- <xsd:element name="list-entries"
- type="javaee:faces-config-list-entriesType"/>
- </xsd:choice>
- <xsd:element name="managed-bean-extension"
- type="javaee:faces-config-managed-bean-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-managed-bean-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for managed-bean. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-managed-bean-scopeOrNoneType">
- <xsd:annotation>
- <xsd:documentation>
-
- <![CDATA[
- Defines the legal values for the <managed-bean-scope>
- element's body content, which includes all of the scopes
- normally used in a web application, plus the "none" value
- indicating that a created bean should not be stored into
- any scope.
- ]]>
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="request"/>
- <xsd:enumeration value="session"/>
- <xsd:enumeration value="application"/>
- <xsd:enumeration value="none"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-managed-propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "managed-property" element represents an individual
- property of a managed bean that will be configured to the
- specified value (or value set) if the corresponding
- managed bean is automatically created.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="property-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property-name" element represents the JavaBeans
- property name under which the corresponding value may
- be stored.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="property-class"
- type="javaee:java-typeType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property-class" element represents the Java type
- of the value associated with this property name.
- If not specified, it can be inferred from existing
- classes; however, this element should be specified
- if the configuration file is going to be the source
- for generating the corresponding classes.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice>
- <xsd:element name="map-entries"
- type="javaee:faces-config-map-entriesType"/>
- <xsd:element name="null-value"
- type="javaee:faces-config-null-valueType">
- </xsd:element>
- <xsd:element name="value"
- type="javaee:faces-config-valueType"/>
- <xsd:element name="list-entries"
- type="javaee:faces-config-list-entriesType"/>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-map-entryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "map-entry" element reprsents a single key-entry pair
- that will be added to the computed value of a managed
- property of type java.util.Map.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="key"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "key" element is the String representation of a
- map key that will be stored in a managed property of
- type java.util.Map.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice>
- <xsd:element name="null-value"
- type="javaee:faces-config-null-valueType"/>
- <xsd:element name="value"
- type="javaee:faces-config-valueType"/>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-map-entriesType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "map-entries' element represents a set of key-entry pairs
- that will be added to the computed value of a managed property
- of type java.util.Map. In addition, the Java class types
- of the key and entry values may be optionally declared.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="key-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The "key-class" element defines the Java type to which
- each "key" element in a set of "map-entry" elements
- will be converted to. If omitted, "java.lang.String"
- is assumed.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="value-class"
- type="javaee:faces-config-value-classType"
- minOccurs="0"/>
- <xsd:element name="map-entry"
- type="javaee:faces-config-map-entryType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-navigation-caseType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "navigation-case" element describes a particular
- combination of conditions that must match for this case to
- be executed, and the view id of the component tree that
- should be selected next.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="from-action"
- type="javaee:faces-config-from-actionType"
- minOccurs="0">
- </xsd:element>
- <xsd:element name="from-outcome"
- type="javaee:string" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The "from-outcome" element contains a logical outcome
- string returned by the execution of an application
- action method selected via an "actionRef" property
- (or a literal value specified by an "action" property)
- of a UICommand component. If specified, this rule
- will be relevant only if the outcome value matches
- this element's value. If not specified, this rule
- will be relevant no matter what the outcome value was.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="to-view-id"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "to-view-id" element contains the view identifier
- of the next view that should be displayed if this
- navigation rule is matched.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element
- name="redirect"
- type="javaee:faces-config-redirectType" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-navigation-ruleType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "navigation-rule" element represents an individual
- decision rule that will be utilized by the default
- NavigationHandler implementation to make decisions on
- what view should be displayed next, based on the
- view id being processed.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="from-view-id"
- type="javaee:faces-config-from-view-idType"
- minOccurs="0"/>
- <xsd:element name="navigation-case"
- type="javaee:faces-config-navigation-caseType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element
- name="navigation-rule-extension"
- type="javaee:faces-config-navigation-rule-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-navigation-rule-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for navigation-rule. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-null-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "null-value" element indicates that the managed
- property in which we are nested will be explicitly
- set to null if our managed bean is automatically
- created. This is different from omitting the managed
- property element entirely, which will cause no
- property setter to be called for this property.
-
- The "null-value" element can only be used when the
- associated "property-class" identifies a Java class,
- not a Java primitive.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property" element represents a JavaBean property of the
- Java class represented by our parent element.
-
- Property names must be unique within the scope of the Java
- class that is represented by the parent element, and must
- correspond to property names that will be recognized when
- performing introspection against that class via
- java.beans.Introspector.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="property-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property-name" element represents the JavaBeans
- property name under which the corresponding value
- may be stored.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="property-class"
- type="javaee:java-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "property-class" element represents the Java type
- of the value associated with this property name.
- If not specified, it can be inferred from existing
- classes; however, this element should be specified if
- the configuration file is going to be the source for
- generating the corresponding classes.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="default-value"
- type="javaee:faces-config-default-valueType"
- minOccurs="0"/>
- <xsd:element name="suggested-value"
- type="javaee:faces-config-suggested-valueType"
- minOccurs="0"/>
- <xsd:element name="property-extension"
- type="javaee:faces-config-property-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-property-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for property. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-redirectType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "redirect" element indicates that navigation to the
- specified "to-view-id" should be accomplished by
- performing an HTTP redirect rather than the usual
- ViewHandler mechanisms.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-referenced-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "referenced-bean" element represents at design time the
- promise that a Java object of the specified type will exist at
- runtime in some scope, under the specified key. This can be
- used by design time tools to construct user interface dialogs
- based on the properties of the specified class. The presence
- or absence of a referenced bean element has no impact on the
- JavaServer Faces runtime environment inside a web application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="referenced-bean-name"
- type="javaee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "referenced-bean-name" element represents the
- attribute name under which the corresponding
- referenced bean may be assumed to be stored, in one
- of 'request', 'session', or 'application' scopes.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="referenced-bean-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "referenced-bean-class" element represents the
- fully qualified class name of the Java class
- (either abstract or concrete) or Java interface
- implemented by the corresponding referenced bean.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-render-kitType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "render-kit" element represents a concrete RenderKit
- implementation that should be registered under the specified
- render-kit-id. If no render-kit-id is specified, the
- identifier of the default RenderKit
- (RenderKitFactory.DEFAULT_RENDER_KIT) is assumed.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="render-kit-id"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The "render-kit-id" element represents an identifier
- for the RenderKit represented by the parent
- "render-kit" element.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="render-kit-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The "render-kit-class" element represents the fully
- qualified class name of a concrete RenderKit
- implementation class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="renderer"
- type="javaee:faces-config-rendererType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="render-kit-extension"
- type="javaee:faces-config-render-kit-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-rendererType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "renderer" element represents a concrete Renderer
- implementation class that should be registered under the
- specified component family and renderer type identifiers,
- in the RenderKit associated with the parent "render-kit"
- element. Combinations of component family and
- renderer type must be unique within the RenderKit
- associated with the parent "render-kit" element.
-
- Nested "attribute" elements identify generic component
- attributes that are recognized by this renderer.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="component-family"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "component-family" element represents the
- component family for which the Renderer represented
- by the parent "renderer" element will be used.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="renderer-type"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "renderer-type" element represents a renderer type
- identifier for the Renderer represented by the parent
- "renderer" element.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="renderer-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "renderer-class" element represents the fully
- qualified class name of a concrete Renderer
- implementation class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="facet"
- type="javaee:faces-config-facetType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="attribute"
- type="javaee:faces-config-attributeType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="renderer-extension"
- type="javaee:faces-config-renderer-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-renderer-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for renderer. It may contain implementation
- specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-render-kit-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for render-kit. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-suggested-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "suggested-value" contains the value for the property or
- attribute in which this element resides. This value is
- advisory only and is intended for tools to use when
- populating pallettes.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-supported-localeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "supported-locale" element allows authors to declare
- which locales are supported in this application instance.
-
- It must be specified as :language:[_:country:[_:variant:]]
- without the colons, for example "ja_JP_SJIS". The
- separators between the segments may be '-' or '_'.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:faces-config-localeType">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-validatorType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "validator" element represents a concrete Validator
- implementation class that should be registered under the
- specified validator identifier. Validator identifiers must
- be unique within the entire web application.
-
- Nested "attribute" elements identify generic attributes that
- may be configured on the corresponding UIComponent in order
- to affect the operation of the Validator. Nested "property"
- elements identify JavaBeans properties of the Validator
- implementation class that may be configured to affect the
- operation of the Validator. "attribute" and "property"
- elements are intended to allow component developers to
- more completely describe their components to tools and users.
- These elements have no required runtime semantics.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="validator-id"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The "validator-id" element represents the identifier
- under which the corresponding Validator class should
- be registered.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="validator-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "validator-class" element represents the fully
- qualified class name of a concrete Validator
- implementation class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="attribute"
- type="javaee:faces-config-attributeType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Nested "attribute" elements identify generic
- attributes that may be configured on the
- corresponding UIComponent in order to affect the
- operation of the Validator. This attribute is
- primarily for design-time tools and is not
- specified to have any meaning at runtime.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="property"
- type="javaee:faces-config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Nested "property" elements identify JavaBeans
- properties of the Validator implementation class
- that may be configured to affect the operation of
- the Validator. This attribute is primarily for
- design-time tools and is not specified to have
- any meaning at runtime.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="validator-extension"
- type="javaee:faces-config-validator-extensionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name = "faces-config-validator-extensionType">
- <xsd:annotation>
- <xsd:documentation>
-
- Extension element for validator. It may contain
- implementation specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:any namespace="##any"
- processContents="lax"
- minOccurs="0"
- maxOccurs="unbounded" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="faces-config-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "value" element is the String representation of
- a literal value to which a scalar managed property
- will be set, or a value binding expression ("#{...}")
- that will be used to calculate the required value.
- It will be converted as specified for the actual
- property type.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:union
- memberTypes="javaee:faces-config-el-expressionType xsd:string"/>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-value-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "value-class" element defines the Java type to which each
- "value" element's value will be converted to, prior to adding
- it to the "list-entries" list for a managed property that is
- a java.util.List, or a "map-entries" map for a managed
- property that is a java.util.Map.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:complexType name="faces-config-list-entriesType">
- <xsd:annotation>
- <xsd:documentation>
-
- The "list-entries" element represents a set of initialization
- elements for a managed property that is a java.util.List or an
- array. In the former case, the "value-class" element can
- optionally be used to declare the Java type to which each
- value should be converted before adding it to the Collection.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="value-class"
- type="javaee:faces-config-value-classType"
- minOccurs="0"/>
- <xsd:choice minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="null-value"
- type="javaee:faces-config-null-valueType"/>
- <xsd:element name="value"
- type="javaee:faces-config-valueType"/>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
- <!-- **************************************************** -->
-
- <xsd:simpleType name="faces-config-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type contains the recognized versions of
- faces-config supported.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="1.2"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <!-- **************************************************** -->
-
-</xsd:schema>
17 years, 3 months
JBoss Tools SVN: r2565 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server: polling and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-07-20 13:14:03 -0400 (Fri, 20 Jul 2007)
New Revision: 2565
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerStatePoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TimeoutPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TwiddlePoller.java
Log:
fix me was remaining in TwiddlePoller.
Interface addition to allow for more customized polling preferences.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerStatePoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerStatePoller.java 2007-07-20 15:48:56 UTC (rev 2564)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/IServerStatePoller.java 2007-07-20 17:14:03 UTC (rev 2565)
@@ -39,6 +39,9 @@
public void cancel(int type); // cancel the polling
public void cleanup(); // clean up any resources / processes. Will ALWAYS be called
+ public boolean supportsStartup();
+ public boolean supportsShutdown();
+
public class PollingException extends Exception {
public PollingException(String message) {super(message);}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TimeoutPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TimeoutPoller.java 2007-07-20 15:48:56 UTC (rev 2564)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TimeoutPoller.java 2007-07-20 17:14:03 UTC (rev 2565)
@@ -24,24 +24,27 @@
import java.util.Date;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.internal.ServerType;
import org.jboss.ide.eclipse.as.core.runtime.server.IServerStatePoller;
+import org.jboss.ide.eclipse.as.core.server.JBossServer;
+import org.jboss.ide.eclipse.as.core.server.ServerAttributeHelper;
+import org.jboss.ide.eclipse.as.core.server.attributes.IServerPollingAttributes;
// Wait 15 seconds, then say it's at it's expected state
public class TimeoutPoller implements IServerStatePoller {
private boolean expectedState;
private long endTime;
+ private IServer server;
int timeout = -1;
public void beginPolling(IServer server, boolean expectedState, PollThread pt) {
this.expectedState = expectedState;
- this.endTime = new Date().getTime() + getTimeout();
+ this.server = server;
+ this.endTime = new Date().getTime() + getTimeout() - 2000;
}
- protected int getTimeout() {
- return 15000;
- }
public void cancel(int type) {
}
@@ -57,4 +60,28 @@
public void cleanup() {
}
+
+ public int getTimeout() {
+ int timeout;
+ JBossServer jbs = ((JBossServer)server.loadAdapter(JBossServer.class, null));
+ ServerAttributeHelper helper = (ServerAttributeHelper)jbs.getAttributeHelper();
+ if( expectedState == IServerStatePoller.SERVER_UP) {
+ int def = ((ServerType)server.getServerType()).getStartTimeout();
+ timeout = helper.getAttribute(IServerPollingAttributes.START_TIMEOUT, def);
+ } else {
+ int def = ((ServerType)server.getServerType()).getStopTimeout();
+ timeout = helper.getAttribute(IServerPollingAttributes.STOP_TIMEOUT, def);
+ }
+ return timeout;
+ }
+
+ public boolean supportsShutdown() {
+ return true;
+ }
+
+ public boolean supportsStartup() {
+ return true;
+ }
+
+
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TwiddlePoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TwiddlePoller.java 2007-07-20 15:48:56 UTC (rev 2564)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/TwiddlePoller.java 2007-07-20 17:14:03 UTC (rev 2565)
@@ -85,11 +85,7 @@
ClassLoader currentLoader = Thread.currentThread().getContextClassLoader();
ClassLoader twiddleLoader = getClassLoader();
if( twiddleLoader != null ) {
- // TODO: FIX ME
-// String serverConfDir = ServerConverter.getJBossServer(server).getConfigDirectory(false);
-// ServerDescriptorModel descriptorModel = DescriptorModel.getDefault().getServerModel(new Path(serverConfDir));
-// int port = descriptorModel.getJNDIPort();
- int port = 1099;
+ int port = ServerConverter.getJBossServer(server).getJNDIPort();
Thread.currentThread().setContextClassLoader(twiddleLoader);
Properties props = new Properties();
@@ -235,6 +231,14 @@
setProperty(DATE, new Long(new Date().getTime()));
}
}
+
+ public boolean supportsShutdown() {
+ return true;
+ }
+
+ public boolean supportsStartup() {
+ return true;
+ }
17 years, 3 months
JBoss Tools SVN: r2564 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-07-20 11:48:56 -0400 (Fri, 20 Jul 2007)
New Revision: 2564
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java
Log:
http://jira.jboss.com/jira/browse/EXIN-365
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-20 15:25:51 UTC (rev 2563)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeEditPart.java 2007-07-20 15:48:56 UTC (rev 2564)
@@ -97,8 +97,10 @@
OrmShape tableShape = refShape.getOrmDiagram().getShape(table);
OrmEditPart tablePart = (OrmEditPart)getViewer().getEditPartRegistry().get(tableShape);
if(tablePart != null){
- tablePart.getFigure().setVisible(visible);
- setLinksVisible(tablePart, visible);
+ if(isTableCanBeInvisible(tablePart, visible)){
+ tablePart.getFigure().setVisible(visible);
+ setLinksVisible(tablePart, visible);
+ }
}
}
@@ -112,6 +114,16 @@
shape.getOrmDiagram().update();
}
+ private boolean isTableCanBeInvisible(OrmEditPart tablePart, boolean visible){
+ if(visible) return true;
+ ConnectionEditPart link;
+ for(int i=0;i<tablePart.getTargetConnections().size();i++){
+ link = (ConnectionEditPart)tablePart.getTargetConnections().get(i);
+ if(link.getFigure().isVisible()) return false;
+ }
+ return true;
+ }
+
private boolean isReferencesCorrect(OrmShape shape){
if(shape == null) return false;
for(int i=0;i < referenceList.size();i++){
17 years, 3 months