Seam SVN: r11052 - in modules/trunk/faces/src/main: java/org/jboss/seam/faces/component and 3 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-30 01:55:58 -0400 (Sat, 30 May 2009)
New Revision: 11052
Added:
modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIImport.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/AbstractViewMetadataProcesssor.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ConvertStatusMessagesProcessor.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/EnforceViewRestrictionsProcessor.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/FacesSystemEventProcessor.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ImportNamespacesProcessor.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/SeamPreRenderViewListener.java
Removed:
modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ConvertStatusMessagesListener.java
Modified:
modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/SeamViewHandler.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIRestrictView.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIViewAction.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/SeamFacesELResolver.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ExecuteViewActionsListener.java
modules/trunk/faces/src/main/resources/META-INF/faces-config.xml
modules/trunk/faces/src/main/resources/META-INF/seam-faces.taglib.xml
Log:
refactor all PreRenderViewEvent listeners into a processing chain
listeners are now proper contextual beans
implement the <s:import> tag to import EL namespaces for the SeamFacesELResolver
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/SeamViewHandler.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/SeamViewHandler.java 2009-05-30 05:53:53 UTC (rev 11051)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/SeamViewHandler.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -2,11 +2,14 @@
import java.util.List;
import java.util.Map;
+
import javax.faces.application.ViewHandler;
import javax.faces.application.ViewHandlerWrapper;
import javax.faces.context.FacesContext;
-import org.jboss.seam.faces.lifecycle.ConvertStatusMessagesListener;
+import org.jboss.seam.bridge.ManagerBridge;
+import org.jboss.seam.faces.lifecycle.ConvertStatusMessagesProcessor;
+
/**
* Wrap the standard JSF view handler to capture the
* request for a redirect URL so that the JSF messages
@@ -34,7 +37,7 @@
* Take this opportunity to store the JSF messages in the flash scope so that they
* live past the redirect.
*
- * @see ViewHandler#getRedirectURL(javax.faces.context.FacesContext, java.lang.String, java.util.Map, boolean)
+ * @see ViewHandler#getRedirectURL(javax.faces.context.FacesContext, java.lang.String, java.util.Map, boolean)
*/
@Override
public String getRedirectURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams)
@@ -43,7 +46,7 @@
if (context.getExternalContext().getSession(false) != null)
{
// QUESTION hmmm, we have to convert to faces messages now to leverage JSF's flash feature...I suppose that is okay
- new ConvertStatusMessagesListener().execute();
+ ManagerBridge.getProvider().getCurrentManager().getInstanceByType(ConvertStatusMessagesProcessor.class).execute();
// should I move this next step into TransferStatusMessagesListener?
if (context.getMessages().hasNext())
{
Added: modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIImport.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIImport.java (rev 0)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIImport.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -0,0 +1,65 @@
+package org.jboss.seam.faces.component;
+
+import javax.faces.component.UIComponentBase;
+
+/**
+ * @author Dan Allen
+ */
+public class UIImport extends UIComponentBase
+{
+
+ // ------------------------------------------------------ Manifest Constants
+
+ /**
+ * <p>
+ * The standard component type for this component.
+ * </p>
+ */
+ public static final String COMPONENT_TYPE = "org.jboss.seam.faces.Import";
+
+ /**
+ * <p>
+ * The standard component type for this component.
+ * </p>
+ */
+ public static final String COMPONENT_FAMILY = "org.jboss.seam.faces.Import";
+
+ /**
+ * Properties that are tracked by state saving.
+ */
+ enum PropertyKeys {
+ namespaces
+ }
+
+ // ------------------------------------------------------------ Constructors
+
+ /**
+ * <p>
+ * Create a new {@link UIImport} instance with default property values.
+ * </p>
+ */
+ public UIImport()
+ {
+ super();
+ setRendererType(null);
+ }
+
+ // -------------------------------------------------------------- Properties
+
+ @Override
+ public String getFamily()
+ {
+ return COMPONENT_FAMILY;
+ }
+
+ public Object getNamespaces()
+ {
+ return getStateHelper().eval(PropertyKeys.namespaces);
+ }
+
+ public void setNamespaces(Object namespaces)
+ {
+ getStateHelper().put(PropertyKeys.namespaces, namespaces);
+ }
+
+}
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIRestrictView.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIRestrictView.java 2009-05-30 05:53:53 UTC (rev 11051)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIRestrictView.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -4,6 +4,10 @@
import javax.faces.component.UIComponentBase;
/**
+ *
+ * TODO add login-required attribute. If require fails, we only force them to login
+ * if that helps them get to the page.
+ *
* @author Dan Allen
*/
public class UIRestrictView extends UIComponentBase
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIViewAction.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIViewAction.java 2009-05-30 05:53:53 UTC (rev 11051)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/component/UIViewAction.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -4,6 +4,8 @@
import javax.faces.component.UIComponentBase;
/**
+ * TODO add conditional (if attribute)
+ *
* @author Dan Allen
*/
public class UIViewAction extends UIComponentBase
@@ -28,9 +30,26 @@
/**
* Properties that are tracked by state saving.
*/
- enum PropertyKeys {
- onPostback,
- execute
+ enum PropertyKeys
+ {
+ onPostback, execute, ifAttr("if");
+
+ private String name;
+
+ PropertyKeys()
+ {
+ }
+
+ PropertyKeys(String name)
+ {
+ this.name = name;
+ }
+
+ @Override
+ public String toString()
+ {
+ return name != null ? name : super.toString();
+ }
}
// ------------------------------------------------------------ Constructors
@@ -73,5 +92,15 @@
{
getStateHelper().put(PropertyKeys.onPostback, onPostback);
}
+
+ public boolean isIf()
+ {
+ return (Boolean) getStateHelper().eval(PropertyKeys.ifAttr, true);
+ }
+ public void setIf(boolean condition)
+ {
+ getStateHelper().put(PropertyKeys.ifAttr, condition);
+ }
+
}
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/SeamFacesELResolver.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/SeamFacesELResolver.java 2009-05-30 05:53:53 UTC (rev 11051)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/SeamFacesELResolver.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -1,4 +1,4 @@
-/*
+/*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
@@ -23,36 +23,60 @@
*/
package org.jboss.seam.faces.el;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
import javax.el.ELContext;
+import javax.el.ELResolver;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.faces.context.FacesContext;
import javax.faces.model.DataModel;
+
+import org.jboss.seam.bridge.ManagerBridge;
import org.jboss.seam.el.AbstractELResolver;
+import org.jboss.seam.faces.lifecycle.ImportNamespacesProcessor;
/**
- * <p>An {@link ELResolver} implementation that adds magic properties
- * to a JSF DataModel object.</p>
- *
- * <p>The following is a list of the magic properties:</p>
- *
+ * <p>
+ * An {@link ELResolver} implementation that adds magic properties to a JSF
+ * DataModel object.
+ * </p>
+ *
+ * <p>
+ * The following is a list of the magic properties:
+ * </p>
+ *
* <ul>
- * <li>size - the size of the wrapped data</li>
- * <li>empty - a boolean indicating whether the wrapped data is empty</li>
+ * <li>size - the size of the wrapped data</li>
+ * <li>empty - a boolean indicating whether the wrapped data is empty</li>
* </ul>
- *
- * <p>Assuming the variable <code>results</code> held a reference to a JSF
- * DataModel, you could print out its size using the following expression:</p>
- *
- * <pre>#{results.size}</pre>
- *
+ *
+ * <p>
+ * Assuming the variable <code>results</code> held a reference to a JSF
+ * DataModel, you could print out its size using the following expression:
+ * </p>
+ *
+ * <pre>
+ * #{results.size}
+ * </pre>
+ *
* @author Gavin King
* @author Dan Allen
*/
-public class SeamFacesELResolver extends AbstractELResolver {
-
+public class SeamFacesELResolver extends AbstractELResolver
+{
@Override
public Object getValue(ELContext context, Object base, Object property)
{
- if (base instanceof DataModel)
+ if (base == null)
{
+ // we should be landing here after the JSR-299 resolver has a chance
+ return resolveBase(context, property);
+ }
+ else if (base instanceof DataModel)
+ {
return resolveInDataModel(context, base, property);
}
@@ -65,22 +89,52 @@
return (base instanceof DataModel);
}
+ private Object resolveBase(ELContext context, Object property)
+ {
+ // is this check necessary?
+ if (!(property instanceof String))
+ {
+ return null;
+ }
+
+ // FIXME refactor me to somewhere clean
+ Map<String, Object> viewMap = FacesContext.getCurrentInstance().getViewRoot().getViewMap(false);
+ if (viewMap == null || !viewMap.containsKey(ImportNamespacesProcessor.NAMESPACES_CACHE_KEY))
+ {
+ return null;
+ }
+
+ String name = (String) property;
+ BeanManager manager = ManagerBridge.getProvider().getCurrentManager();
+ for (String namespace : (Collection<String>) viewMap.get(ImportNamespacesProcessor.NAMESPACES_CACHE_KEY))
+ {
+ Set<Bean<?>> beans = manager.getBeans(namespace + "." + name);
+ // TODO complain if it is more than one
+ if (beans.size() == 1)
+ {
+ context.setPropertyResolved(true);
+ return manager.getInstance(beans.iterator().next());
+ }
+ }
+
+ return null;
+ }
+
private Object resolveInDataModel(ELContext context, Object base, Object property)
{
if ("size".equals(property))
{
context.setPropertyResolved(true);
- return ((DataModel) base).getRowCount();
+ return ((DataModel<?>) base).getRowCount();
}
else if ("empty".equals(property))
{
context.setPropertyResolved(true);
- return ((DataModel) base).getRowCount() == 0;
+ return ((DataModel<?>) base).getRowCount() == 0;
}
else
{
return null;
}
}
-
}
Added: modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/AbstractViewMetadataProcesssor.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/AbstractViewMetadataProcesssor.java (rev 0)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/AbstractViewMetadataProcesssor.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -0,0 +1,46 @@
+package org.jboss.seam.faces.lifecycle;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+
+/**
+ * An abstract base class for processors for UI components in the metadata facet
+ * of the UIViewRoot. This class provides infrastructure for extracting UI
+ * components from the metadata facet branch of the component tree.
+ *
+ * @author Dan Allen
+ */
+public abstract class AbstractViewMetadataProcesssor implements FacesSystemEventProcessor
+{
+ public abstract boolean execute();
+
+ protected <C extends UIComponent> Collection<C> collectMetadataComponents(UIViewRoot viewRoot, UIComponentFilter<C> componentFilter)
+ {
+ UIComponent metadataFacet = viewRoot.getFacet(UIViewRoot.METADATA_FACET_NAME);
+
+ if (metadataFacet == null)
+ {
+ return Collections.<C>emptyList();
+ }
+
+ Collection<C> matches = new ArrayList<C>();
+ for (UIComponent candidate : metadataFacet.getChildren())
+ {
+ if (componentFilter.accepts(candidate))
+ {
+ matches.add((C) candidate);
+ }
+ }
+
+ return matches;
+ }
+
+ protected abstract class UIComponentFilter<C extends UIComponent>
+ {
+ public abstract boolean accepts(UIComponent candidate);
+ }
+}
Deleted: modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ConvertStatusMessagesListener.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ConvertStatusMessagesListener.java 2009-05-30 05:53:53 UTC (rev 11051)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ConvertStatusMessagesListener.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -1,57 +0,0 @@
-package org.jboss.seam.faces.lifecycle;
-
-import javax.enterprise.inject.AnnotationLiteral;
-import javax.enterprise.inject.UnsatisfiedResolutionException;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.faces.component.UIViewRoot;
-import javax.faces.event.SystemEvent;
-import javax.faces.event.SystemEventListener;
-
-import org.jboss.seam.bridge.ManagerBridge;
-import org.jboss.seam.faces.Faces;
-import org.jboss.seam.international.StatusMessages;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-
-/**
- * <p>A {@link SystemEventListener} that observes the PreRenderViewEvent or
- * a redirect navigation event (via SeamViewHandler) and transposes Seam
- * StatusMessage objects into FacesMessage objects and transfers them to the FacesContext.</p>
- *
- * <p>FIXME the messages are going to get dropped if a view action causes a navigation event followed by a redirect event</p>
- *
- * @author Dan Allen
- */
-//@ListenerFor(systemEventClass = PreRenderViewEvent.class, sourceClass = UIViewRoot.class)
-public class ConvertStatusMessagesListener implements SystemEventListener
-{
- private static final LogProvider log = Logging.getLogProvider(ConvertStatusMessagesListener.class);
-
- public boolean isListenerForSource(Object source)
- {
- return source instanceof UIViewRoot;
- }
-
- public void processEvent(SystemEvent preRenderViewEvent)
- {
- execute();
- }
-
- public void execute()
- {
- try
- {
- BeanManager manager = ManagerBridge.getProvider().getCurrentManager();
- // tests
- if (manager != null)
- {
- manager.getInstanceByType(StatusMessages.class, new AnnotationLiteral<Faces>() {}).onBeforeRender();
- }
- }
- catch (UnsatisfiedResolutionException e)
- {
- log.warn("Could not locate the StatusMessages bean. Status messages will not be transfered to the FacesContext.");
- }
-
- }
-}
Copied: modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ConvertStatusMessagesProcessor.java (from rev 11044, modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ConvertStatusMessagesListener.java)
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ConvertStatusMessagesProcessor.java (rev 0)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ConvertStatusMessagesProcessor.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -0,0 +1,34 @@
+package org.jboss.seam.faces.lifecycle;
+
+import org.jboss.seam.faces.Faces;
+import org.jboss.seam.international.StatusMessages;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
+
+/**
+ * <p>
+ * A {@link FacesSystemEventProcessor} that is executed on a PreRenderViewEvent
+ * or a redirect navigation event (via SeamViewHandler) to transpose Seam
+ * StatusMessage objects into FacesMessage objects and transfer them to the
+ * FacesContext.
+ * </p>
+ *
+ * <p>
+ * FIXME the messages are going to get dropped if a view action causes a
+ * navigation event followed by a redirect event
+ * </p>
+ *
+ * @author Dan Allen
+ */
+public class ConvertStatusMessagesProcessor implements FacesSystemEventProcessor
+{
+ @Logger Log log;
+
+ @Faces StatusMessages statusMessages;
+
+ public boolean execute()
+ {
+ statusMessages.onBeforeRender();
+ return true;
+ }
+}
Added: modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/EnforceViewRestrictionsProcessor.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/EnforceViewRestrictionsProcessor.java (rev 0)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/EnforceViewRestrictionsProcessor.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -0,0 +1,116 @@
+package org.jboss.seam.faces.lifecycle;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+
+import javax.enterprise.inject.Current;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ExceptionQueuedEvent;
+import javax.faces.event.ExceptionQueuedEventContext;
+
+import org.jboss.seam.faces.component.UIRestrictView;
+import org.jboss.seam.security.Identity;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
+
+/**
+ * <p>
+ * A JSF metadata facet processor which enforces restrictions and permissions in
+ * the Render Response phase of the JSF life cycle, immediately prior to the
+ * view being rendered.
+ * </p>
+ *
+ * <p>
+ * The prerequisites are provided in the form of an EL ValueExpression and are
+ * evaluated by the Identity component of the Seam security module. If the
+ * Identity component indicates the security is disabled, the restrictions are
+ * not enforced.
+ * </p>
+ *
+ * <p>
+ * If the user is not logged in, a NotLoggedInException is passed to the JSF
+ * exception handler. If the user is logged in and the restriction or permission
+ * is not met, an AuthorizationException is passed to the JSF exception handler.
+ * </p>
+ *
+ * @author Dan Allen
+ */
+public class EnforceViewRestrictionsProcessor extends AbstractViewMetadataProcesssor
+{
+ @Logger Log log;
+
+ @Current FacesContext facesContext;
+ @Current Identity identity;
+
+ @Override
+ public boolean execute()
+ {
+ UIViewRoot viewRoot = facesContext.getViewRoot();
+
+ // collect first so as not to introduce a hard dependency on Identity if
+ // tag is not in use
+ Collection<UIRestrictView> restrictions = collectionViewRestrictions(viewRoot);
+ if (restrictions.isEmpty() || !Identity.isSecurityEnabled())
+ {
+ return true;
+ }
+
+ if (log.isTraceEnabled())
+ {
+ log.trace("Processing view restrictions before render view");
+ }
+
+ try
+ {
+ for (UIRestrictView restriction : restrictions)
+ {
+ if (restriction.getRequire() != null)
+ {
+ identity.checkRestriction(restriction.getRequire());
+ }
+ else
+ {
+ identity.checkPermission(viewRoot.getViewId(), "render");
+ }
+ }
+ }
+ // FIXME damn this is ugly, but JCDI is wrapping exceptions
+ catch (Exception e)
+ {
+ Throwable cause = e;
+ if (e instanceof InvocationTargetException)
+ {
+ cause = e.getCause();
+ }
+
+ facesContext.getApplication().publishEvent(facesContext, ExceptionQueuedEvent.class, new ExceptionQueuedEventContext(facesContext, cause));
+ // FIXME this is lame; there should be some other way to stop view
+ // rendering
+ facesContext.getViewRoot().setRendered(false);
+ throw new AbortProcessingException("View restriction criteria was not met.");
+ }
+
+ return true;
+ }
+
+ /**
+ * Pick out the UIRestrictView components from the metadata facet's children.
+ * If no matches are found, an unmodifiable empty list is returned.
+ */
+ protected Collection<UIRestrictView> collectionViewRestrictions(UIViewRoot viewRoot)
+ {
+ return collectMetadataComponents(viewRoot, new UIComponentFilter<UIRestrictView>()
+ {
+
+ @Override
+ public boolean accepts(UIComponent candidate)
+ {
+ return candidate instanceof UIRestrictView;
+ }
+
+ });
+ }
+}
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ExecuteViewActionsListener.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ExecuteViewActionsListener.java 2009-05-30 05:53:53 UTC (rev 11051)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ExecuteViewActionsListener.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -1,115 +1,80 @@
package org.jboss.seam.faces.lifecycle;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import javax.el.ELException;
import javax.el.MethodExpression;
+import javax.enterprise.inject.Current;
import javax.faces.FacesException;
import javax.faces.application.NavigationHandler;
import javax.faces.component.UIComponent;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.ExceptionQueuedEvent;
-import javax.faces.event.ExceptionQueuedEventContext;
-import javax.faces.event.SystemEvent;
-import javax.faces.event.SystemEventListener;
-import org.jboss.seam.bridge.ManagerBridge;
-import org.jboss.seam.faces.component.UIRestrictView;
import org.jboss.seam.faces.component.UIViewAction;
-import org.jboss.seam.security.Identity;
import org.jboss.webbeans.log.Log;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Logger;
-//@ListenerFor(systemEventClass = PreRenderViewEvent.class, sourceClass = UIViewRoot.class)
-public class ExecuteViewActionsListener implements SystemEventListener
+/**
+ * <p>
+ * A JSF metadata facet processor which executes action expressions in the
+ * Render Response phase of the JSF life cycle, immediate prior to the view
+ * being rendered.
+ * </p>
+ *
+ * <p>
+ * Before the first action is processed, the processor first checks if this is
+ * an initial (non-faces) request and the FacesContext reports that validation
+ * has failed. This situation occurs when validation has failed on a view
+ * parameter. The processor will execute the navigation handler using a null
+ * "from action" and the built-in logical outcome
+ * "org.jboss.seam.ViewParameterValidationFailed".
+ * </p>
+ *
+ * <p>
+ * View actions are executed in the order that they appear in the view template.
+ * After each action is executed, the navigation handler is fired. If a
+ * navigation case is pursued, it short-circuits the remaining actions. It also
+ * instructs the processor chain to abort. Otherwise, the remaining actions are
+ * processed in the same manner.
+ * </p>
+ *
+ * @author Dan Allen
+ */
+public class ExecuteViewActionsListener extends AbstractViewMetadataProcesssor
{
- private static final Log log = Logging.getLog(ExecuteViewActionsListener.class);
-
- public boolean isListenerForSource(Object source)
- {
- return source instanceof UIViewRoot;
- }
+ public static final String VIEW_PARAMETER_VALIDATION_FAILED_OUTCOME = "org.jboss.seam.ViewParameterValidationFailed";
- public void processEvent(SystemEvent event) throws AbortProcessingException
- {
- execute();
- }
+ @Logger Log log;
+
+ @Current FacesContext facesContext;
- protected void execute()
+ @Override
+ public boolean execute()
{
- FacesContext context = FacesContext.getCurrentInstance();
- UIViewRoot initialViewRoot = context.getViewRoot();
+ UIViewRoot initialViewRoot = facesContext.getViewRoot();
- // TEMPORARY needs to be organized better
-
- // collect first so as not to introduce a hard dependency on Identity if tag is not in use
- Collection<UIRestrictView> restrictions = collectionViewRestrictions(initialViewRoot);
- if (!restrictions.isEmpty())
- {
- if (Identity.isSecurityEnabled())
- {
- if (log.isTraceEnabled())
- {
- log.trace("Processing view restrictions before render view");
- }
-
- Identity identity = ManagerBridge.getProvider().getCurrentManager().getInstanceByType(Identity.class);
- try
- {
- for (UIRestrictView restriction : restrictions)
- {
- if (restriction.getRequire() != null)
- {
- identity.checkRestriction(restriction.getRequire());
- }
- else
- {
- identity.checkPermission(initialViewRoot.getViewId(), "render");
- }
- }
- }
- // FIXME damn this is ugly, but JCDI is wrapping exceptions
- catch (Exception e)
- {
- Throwable cause = e;
- if (e instanceof InvocationTargetException)
- {
- cause = e.getCause();
- }
-
- context.getApplication().publishEvent(context, ExceptionQueuedEvent.class, new ExceptionQueuedEventContext(context, cause));
- // FIXME this is lame; there should be some other way to stop view rendering
- context.getViewRoot().setRendered(false);
- throw new AbortProcessingException("View restriction criteria was not met.");
- //return;
- }
- }
- }
- // END TEMPORARY
-
if (log.isTraceEnabled())
{
log.trace("Processing view actions before render view");
}
- NavigationHandler navHandler = context.getApplication().getNavigationHandler();
- boolean postback = context.isPostback();
+ NavigationHandler navHandler = facesContext.getApplication().getNavigationHandler();
+ boolean postback = facesContext.isPostback();
- if (!postback && context.isValidationFailed())
+ // check if any view parameters failed validation and if so, fire the navigation handler
+ if (!postback && facesContext.isValidationFailed())
{
if (log.isTraceEnabled())
{
- log.trace("Validation flagged as failed. Calling navigation handler without executing view actions.");
+ log.trace("Validation of view parameters failed. Calling navigation handler without executing view actions.");
}
- navHandler.handleNavigation(context, null, null);
- return;
+ // QUESTION is this a good idea to use a built-in logical outcome?
+ navHandler.handleNavigation(facesContext, null, VIEW_PARAMETER_VALIDATION_FAILED_OUTCOME);
+ return !facesContext.getResponseComplete() && initialViewRoot.getViewId().equals(facesContext.getViewRoot().getViewId());
}
+ boolean proceed = true;
Collection<UIViewAction> actions = collectViewActions(initialViewRoot, postback);
for (UIViewAction action : actions)
{
@@ -126,7 +91,7 @@
}
try
{
- Object returnVal = execute.invoke(context.getELContext(), null);
+ Object returnVal = execute.invoke(facesContext.getELContext(), null);
outcome = (returnVal != null ? returnVal.toString() : null);
fromAction = execute.getExpressionString();
}
@@ -140,46 +105,34 @@
}
}
- navHandler.handleNavigation(context, fromAction, outcome);
+ navHandler.handleNavigation(facesContext, fromAction, outcome);
- // QUESTION In either of these two cases, should an AbortProcessingEvent exception be thrown?
- if (context.getResponseComplete())
+ // short-circuit actions if response has been marked complete
+ if (facesContext.getResponseComplete())
{
if (log.isDebugEnabled())
{
log.debug("Response marked as complete during view action processing. Short-circuiting remaining actions.");
}
// FIXME this is lame; there should be some other way to stop view rendering
- context.getViewRoot().setRendered(false);
+ facesContext.getViewRoot().setRendered(false);
+ proceed = false;
break;
}
- else if (!initialViewRoot.getViewId().equals(context.getViewRoot().getViewId()))
+ // short-circuit actions if a navigation case was pursued
+ else if (!initialViewRoot.getViewId().equals(facesContext.getViewRoot().getViewId()))
{
if (log.isDebugEnabled())
{
log.debug("Detected change in view ID during view action processing. Short-circuiting remaining actions.");
}
+ proceed = false;
break;
}
}
+
+ return proceed;
}
-
- /**
- * Pick out the UIRestrictView components from the metadata facet's children. If no
- * matches are found, an unmodifiable empty list is returned.
- */
- protected Collection<UIRestrictView> collectionViewRestrictions(UIViewRoot viewRoot)
- {
- return collectMetadataComponents(viewRoot, new UIComponentFilter<UIRestrictView>() {
-
- @Override
- public boolean accepts(UIComponent candidate)
- {
- return candidate instanceof UIRestrictView;
- }
-
- });
- }
/**
* Pick out the UIViewAction components from the metadata facet's children. If this is a postback,
@@ -193,36 +146,10 @@
@Override
public boolean accepts(UIComponent candidate)
{
- return candidate instanceof UIViewAction && (!postback || ((UIViewAction) candidate).isOnPostback());
+ return candidate instanceof UIViewAction && ((UIViewAction) candidate).isIf() && (!postback || ((UIViewAction) candidate).isOnPostback());
}
});
}
-
- protected <C extends UIComponent> Collection<C> collectMetadataComponents(UIViewRoot viewRoot, UIComponentFilter<C> componentFilter)
- {
- UIComponent metadataFacet = viewRoot.getFacet(UIViewRoot.METADATA_FACET_NAME);
-
- if (metadataFacet == null)
- {
- return Collections.<C>emptyList();
- }
-
- Collection<C> matches = new ArrayList<C>();
- for (UIComponent candidate : metadataFacet.getChildren())
- {
- if (componentFilter.accepts(candidate))
- {
- matches.add((C) candidate);
- }
- }
-
- return matches;
- }
-
- protected abstract class UIComponentFilter<C extends UIComponent>
- {
- public abstract boolean accepts(UIComponent candidate);
- }
}
Added: modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/FacesSystemEventProcessor.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/FacesSystemEventProcessor.java (rev 0)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/FacesSystemEventProcessor.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -0,0 +1,19 @@
+package org.jboss.seam.faces.lifecycle;
+
+/**
+ * A <strong>FacesSystemEventProcessor</strong> is an object which performs
+ * processing when a JSF SystemEvent is fired. Each processor is typically part
+ * of a chain. The execute() method returns a boolean indicating whether to
+ * continue or abort processing.
+ *
+ * @author Dan Allen
+ */
+public interface FacesSystemEventProcessor
+{
+ /**
+ * Perform processing.
+ *
+ * @return Whether the processing should continue. true = continue; false = abort
+ */
+ public abstract boolean execute();
+}
Added: modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ImportNamespacesProcessor.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ImportNamespacesProcessor.java (rev 0)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/ImportNamespacesProcessor.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -0,0 +1,92 @@
+package org.jboss.seam.faces.lifecycle;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+import org.jboss.seam.faces.component.UIImport;
+
+/**
+ * <p>
+ * A metadata facet processor that executes on a non-faces request immediately
+ * prior to the view being rendered. The processor collects the EL namespaces
+ * and stores them in the view-scope (the view map of the UIViewRoot) where they
+ * can be consulted by the EL resolver.
+ * </p>
+ *
+ * <p>
+ * An EL namespace is identical to a Java namespace, except for EL names. EL
+ * names are fully-qualified to prevent naming conflicts, but it is convenient
+ * for the page author to shorten those names by importing the namespace. When
+ * the EL resolver is resolving the base object, the namespaces are prepended to
+ * the name to match a fully-qualified EL name.
+ * </p>
+ *
+ * @author Dan Allen
+ */
+public class ImportNamespacesProcessor extends AbstractViewMetadataProcesssor
+{
+ public static final String NAMESPACES_CACHE_KEY = "org.jboss.seam.faces.NAMESPACES_CACHE";
+
+ @Override
+ public boolean execute()
+ {
+ UIViewRoot viewRoot = FacesContext.getCurrentInstance().getViewRoot();
+ Map<String, Object> viewMap = viewRoot.getViewMap();
+ if (viewMap.containsKey(NAMESPACES_CACHE_KEY))
+ {
+ return true;
+ }
+
+ Collection<String> aggregateNamespaces = new ArrayList<String>();
+ for (UIImport uiImport : collectImports(viewRoot))
+ {
+ Object namespaces = uiImport.getNamespaces();
+
+ if (namespaces instanceof Collection)
+ {
+ for (Object candidate : (Collection<?>) namespaces)
+ {
+ if (candidate instanceof String && ((String) candidate).length() > 0)
+ {
+ aggregateNamespaces.add((String) candidate);
+ }
+ }
+ }
+ else if (namespaces instanceof String)
+ {
+ for (String candidate : Arrays.asList(((String) namespaces).split("[\\s]*,[\\s]*")))
+ {
+ if (candidate.length() > 0)
+ {
+ aggregateNamespaces.add(candidate);
+ }
+ }
+ }
+ }
+
+ viewMap.put(NAMESPACES_CACHE_KEY, aggregateNamespaces);
+ return true;
+ }
+
+ /**
+ * Pick out the UIImport components from the metadata facet's children.
+ */
+ protected Collection<UIImport> collectImports(UIViewRoot viewRoot)
+ {
+ return collectMetadataComponents(viewRoot, new UIComponentFilter<UIImport>() {
+
+ @Override
+ public boolean accepts(UIComponent candidate)
+ {
+ return candidate instanceof UIImport;
+ }
+
+ });
+ }
+}
Added: modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/SeamPreRenderViewListener.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/SeamPreRenderViewListener.java (rev 0)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/lifecycle/SeamPreRenderViewListener.java 2009-05-30 05:55:58 UTC (rev 11052)
@@ -0,0 +1,58 @@
+package org.jboss.seam.faces.lifecycle;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.enterprise.inject.spi.BeanManager;
+import javax.faces.component.UIViewRoot;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.SystemEvent;
+import javax.faces.event.SystemEventListener;
+
+import org.jboss.seam.bridge.ManagerBridge;
+
+/**
+ * <p>
+ * A JSF {@link SystemEventListener} that observes the PreRenderViewEvent, which
+ * is fired in the Render Response phase of the JSF life cycle immediately prior
+ * to rendering the view. This listener maintains a list of
+ * {@link FacesSystemEventProcessor} types that are resolved by the JSR-299
+ * BeanManager and executed in turn. The execute() method of each processor
+ * indicates whether to continue on to the next processor or not.
+ * </p>
+ *
+ * @author Dan Allen
+ * @see FacesSystemEventProcessor
+ */
+//@ListenerFor(systemEventClass = PreRenderViewEvent.class, sourceClass = UIViewRoot.class)
+public class SeamPreRenderViewListener implements SystemEventListener
+{
+ private List<Class<? extends FacesSystemEventProcessor>> processorTypes = new ArrayList<Class<? extends FacesSystemEventProcessor>>();
+
+ public SeamPreRenderViewListener()
+ {
+ processorTypes.add(EnforceViewRestrictionsProcessor.class);
+ processorTypes.add(ExecuteViewActionsListener.class);
+ processorTypes.add(ImportNamespacesProcessor.class);
+ processorTypes.add(ConvertStatusMessagesProcessor.class);
+ }
+
+ public boolean isListenerForSource(Object source)
+ {
+ return source instanceof UIViewRoot;
+ }
+
+ public void processEvent(SystemEvent event) throws AbortProcessingException
+ {
+ BeanManager manager = ManagerBridge.getProvider().getCurrentManager();
+ for (Class<? extends FacesSystemEventProcessor> processorType : processorTypes)
+ {
+ boolean result = manager.getInstanceByType(processorType).execute();
+ if (!result)
+ {
+ break;
+ }
+ }
+ }
+
+}
Modified: modules/trunk/faces/src/main/resources/META-INF/faces-config.xml
===================================================================
--- modules/trunk/faces/src/main/resources/META-INF/faces-config.xml 2009-05-30 05:53:53 UTC (rev 11051)
+++ modules/trunk/faces/src/main/resources/META-INF/faces-config.xml 2009-05-30 05:55:58 UTC (rev 11052)
@@ -18,17 +18,14 @@
</factory>
<application>
+ <message-bundle>org.jboss.seam.international.SeamResourceBundleAdapter</message-bundle>
<view-handler>org.jboss.seam.faces.application.SeamViewHandler</view-handler>
<el-resolver>org.jboss.seam.el.SeamELResolver</el-resolver>
<el-resolver>org.jboss.seam.faces.el.SeamFacesELResolver</el-resolver>
<system-event-listener>
- <system-event-listener-class>org.jboss.seam.faces.lifecycle.ExecuteViewActionsListener</system-event-listener-class>
+ <system-event-listener-class>org.jboss.seam.faces.lifecycle.SeamPreRenderViewListener</system-event-listener-class>
<system-event-class>javax.faces.event.PreRenderViewEvent</system-event-class>
</system-event-listener>
- <system-event-listener>
- <system-event-listener-class>org.jboss.seam.faces.lifecycle.ConvertStatusMessagesListener</system-event-listener-class>
- <system-event-class>javax.faces.event.PreRenderViewEvent</system-event-class>
- </system-event-listener>
</application>
<lifecycle>
@@ -36,6 +33,11 @@
<phase-listener>org.jboss.seam.faces.lifecycle.SeamPhaseListener</phase-listener>
-->
</lifecycle>
+
+ <component>
+ <component-type>org.jboss.seam.faces.Import</component-type>
+ <component-class>org.jboss.seam.faces.component.UIImport</component-class>
+ </component>
<component>
<component-type>org.jboss.seam.faces.RestrictView</component-type>
Modified: modules/trunk/faces/src/main/resources/META-INF/seam-faces.taglib.xml
===================================================================
--- modules/trunk/faces/src/main/resources/META-INF/seam-faces.taglib.xml 2009-05-30 05:53:53 UTC (rev 11051)
+++ modules/trunk/faces/src/main/resources/META-INF/seam-faces.taglib.xml 2009-05-30 05:55:58 UTC (rev 11052)
@@ -3,6 +3,13 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibary_2_0.xsd"
version="2.0">
<namespace>http://jboss.com/products/seam/faces</namespace>
+
+ <tag>
+ <tag-name>import</tag-name>
+ <component>
+ <component-type>org.jboss.seam.faces.Import</component-type>
+ </component>
+ </tag>
<tag>
<tag-name>restrictView</tag-name>
15 years, 6 months
Seam SVN: r11051 - modules/trunk/international/src/main/java/org/jboss/seam/international.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-30 01:53:53 -0400 (Sat, 30 May 2009)
New Revision: 11051
Modified:
modules/trunk/international/src/main/java/org/jboss/seam/international/SeamResourceBundleAdapter.java
Log:
add note
Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/SeamResourceBundleAdapter.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/SeamResourceBundleAdapter.java 2009-05-30 05:53:32 UTC (rev 11050)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/SeamResourceBundleAdapter.java 2009-05-30 05:53:53 UTC (rev 11051)
@@ -9,6 +9,11 @@
import org.jboss.seam.bridge.ManagerBridge;
+/**
+ * QUESTION should this be in the faces module (since it's JSF that needs this workaround)
+ *
+ * @author Dan Allen
+ */
public class SeamResourceBundleAdapter extends ResourceBundle
{
@Override
15 years, 6 months
Seam SVN: r11050 - modules/trunk/security/src/main/java/org/jboss/seam/security.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-30 01:53:32 -0400 (Sat, 30 May 2009)
New Revision: 11050
Modified:
modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java
Log:
minor
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java 2009-05-29 19:43:10 UTC (rev 11049)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java 2009-05-30 05:53:32 UTC (rev 11050)
@@ -30,7 +30,7 @@
private static final String DEFAULT_LOGIN_FAILED_MESSAGE = "Login failed.";
private static final String DEFAULT_LOGIN_SUCCESSFUL_MESSAGE = "Welcome, {0}.";
private static final String DEFAULT_ALREADY_LOGGED_IN_MESSAGE = "You're already logged in. Please log out first if you wish to log in again.";
- private static final String DEFAULT_NOT_LOGGED_IN_MESSAGE = "Please log in first";
+ private static final String DEFAULT_NOT_LOGGED_IN_MESSAGE = "Please log in first.";
@Current StatusMessages statusMessages;
@Current Credentials credentials;
15 years, 6 months
Seam SVN: r11049 - in modules/trunk/security/src/main/java/org/jboss/seam/security: events and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-29 15:43:10 -0400 (Fri, 29 May 2009)
New Revision: 11049
Added:
modules/trunk/security/src/main/java/org/jboss/seam/security/events/AlreadyLoggedInEvent.java
Removed:
modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityFunctions.java
modules/trunk/security/src/main/java/org/jboss/seam/security/events/AlreadyLoggedInEvent.java
Modified:
modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java
Log:
reenable security messages and allow the keys, severity and default messages to be overridden
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java 2009-05-29 18:51:54 UTC (rev 11048)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java 2009-05-29 19:43:10 UTC (rev 11049)
@@ -1,92 +1,125 @@
package org.jboss.seam.security;
import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Current;
import javax.event.Observes;
+import org.jboss.seam.international.StatusMessages;
+import org.jboss.seam.international.StatusMessage.Severity;
+import org.jboss.seam.security.events.AlreadyLoggedInEvent;
+import org.jboss.seam.security.events.LoggedInEvent;
+import org.jboss.seam.security.events.LoginFailedEvent;
+import org.jboss.seam.security.events.NotLoggedInEvent;
import org.jboss.seam.security.events.PostAuthenticateEvent;
/**
- * Produces FacesMessages in response of certain security events, and helps to decouple the
- * Identity component from JSF.
+ * Produces FacesMessages in response of certain security events, and helps to
+ * decouple the Identity component from JSF.
*
* @author Shane Bryzak
*/
+public
@ApplicationScoped
-public class SecurityEventMessages
+class SecurityEventMessages
{
+ private static final String LOGIN_FAILED_MESSAGE_KEY = "org.jboss.seam.loginFailed";
+ private static final String LOGIN_SUCCESSFUL_MESSAGE_KEY = "org.jboss.seam.loginSuccessful";
+ private static final String ALREADY_LOGGED_IN_MESSAGE_KEY = "org.jboss.seam.alreadyLoggedIn";
+ private static final String NOT_LOGGED_IN_MESSAGE_KEY = "org.jboss.seam.notLoggedIn";
+
+ private static final String DEFAULT_LOGIN_FAILED_MESSAGE = "Login failed.";
+ private static final String DEFAULT_LOGIN_SUCCESSFUL_MESSAGE = "Welcome, {0}.";
+ private static final String DEFAULT_ALREADY_LOGGED_IN_MESSAGE = "You're already logged in. Please log out first if you wish to log in again.";
+ private static final String DEFAULT_NOT_LOGGED_IN_MESSAGE = "Please log in first";
+
+ @Current StatusMessages statusMessages;
+ @Current Credentials credentials;
+
public void postAuthenticate(@Observes PostAuthenticateEvent event)
{
- //org.jboss.security.saml.SSOManager.processManualLoginNotification(
- //ServletContexts.instance().getRequest(), identity.getPrincipal().getName());
+ // org.jboss.security.saml.SSOManager.processManualLoginNotification(
+ // ServletContexts.instance().getRequest(),
+ // identity.getPrincipal().getName());
}
+
+ public void addLoginFailedMessage(@Observes LoginFailedEvent event)
+ {
+ statusMessages.addFromResourceBundleOrDefault(getLoginFailedMessageSeverity(), getLoginFailedMessageKey(), getDefaultLoginFailedMessage(), event.getLoginException());
+ }
- /*
- @Current StatusMessages statusMessages;
- @Current Credentials credentials;
+ public void addLoginSuccessMessage(@Observes LoggedInEvent event)
+ {
+ statusMessages.addFromResourceBundleOrDefault(getLoginSuccessfulMessageSeverity(), getLoginSuccessfulMessageKey(), getDefaultLoginSuccessfulMessage(), credentials.getUsername());
+ }
- public void addLoginFailedMessage(@Observes LoginFailedEvent event)
+ public void addAlreadyLoggedInMessage(@Observes AlreadyLoggedInEvent event)
{
- statusMessages.addFromResourceBundleOrDefault(
- getLoginFailedMessageSeverity(),
- getLoginFailedMessageKey(),
- getLoginFailedMessage(),
- event.getLoginException());
+ statusMessages.addFromResourceBundleOrDefault(getAlreadyLoggedInMessageSeverity(), getAlreadyLoggedInMessageKey(), getDefaultAlreadyLoggedInMessage());
}
-
- public String getLoginFailedMessage()
+
+ public void addNotLoggedInMessage(@Observes NotLoggedInEvent event)
{
- return "Login failed";
+ statusMessages.addFromResourceBundleOrDefault(getNotLoggedInMessageSeverity(), getNotLoggedInMessageKey(), getDefaultNotLoggedInMessage());
}
-
+
public Severity getLoginFailedMessageSeverity()
{
return Severity.INFO;
}
-
+
public String getLoginFailedMessageKey()
{
- return "org.jboss.seam.loginFailed";
+ return LOGIN_FAILED_MESSAGE_KEY;
}
- public void addLoginSuccessfulMessage(@Observes LoggedInEvent event)
+ public String getDefaultLoginFailedMessage()
{
- statusMessages.addFromResourceBundleOrDefault(
- getLoginSuccessfulMessageSeverity(),
- getLoginSuccessfulMessageKey(),
- getLoginSuccessfulMessage(),
- credentials.getUsername());
+ return DEFAULT_LOGIN_FAILED_MESSAGE;
}
- public void addNotLoggedInMessage(@Observes NotLoggedInEvent event)
+ public Severity getLoginSuccessfulMessageSeverity()
{
- statusMessages.addFromResourceBundleOrDefault( Severity.WARN,
- "org.jboss.seam.NotLoggedIn",
- "Please log in first"
- );
+ return Severity.INFO;
}
+
+ public String getLoginSuccessfulMessageKey()
+ {
+ return LOGIN_SUCCESSFUL_MESSAGE_KEY;
+ }
- public Severity getLoginSuccessfulMessageSeverity()
+ public String getDefaultLoginSuccessfulMessage()
{
+ return DEFAULT_LOGIN_SUCCESSFUL_MESSAGE;
+ }
+
+ public Severity getAlreadyLoggedInMessageSeverity()
+ {
return Severity.INFO;
}
-
- public String getLoginSuccessfulMessage()
+
+ public String getAlreadyLoggedInMessageKey()
{
- return "Welcome, #0";
+ return ALREADY_LOGGED_IN_MESSAGE_KEY;
}
-
- public String getLoginSuccessfulMessageKey()
+
+ public String getDefaultAlreadyLoggedInMessage()
{
- return "org.jboss.seam.loginSuccessful";
+ return DEFAULT_ALREADY_LOGGED_IN_MESSAGE;
}
- public void addAlreadyLoggedInMessage(@Observes AlreadyLoggedInEvent event)
+ public Severity getNotLoggedInMessageSeverity()
{
- statusMessages.addFromResourceBundleOrDefault ( Severity.WARN,
- "org.jboss.seam.AlreadyLoggedIn",
- "You are already logged in, please log out first if you wish to log in again"
- );
+ return Severity.WARN;
}
- */
+ public String getNotLoggedInMessageKey()
+ {
+ return NOT_LOGGED_IN_MESSAGE_KEY;
+ }
+
+ public String getDefaultNotLoggedInMessage()
+ {
+ return DEFAULT_NOT_LOGGED_IN_MESSAGE;
+ }
+
}
Deleted: modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityFunctions.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityFunctions.java 2009-05-29 18:51:54 UTC (rev 11048)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityFunctions.java 2009-05-29 19:43:10 UTC (rev 11049)
@@ -1,35 +0,0 @@
-package org.jboss.seam.security;
-
-/**
- * Delegating wrapper for EL security functions.
- *
- * @author Shane Bryzak
- */
-public class SecurityFunctions
-{
- // TODO enable
- /*
- public static boolean hasRole(String name)
- {
- return Identity.instance().hasRole(name);
- }
-
- public static boolean hasPermission(String name, String action, Object arg)
- {
- if (arg != null)
- {
- return Identity.instance().hasPermission(name, action, arg);
- }
- else
- {
- return Identity.instance().hasPermission(name, action);
- }
- }
-
- public static boolean hasPermission(Object target, String action)
- {
- return Identity.instance().hasPermission(target, action);
- }
-
- */
-}
Deleted: modules/trunk/security/src/main/java/org/jboss/seam/security/events/AlreadyLoggedInEvent.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/events/AlreadyLoggedInEvent.java 2009-05-29 18:51:54 UTC (rev 11048)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/events/AlreadyLoggedInEvent.java 2009-05-29 19:43:10 UTC (rev 11049)
@@ -1,11 +0,0 @@
-package org.jboss.seam.security.events;
-
-/**
- * This event is fired when an already authenticated user attempts to authenticate again
- *
- * @author Shane Bryzak
- */
-public class AlreadyLoggedInEvent
-{
-
-}
Copied: modules/trunk/security/src/main/java/org/jboss/seam/security/events/AlreadyLoggedInEvent.java (from rev 11044, modules/trunk/security/src/main/java/org/jboss/seam/security/events/AlreadyLoggedInEvent.java)
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/events/AlreadyLoggedInEvent.java (rev 0)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/events/AlreadyLoggedInEvent.java 2009-05-29 19:43:10 UTC (rev 11049)
@@ -0,0 +1,11 @@
+package org.jboss.seam.security.events;
+
+/**
+ * This event is fired when an already authenticated user attempts to authenticate again
+ *
+ * @author Shane Bryzak
+ */
+public class AlreadyLoggedInEvent
+{
+
+}
15 years, 6 months
Seam SVN: r11048 - in modules/trunk: faces/src/main/java/org/jboss/seam/faces/context and 6 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-29 14:51:54 -0400 (Fri, 29 May 2009)
New Revision: 11048
Modified:
modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/LocaleConfig.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/FacesExpressions.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesLocaleResolver.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java
modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java
modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java
modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java
modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityStoreEntityClasses.java
Log:
have FacesContextProducer produce FacesContext into request-scope
that fixes problems with injecting it
clean up FIXME comments
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/LocaleConfig.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/LocaleConfig.java 2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/application/LocaleConfig.java 2009-05-29 18:51:54 UTC (rev 11048)
@@ -12,7 +12,7 @@
import javax.faces.application.ApplicationFactory;
/**
- * FIXME update docs
+ * FIXME update javadoc - was copied from old rev of class
* Configures the JSF locale support from the Seam container.
*
* <p>
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java 2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java 2009-05-29 18:51:54 UTC (rev 11048)
@@ -6,11 +6,15 @@
import javax.faces.context.FacesContext;
/**
- * Support for injecting the JSF FacesContext object
+ * <p>A producer which retrieves the current JSF FacesContext by calling
+ * {@link FacesContext#getCurrentInstance}, thus allowing it to be
+ * injected.</p>
*
- * QUESTION should we return null if there is no current phase id? (seems to be a common check)
+ * <p>QUESTION should we return null if there is no current phase id? (seems to be a common check)</p>
+ * <p>QUESTION is it correct to use a @RequestScoped producer? If it is @Dependent, then a developer could unknowingly bind it to a wider-scoped bean</p>
*
* @author Gavin King
+ * @author Dan Allen
*/
public class FacesContextProducer
{
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/FacesExpressions.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/FacesExpressions.java 2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/el/FacesExpressions.java 2009-05-29 18:51:54 UTC (rev 11048)
@@ -23,8 +23,6 @@
public boolean isActive()
{
- // FIXME temporary hack since a bogus FacesContext is being injected
- facesContext = FacesContext.getCurrentInstance();
return facesContext != null && facesContext.getCurrentPhaseId() != null;
}
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesLocaleResolver.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesLocaleResolver.java 2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesLocaleResolver.java 2009-05-29 18:51:54 UTC (rev 11048)
@@ -25,8 +25,6 @@
public boolean isActive()
{
- // FIXME temporary hack since the FacesContext being injected is bogus
- facesContext = FacesContext.getCurrentInstance();
return facesContext != null && facesContext.getCurrentPhaseId() != null;
}
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java 2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java 2009-05-29 18:51:54 UTC (rev 11048)
@@ -31,8 +31,6 @@
public boolean isActive()
{
- // FIXME temporary hack since facesContext is not injecting correctly into this class
- facesContext = FacesContext.getCurrentInstance();
return facesContext != null && facesContext.getCurrentPhaseId() != null && facesContext.getExternalContext() != null;
}
Modified: modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java 2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java 2009-05-29 18:51:54 UTC (rev 11048)
@@ -45,7 +45,7 @@
private void installWebBeansELResolver()
{
Expressions expressions = getCurrentManager().getInstanceByType(Expressions.class);
- // FIXME wow this is a hack
+ // FIXME wow this is a hack to add a new ELResolver
((CompositeELResolver) expressions.getELContext().getELResolver()).add(new WebBeansELResolver());
elResolverInitialized = true;
}
Modified: modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java 2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java 2009-05-29 18:51:54 UTC (rev 11048)
@@ -104,7 +104,7 @@
Map<Object, Object> fixture = new HashMap<Object, Object>();
fixture.put("name", "Dan");
Expressions expressions = getCurrentManager().getInstanceByType(Expressions.class);
- // FIXME wow this is a hack
+ // FIXME wow this is a hack to add a new EL resolver
((CompositeELResolver) expressions.getELContext().getELResolver()).add(new TestFixtureELResolver(fixture));
elResolverInitialized = true;
}
Modified: modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java
===================================================================
--- modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java 2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java 2009-05-29 18:51:54 UTC (rev 11048)
@@ -15,7 +15,7 @@
{
public BeanManager getCurrentManager()
{
- // FIXME: waiting on upgrade
+ // FIXME waiting on upgrade
return (BeanManager) ActivityManager.getInstance().getCurrentActivity();
}
}
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityStoreEntityClasses.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityStoreEntityClasses.java 2009-05-29 18:32:44 UTC (rev 11047)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityStoreEntityClasses.java 2009-05-29 18:51:54 UTC (rev 11048)
@@ -3,7 +3,7 @@
import javax.enterprise.context.ApplicationScoped;
/**
- * FIXME - a hack until we get some proper bean configuration
+ * FIXME a hack until we get some proper bean configuration
*
* @author Shane Bryzak
*
15 years, 6 months
Seam SVN: r11047 - branches/community/Seam_2_1/build.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-05-29 14:32:44 -0400 (Fri, 29 May 2009)
New Revision: 11047
Modified:
branches/community/Seam_2_1/build/default.build.properties
Log:
revert also
Modified: branches/community/Seam_2_1/build/default.build.properties
===================================================================
--- branches/community/Seam_2_1/build/default.build.properties 2009-05-29 18:31:52 UTC (rev 11046)
+++ branches/community/Seam_2_1/build/default.build.properties 2009-05-29 18:32:44 UTC (rev 11047)
@@ -8,7 +8,7 @@
major.version 2
minor.version .1
patchlevel .2
-qualifier
+qualifier -SNAPSHOT
#
# Other program locations
# -----------------------
15 years, 6 months
Seam SVN: r11045 - in modules/trunk: el and 1 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-29 14:31:01 -0400 (Fri, 29 May 2009)
New Revision: 11045
Added:
modules/trunk/pom.xml
Removed:
modules/trunk/parent/
Modified:
modules/trunk/el/pom.xml
modules/trunk/web/src/main/java/org/jboss/seam/web/SeamListener.java
Log:
move parent to top-level
Modified: modules/trunk/el/pom.xml
===================================================================
--- modules/trunk/el/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
+++ modules/trunk/el/pom.xml 2009-05-29 18:31:01 UTC (rev 11045)
@@ -8,7 +8,7 @@
<groupId>org.jboss.seam</groupId>
<version>3.0.0-SNAPSHOT</version>
<!-- could use this to build w/o having install the parent
- <relativePath>../parent/pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
-->
</parent>
Copied: modules/trunk/pom.xml (from rev 11026, modules/trunk/parent/pom.xml)
===================================================================
--- modules/trunk/pom.xml (rev 0)
+++ modules/trunk/pom.xml 2009-05-29 18:31:01 UTC (rev 11045)
@@ -0,0 +1,318 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>seam-version-matrix</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>version-matrix/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>seam-parent</artifactId>
+ <packaging>pom</packaging>
+ <version>3.0.0-SNAPSHOT</version>
+
+ <name>Seam, a next-generation Java EE framework</name>
+
+ <description>
+ Seam is a powerful open source development platform for building rich
+ Internet applications in Java. Seam integrates technologies such as Java
+ Contexts and Dependency Injection (JCDI), Asynchronous JavaScript and XML
+ (Ajax), JavaServer Faces (JSF 2.0), Java Persistence (JPA 2.0),
+ Enterprise Java Beans (EJB 3.1) and Business Process Management (BPM)
+ into a unified full-stack solution, complete with sophisticated tooling
+ provided by JBoss Tools.
+ </description>
+
+ <url>http://www.seamframework.org</url>
+
+ <inceptionYear>2005</inceptionYear>
+
+ <licenses>
+ <license>
+ <name>Lesser Gnu Public License, Version 2.1</name>
+ <url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
+ </license>
+ </licenses>
+
+ <developers>
+ <developer>
+ <name>Pete Muir</name>
+ <roles>
+ <role>Project Lead</role>
+ </roles>
+ <email>pete.muir(a)jboss.org</email>
+ <organization>JBoss, a division of Red Hat</organization>
+ <url>http://in.relation.to/Bloggers/Pete</url>
+ </developer>
+
+ <developer>
+ <name>Gavin King</name>
+ <roles>
+ <role>Project Founder</role>
+ </roles>
+ <url>http://in.relation.to/Bloggers/Gavin</url>
+ <organization>JBoss, a division of Red Hat</organization>
+ </developer>
+
+ <developer>
+ <name>Norman Richards</name>
+ <roles>
+ <role>Core Developer</role>
+ </roles>
+ <url>http://in.relation.to/Bloggers/Norman</url>
+ <organization>JBoss, a division of Red Hat</organization>
+ </developer>
+
+ <developer>
+ <name>Shane Bryzak</name>
+ <roles>
+ <role>Core Developer</role>
+ </roles>
+ <url>http://in.relation.to/Bloggers/Shane</url>
+ <organization>JBoss, a division of Red Hat</organization>
+ </developer>
+
+ <developer>
+ <name>Dan Allen</name>
+ <roles>
+ <role>Core Developer</role>
+ </roles>
+ <url>http://in.relation.to/Bloggers/Dan</url>
+ <organization>JBoss, a division of Red Hat</organization>
+ </developer>
+
+ <!-- TODO continue adding core developers -->
+
+ </developers>
+
+ <modules>
+ <!-- declaring version-matrix (our parent) as a module forces it to be built first -->
+ <module>version-matrix</module>
+ <module>mock</module>
+ <module>bridge-api</module>
+ <module>webbeans-bridge</module>
+ <module>beans</module>
+ <module>resources</module>
+ <module>el</module>
+ <module>international</module>
+ <module>web</module>
+ <module>drools</module>
+ <module>security</module>
+ <module>faces</module>
+ </modules>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-api</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.test-harness</groupId>
+ <artifactId>jboss-test-harness</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <classifier>jdk15</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>webbeans-core-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <defaultGoal>package</defaultGoal>
+ <pluginManagement>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <classpathContainers>
+ <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5</classpathContainer>
+ </classpathContainers>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>
+ true
+ </addDefaultImplementationEntries>
+ <addDefaultSpecificationEntries>
+ true
+ </addDefaultSpecificationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>emma-maven-plugin</artifactId>
+ <configuration>
+ <forkMode>once</forkMode>
+ <metadataFile>../target/coverage.em</metadataFile>
+ <outputDirectory>${project.build.directory}/generated-classes</outputDirectory>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </pluginManagement>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-8</version>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/webbeans/ri/tags</tagBase>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <configuration>
+ <formats>
+ <format>html</format>
+ <format>xml</format>
+ </formats>
+ <instrumentation>
+ </instrumentation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <profiles>
+
+ <profile>
+ <id>api-coverage</id>
+ <activation>
+ <property>
+ <name>apiCoverage</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <forkMode>once</forkMode>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma</artifactId>
+ <version>2.0.5312</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <id>jdk5</id>
+ <activation>
+ <jdk>1.5</jdk>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ </profiles>
+
+ <ciManagement>
+ <system>Hudson</system>
+ <url />
+ </ciManagement>
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>http://jira.jboss.org/browse/JBSEAM</url>
+ </issueManagement>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Seam</url>
+ </scm>
+
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+</project>
Modified: modules/trunk/web/src/main/java/org/jboss/seam/web/SeamListener.java
===================================================================
--- modules/trunk/web/src/main/java/org/jboss/seam/web/SeamListener.java 2009-05-29 18:20:39 UTC (rev 11044)
+++ modules/trunk/web/src/main/java/org/jboss/seam/web/SeamListener.java 2009-05-29 18:31:01 UTC (rev 11045)
@@ -2,33 +2,15 @@
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.spi.BeanManager;
-import javax.servlet.ServletContextEvent;
-import javax.servlet.ServletRequestEvent;
import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
import org.jboss.seam.beans.Created;
import org.jboss.seam.beans.Destroyed;
import org.jboss.seam.bridge.ManagerBridge;
-import org.jboss.webbeans.servlet.api.ServletListener;
-public class SeamListener implements ServletListener
+public class SeamListener implements HttpSessionListener //, ServletContextListener, ServletRequestListener
{
- public void contextDestroyed(ServletContextEvent event)
- {
- }
-
- public void contextInitialized(ServletContextEvent event)
- {
- }
-
- public void requestDestroyed(ServletRequestEvent event)
- {
- }
-
- public void requestInitialized(ServletRequestEvent event)
- {
- }
-
public void sessionCreated(HttpSessionEvent event)
{
getBeanManager().fireEvent(event.getSession(), new AnnotationLiteral<Created>() {});
@@ -43,5 +25,4 @@
{
return ManagerBridge.getProvider().getCurrentManager();
}
-
}
15 years, 6 months
Seam SVN: r11044 - in modules/trunk: beans/src/main/java/org/jboss/seam/beans and 28 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-29 14:20:39 -0400 (Fri, 29 May 2009)
New Revision: 11044
Added:
modules/trunk/beans/src/main/java/org/jboss/seam/beans/Created.java
modules/trunk/beans/src/main/java/org/jboss/seam/beans/Destroyed.java
modules/trunk/international/src/test/java/org/jboss/seam/international/SampleBean.java
modules/trunk/web/src/main/java/org/jboss/seam/web/SeamListener.java
Removed:
modules/trunk/drools/src/main/java/org/jboss/seam/drools/util/
modules/trunk/el/src/main/java/org/jboss/seam/el/SeamFunctionMapper.java
modules/trunk/international/src/test/java/org/jboss/seam/international/Thing.java
Modified:
modules/trunk/beans/pom.xml
modules/trunk/bpm/pom.xml
modules/trunk/bridge-api/pom.xml
modules/trunk/drools/pom.xml
modules/trunk/drools/src/main/java/org/jboss/seam/drools/RuleAgent.java
modules/trunk/drools/src/main/java/org/jboss/seam/drools/RuleBase.java
modules/trunk/el/pom.xml
modules/trunk/faces/pom.xml
modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesMessages.java
modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java
modules/trunk/faces/src/test/java/org/jboss/seam/faces/context/FacesContextProducerTest.java
modules/trunk/faces/src/test/java/org/jboss/seam/faces/international/FacesMessagesTest.java
modules/trunk/international/pom.xml
modules/trunk/international/src/main/java/org/jboss/seam/international/Interpolator.java
modules/trunk/international/src/main/java/org/jboss/seam/international/SeamResourceBundleAdapter.java
modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java
modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java
modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java
modules/trunk/international/src/test/java/org/jboss/seam/international/StatusMessagesTest.java
modules/trunk/international/src/test/resources/messages.properties
modules/trunk/openwebbeans-bridge/pom.xml
modules/trunk/persistence/pom.xml
modules/trunk/resources/pom.xml
modules/trunk/resources/src/main/java/org/jboss/seam/resources/DefaultResourceLoader.java
modules/trunk/resources/src/test/java/org/jboss/seam/resources/DefaultResourceLoaderTest.java
modules/trunk/security/pom.xml
modules/trunk/security/src/main/java/org/jboss/seam/security/Credentials.java
modules/trunk/security/src/main/java/org/jboss/seam/security/Identity.java
modules/trunk/security/src/main/java/org/jboss/seam/security/RememberMe.java
modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityManager.java
modules/trunk/security/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java
modules/trunk/security/src/main/java/org/jboss/seam/security/management/LdapIdentityStore.java
modules/trunk/security/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java
modules/trunk/security/src/main/java/org/jboss/seam/security/permission/PermissionManager.java
modules/trunk/security/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java
modules/trunk/security/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java
modules/trunk/transaction/pom.xml
modules/trunk/web/pom.xml
Log:
switch to @Logger Log log to inject log (except for a few places)
reorder dependencies in several pom.xml files
introduce early version of SeamListener to prototype notifying beans of session startup event
Modified: modules/trunk/beans/pom.xml
===================================================================
--- modules/trunk/beans/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/beans/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -25,9 +25,7 @@
<dependency>
<groupId>${webbeans.groupId}</groupId>
- <artifactId>webbeans-logging</artifactId>
- <!-- assumes use of Web Beans impl -->
- <scope>provided</scope>
+ <artifactId>webbeans-logger</artifactId>
</dependency>
</dependencies>
Added: modules/trunk/beans/src/main/java/org/jboss/seam/beans/Created.java
===================================================================
--- modules/trunk/beans/src/main/java/org/jboss/seam/beans/Created.java (rev 0)
+++ modules/trunk/beans/src/main/java/org/jboss/seam/beans/Created.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -0,0 +1,27 @@
+package org.jboss.seam.beans;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+/**
+ * A generic binding type that indicates that something was created.
+ *
+ * @author Dan Allen
+ */
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@Inherited
+public @interface Created {
+}
Added: modules/trunk/beans/src/main/java/org/jboss/seam/beans/Destroyed.java
===================================================================
--- modules/trunk/beans/src/main/java/org/jboss/seam/beans/Destroyed.java (rev 0)
+++ modules/trunk/beans/src/main/java/org/jboss/seam/beans/Destroyed.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -0,0 +1,27 @@
+package org.jboss.seam.beans;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.inject.BindingType;
+
+/**
+ * A generic binding type that indicates that something was destroyed.
+ *
+ * @author Dan Allen
+ */
+@Target( { TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+@BindingType
+@Inherited
+public @interface Destroyed {
+}
Modified: modules/trunk/bpm/pom.xml
===================================================================
--- modules/trunk/bpm/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/bpm/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -15,38 +15,47 @@
<name>Seam BPM</name>
<dependencies>
+
<dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>jsr299-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jbpm</groupId>
- <artifactId>jbpm-jpdl</artifactId>
- </dependency>
- <dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</dependency>
+
<dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
</dependency>
+
<dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </dependency>
+ <groupId>org.jbpm</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ </dependency>
+
<dependency>
- <groupId>org.jboss.seam</groupId>
+ <groupId>${seam.groupId}</groupId>
<artifactId>seam-el</artifactId>
</dependency>
+
<dependency>
- <groupId>org.jboss.seam</groupId>
+ <groupId>${seam.groupId}</groupId>
<artifactId>seam-international</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>jsr299-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>webbeans-logger</artifactId>
+ </dependency>
+
</dependencies>
</project>
Modified: modules/trunk/bridge-api/pom.xml
===================================================================
--- modules/trunk/bridge-api/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/bridge-api/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -32,8 +32,7 @@
<dependency>
<groupId>${webbeans.groupId}</groupId>
- <artifactId>webbeans-logging</artifactId>
- <scope>provided</scope> <!-- Assumes use of Web Beans RI -->
+ <artifactId>webbeans-logger</artifactId>
</dependency>
</dependencies>
Modified: modules/trunk/drools/pom.xml
===================================================================
--- modules/trunk/drools/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/drools/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -17,37 +17,41 @@
<dependencies>
<dependency>
- <groupId>${webbeans.groupId}</groupId>
- <artifactId>jsr299-api</artifactId>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>${webbeans.groupId}</groupId>
- <artifactId>webbeans-logging</artifactId>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-compiler</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-core</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>${seam.groupId}</groupId>
<artifactId>seam-el</artifactId>
</dependency>
<dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
+ <groupId>${seam.groupId}</groupId>
+ <artifactId>seam-resources</artifactId>
</dependency>
<dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-core</artifactId>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>jsr299-api</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-compiler</artifactId>
- <scope>provided</scope>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>webbeans-logger</artifactId>
</dependency>
</dependencies>
Modified: modules/trunk/drools/src/main/java/org/jboss/seam/drools/RuleAgent.java
===================================================================
--- modules/trunk/drools/src/main/java/org/jboss/seam/drools/RuleAgent.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/drools/src/main/java/org/jboss/seam/drools/RuleAgent.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -5,12 +5,13 @@
import java.util.Properties;
import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Current;
import javax.enterprise.inject.Initializer;
import javax.enterprise.inject.Produces;
-import org.jboss.seam.drools.util.Resources;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.seam.resources.ResourceLoader;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* Manager component for a rule base loaded from a drools RulesAgent
@@ -18,8 +19,10 @@
@ApplicationScoped
public class RuleAgent
{
- private static final LogProvider log = Logging.getLogProvider(RuleAgent.class);
+ @Logger Log log;
+ @Current ResourceLoader resourceLoader;
+
private org.drools.agent.RuleAgent agent;
private String configurationFile;
@@ -69,7 +72,7 @@
throws IOException
{
if (configurationFile != null) {
- InputStream inputStream = Resources.getResourceAsStream(configurationFile);
+ InputStream inputStream = resourceLoader.getResourceAsStream(configurationFile);
if (inputStream != null) {
try {
properties.load(inputStream);
Modified: modules/trunk/drools/src/main/java/org/jboss/seam/drools/RuleBase.java
===================================================================
--- modules/trunk/drools/src/main/java/org/jboss/seam/drools/RuleBase.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/drools/src/main/java/org/jboss/seam/drools/RuleBase.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -8,16 +8,15 @@
import javax.enterprise.inject.Current;
import javax.enterprise.inject.Initializer;
import javax.enterprise.inject.Produces;
-import javax.servlet.ServletContext;
import org.drools.RuleBaseFactory;
import org.drools.compiler.DroolsError;
import org.drools.compiler.PackageBuilder;
import org.drools.compiler.PackageBuilderConfiguration;
import org.drools.compiler.RuleError;
-import org.jboss.seam.drools.util.Resources;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.seam.resources.ResourceLoader;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* Manager component for a Drools RuleBase
@@ -28,14 +27,14 @@
@ApplicationScoped
public class RuleBase
{
- private static final LogProvider log = Logging.getLogProvider(RuleBase.class);
+ @Logger Log log;
+ @Current ResourceLoader resourceLoader;
+
private String[] ruleFiles;
private String dslFile;
private org.drools.RuleBase ruleBase;
- @Current ServletContext servletContext;
-
@Initializer
public void compileRuleBase() throws Exception
{
@@ -117,6 +116,6 @@
public InputStream getResourceAsStream(String resource)
{
- return Resources.getResourceAsStream( resource, servletContext );
+ return resourceLoader.getResourceAsStream(resource);
}
}
Modified: modules/trunk/el/pom.xml
===================================================================
--- modules/trunk/el/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/el/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -36,19 +36,6 @@
<dependencies>
<dependency>
- <groupId>${webbeans.groupId}</groupId>
- <artifactId>jsr299-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>${webbeans.groupId}</groupId>
- <artifactId>webbeans-logging</artifactId>
- <!-- assumes use of Web Beans impl -->
- <scope>provided</scope>
- </dependency>
-
- <dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<scope>provided</scope>
@@ -64,6 +51,17 @@
<artifactId>seam-beans</artifactId>
</dependency>
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>jsr299-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>webbeans-logger</artifactId>
+ </dependency>
+
</dependencies>
</project>
Deleted: modules/trunk/el/src/main/java/org/jboss/seam/el/SeamFunctionMapper.java
===================================================================
--- modules/trunk/el/src/main/java/org/jboss/seam/el/SeamFunctionMapper.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/el/src/main/java/org/jboss/seam/el/SeamFunctionMapper.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -1,140 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * 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.
- *
- * $Id$
- */
-package org.jboss.seam.el;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.el.FunctionMapper;
-
-import org.jboss.el.lang.ExtendedFunctionMapper;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-//import org.jboss.seam.security.SecurityFunctions;
-
-/**
- * Resolves Seam Security EL functions, s:hasRole() and s:hasPermission()
- * by decorating a delegate Unified EL FunctionMapper
- *
- * @author Shane Bryzak
- */
-public class SeamFunctionMapper extends ExtendedFunctionMapper
-{
- private static Map<String,List<Method>> methodCache = new HashMap<String,List<Method>>();
-
- private static final LogProvider log = Logging.getLogProvider(SeamFunctionMapper.class);
-
- private FunctionMapper functionMapper;
-
- public SeamFunctionMapper(FunctionMapper functionMapper)
- {
- this.functionMapper = functionMapper;
- }
-
- static
- {
- /*
- FIXME where should this class go so that these functions can be loaded?
- cacheMethod("hasPermission", SecurityFunctions.class, "hasPermission",
- new Class[] {String.class, String.class, Object.class});
- cacheMethod("hasPermission", SecurityFunctions.class, "hasPermission",
- new Class[] {Object.class, String.class});
- cacheMethod("hasRole", SecurityFunctions.class, "hasRole",
- new Class[] { String.class });
- */
- }
-
- @Override
- public Method resolveFunction(String prefix, String localName)
- {
- if ( "s".equals(prefix) )
- {
- List<Method> methods = methodCache.get(localName);
- return methods != null ? methods.get(0) : null;
- }
- else if (functionMapper != null)
- {
- return functionMapper.resolveFunction(prefix, localName);
- }
- else
- {
- return null;
- }
- }
-
- @Override
- public Method resolveFunction(String prefix, String localName, int paramCount)
- {
- if ( "s".equals(prefix) )
- {
- List<Method> methods = methodCache.get(localName);
- if (methods != null)
- {
- for (Method m : methods)
- {
- if (m.getParameterTypes().length == paramCount) return m;
- }
- }
-
- return null;
- }
- else if (functionMapper != null)
- {
- return functionMapper.resolveFunction(prefix, localName);
- }
- else
- {
- return null;
- }
- }
-
- private static void cacheMethod(String localName, Class cls, String name, Class[] params)
- {
- try
- {
- Method m = cls.getMethod(name, params);
-
- List<Method> methods;
- if (methodCache.containsKey(localName))
- {
- methods = methodCache.get(localName);
- }
- else
- {
- methods = new ArrayList<Method>();
- methodCache.put(localName, methods);
- }
-
- methods.add(m);
- }
- catch (NoSuchMethodException ex)
- {
- log.warn(String.format("Method %s.%s could not be cached", cls.getName(), name));
- }
- }
-
-}
Modified: modules/trunk/faces/pom.xml
===================================================================
--- modules/trunk/faces/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/faces/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -38,6 +38,30 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
<!-- doesn't inherit from seam-international because scope is provided -->
<dependency>
<groupId>javax.validation</groupId>
@@ -85,35 +109,9 @@
<dependency>
<groupId>${webbeans.groupId}</groupId>
- <artifactId>webbeans-logging</artifactId>
- <!-- assumes use of Web Beans impl -->
- <scope>provided</scope>
+ <artifactId>webbeans-logger</artifactId>
</dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <scope>provided</scope>
- </dependency>
-
</dependencies>
</project>
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/context/FacesContextProducer.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -1,6 +1,7 @@
//$Id: FacesContext.java 5350 2007-06-20 17:53:19Z gavin $
package org.jboss.seam.faces.context;
+import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.Produces;
import javax.faces.context.FacesContext;
@@ -15,6 +16,7 @@
{
public
@Produces
+ @RequestScoped
FacesContext getFacesContext()
{
return FacesContext.getCurrentInstance();
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesMessages.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesMessages.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/international/FacesMessages.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -13,8 +13,8 @@
import org.jboss.seam.international.StatusMessage;
import org.jboss.seam.international.StatusMessages;
import org.jboss.seam.international.StatusMessagesDelegate;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* <p>
@@ -60,7 +60,7 @@
@Faces
class FacesMessages extends StatusMessagesDelegate
{
- private static final LogProvider log = Logging.getLogProvider(FacesMessages.class);
+ @Logger Log log;
private StatusMessages statusMessages;
Modified: modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java
===================================================================
--- modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/faces/src/main/java/org/jboss/seam/faces/resources/FacesResourceLoader.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -12,8 +12,8 @@
import org.jboss.seam.beans.RuntimeSelected;
import org.jboss.seam.beans.RuntimeSelectedBean;
import org.jboss.seam.resources.DefaultResourceLoader;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* Extend the {@link DefaultResourceLoader} in the JSF environment to first
@@ -25,8 +25,7 @@
@RuntimeSelected
class FacesResourceLoader extends DefaultResourceLoader implements RuntimeSelectedBean
{
- private static final LogProvider log = Logging.getLogProvider(FacesResourceLoader.class);
-
+ @Logger Log log;
@Current FacesContext facesContext;
@Current Locale locale;
Modified: modules/trunk/faces/src/test/java/org/jboss/seam/faces/context/FacesContextProducerTest.java
===================================================================
--- modules/trunk/faces/src/test/java/org/jboss/seam/faces/context/FacesContextProducerTest.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/faces/src/test/java/org/jboss/seam/faces/context/FacesContextProducerTest.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -1,5 +1,6 @@
package org.jboss.seam.faces.context;
+import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertSame;
import javax.faces.context.FacesContext;
@@ -36,7 +37,8 @@
assertSame(standaloneProducer.getFacesContext(), actualFacesContext);
FacesContext producedFacesContext = getFacesContextInstance();
- assertSame(producedFacesContext, actualFacesContext);
+ // QUESTION how exactly do we verify that we have the correct object if wrapped in proxy?
+ assertEquals(producedFacesContext.hashCode(), actualFacesContext.hashCode());
assertSame(producedFacesContext.getCurrentPhaseId(), PhaseId.RENDER_RESPONSE);
}
Modified: modules/trunk/faces/src/test/java/org/jboss/seam/faces/international/FacesMessagesTest.java
===================================================================
--- modules/trunk/faces/src/test/java/org/jboss/seam/faces/international/FacesMessagesTest.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/faces/src/test/java/org/jboss/seam/faces/international/FacesMessagesTest.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -29,6 +29,7 @@
import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.webbeans.context.ConversationContext;
import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
+import org.jboss.webbeans.log.LoggerProducer;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.testng.annotations.Test;
@@ -46,8 +47,8 @@
@Artifact(addCurrentPackage = false)
@Classes(
{
- FacesMessages.class, StatusMessages.class, Interpolator.class, Expressions.class, ExpressionsProducer.class,
- LocaleProducer.class, LocaleResolver.class, LocaleResolverProducer.class
+ LoggerProducer.class, FacesMessages.class, StatusMessages.class, Interpolator.class,
+ Expressions.class, ExpressionsProducer.class, LocaleProducer.class, LocaleResolver.class, LocaleResolverProducer.class
})
public class FacesMessagesTest extends AbstractWebBeansTest
{
Modified: modules/trunk/international/pom.xml
===================================================================
--- modules/trunk/international/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/international/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -33,6 +33,18 @@
<dependencies>
<dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>${seam.groupId}</groupId>
<artifactId>seam-bridge-api</artifactId>
</dependency>
@@ -55,23 +67,9 @@
<dependency>
<groupId>${webbeans.groupId}</groupId>
- <artifactId>webbeans-logging</artifactId>
- <!-- assumes use of Web Beans impl -->
- <scope>provided</scope>
+ <artifactId>webbeans-logger</artifactId>
</dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
</dependencies>
</project>
Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/Interpolator.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/Interpolator.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/Interpolator.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -8,8 +8,8 @@
import javax.enterprise.inject.Initializer;
import org.jboss.seam.el.Expressions;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* Interpolates EL expressions in Strings
@@ -18,7 +18,7 @@
*/
public class Interpolator implements Serializable
{
- private static final LogProvider log = Logging.getLogProvider(Interpolator.class);
+ @Logger Log log;
private Expressions expressions;
private Locale locale;
Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/SeamResourceBundleAdapter.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/SeamResourceBundleAdapter.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/SeamResourceBundleAdapter.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -26,7 +26,7 @@
}
catch (MissingResourceException mre)
{
- // superclass will throw MissingResourceException if null is returned
+ // fear not, the superclass will throw MissingResourceException if null is returned
}
return null;
Modified: modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java
===================================================================
--- modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/international/src/main/java/org/jboss/seam/international/StatusMessages.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -43,8 +43,8 @@
import javax.validation.ConstraintViolation;
import org.jboss.seam.international.StatusMessage.Severity;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* <p>{@link StatusMessages} is a technology agnostic repository for holding
@@ -75,7 +75,7 @@
{
private static final long serialVersionUID = -5396789975397138270L;
- private static final LogProvider log = Logging.getLogProvider(StatusMessages.class);
+ @Logger Log log;
private List<StatusMessage> messages = new ArrayList<StatusMessage>();
Modified: modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/AutoInterpolatedMessagesTest.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -14,11 +14,12 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.webbeans.el.WebBeansELResolver;
+import org.jboss.webbeans.log.LoggerProducer;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.testng.annotations.Test;
@Artifact
-(a)Classes({DefaultResourceLoader.class, ResourceLoaderProducer.class, Expressions.class, ExpressionsProducer.class})
+(a)Classes({LoggerProducer.class, DefaultResourceLoader.class, ResourceLoaderProducer.class, Expressions.class, ExpressionsProducer.class})
public class AutoInterpolatedMessagesTest extends AbstractWebBeansTest
{
private boolean elResolverInitialized = false;
@@ -38,7 +39,7 @@
{
ResourceBundle messages = getMessages();
assertEquals(messages.getString("title"), "Hello Seam!");
- assertEquals(messages.getString("thing"), "It's called music");
+ assertEquals(messages.getString("tagline"), "We put the rich in Java EE");
}
private void installWebBeansELResolver()
Modified: modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/InterpolatorTest.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -15,6 +15,7 @@
import org.jboss.seam.el.ExpressionsProducer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.Classes;
+import org.jboss.webbeans.log.LoggerProducer;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.testng.annotations.Test;
@@ -29,7 +30,10 @@
* @see LocaleProducer
*/
@Artifact(addCurrentPackage = false)
-(a)Classes({Interpolator.class, Expressions.class, ExpressionsProducer.class, LocaleProducer.class, LocaleResolver.class, LocaleResolverProducer.class})
+@Classes({
+ LoggerProducer.class, Interpolator.class, Expressions.class, ExpressionsProducer.class,
+ LocaleProducer.class, LocaleResolver.class, LocaleResolverProducer.class
+})
public class InterpolatorTest extends AbstractWebBeansTest
{
private boolean elResolverInitialized = false;
Copied: modules/trunk/international/src/test/java/org/jboss/seam/international/SampleBean.java (from rev 11026, modules/trunk/international/src/test/java/org/jboss/seam/international/Thing.java)
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/SampleBean.java (rev 0)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/SampleBean.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -0,0 +1,18 @@
+package org.jboss.seam.international;
+
+import javax.enterprise.inject.Named;
+
+public
+@Named
+class SampleBean
+{
+ public String getFeature()
+ {
+ return "rich";
+ }
+
+ public String getPlatform()
+ {
+ return "Java EE";
+ }
+}
Modified: modules/trunk/international/src/test/java/org/jboss/seam/international/StatusMessagesTest.java
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/StatusMessagesTest.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/StatusMessagesTest.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -10,6 +10,7 @@
import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.webbeans.context.ConversationContext;
import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
+import org.jboss.webbeans.log.LoggerProducer;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.testng.annotations.Test;
@@ -22,7 +23,7 @@
@Artifact(addCurrentPackage = false)
@Classes(
{
- StatusMessages.class, Interpolator.class, Expressions.class, ExpressionsProducer.class,
+ LoggerProducer.class, StatusMessages.class, Interpolator.class, Expressions.class, ExpressionsProducer.class,
LocaleProducer.class, LocaleResolver.class, LocaleResolverProducer.class, MessagesProducer.class,
DefaultResourceLoader.class, ResourceLoaderProducer.class
})
Deleted: modules/trunk/international/src/test/java/org/jboss/seam/international/Thing.java
===================================================================
--- modules/trunk/international/src/test/java/org/jboss/seam/international/Thing.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/international/src/test/java/org/jboss/seam/international/Thing.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -1,13 +0,0 @@
-package org.jboss.seam.international;
-
-import javax.enterprise.inject.Named;
-
-public
-@Named
-class Thing
-{
- public String getName()
- {
- return "music";
- }
-}
Modified: modules/trunk/international/src/test/resources/messages.properties
===================================================================
--- modules/trunk/international/src/test/resources/messages.properties 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/international/src/test/resources/messages.properties 2009-05-29 18:20:39 UTC (rev 11044)
@@ -1,2 +1,2 @@
title=Hello Seam!
-thing=It's called #{thing.name}
+tagline=We put the #{sampleBean.feature} in #{sampleBean.platform}
Modified: modules/trunk/openwebbeans-bridge/pom.xml
===================================================================
--- modules/trunk/openwebbeans-bridge/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/openwebbeans-bridge/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -36,6 +36,13 @@
<dependencies>
<dependency>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-impl</artifactId>
+ <version>1.0.0-incubating-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>${seam.groupId}</groupId>
<artifactId>seam-bridge-api</artifactId>
</dependency>
@@ -46,13 +53,6 @@
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.apache.openwebbeans</groupId>
- <artifactId>openwebbeans-impl</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
- <scope>provided</scope>
- </dependency>
-
</dependencies>
</project>
Modified: modules/trunk/persistence/pom.xml
===================================================================
--- modules/trunk/persistence/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/persistence/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -15,30 +15,37 @@
<name>Seam Persistence</name>
<dependencies>
+
<dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>jsr299-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-logging</artifactId>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
</dependency>
+
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
- </dependency>
+ </dependency>
+
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</dependency>
+
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
+ <groupId>${seam.groupId}</groupId>
<artifactId>seam-el</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>jsr299-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>webbeans-logger</artifactId>
+ </dependency>
+
</dependencies>
</project>
Modified: modules/trunk/resources/pom.xml
===================================================================
--- modules/trunk/resources/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/resources/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -30,9 +30,7 @@
<dependency>
<groupId>${webbeans.groupId}</groupId>
- <artifactId>webbeans-logging</artifactId>
- <!-- assumes use of Web Beans impl -->
- <scope>provided</scope>
+ <artifactId>webbeans-logger</artifactId>
</dependency>
</dependencies>
Modified: modules/trunk/resources/src/main/java/org/jboss/seam/resources/DefaultResourceLoader.java
===================================================================
--- modules/trunk/resources/src/main/java/org/jboss/seam/resources/DefaultResourceLoader.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/resources/src/main/java/org/jboss/seam/resources/DefaultResourceLoader.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -29,8 +29,8 @@
import java.util.ResourceBundle;
import org.jboss.seam.beans.Default;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* A simple resource loader.
@@ -45,7 +45,7 @@
@Default
class DefaultResourceLoader implements ResourceLoader
{
- private static final LogProvider log = Logging.getLogProvider(DefaultResourceLoader.class);
+ @Logger Log log;
public Class<?> getClassForName(String name)
{
Modified: modules/trunk/resources/src/test/java/org/jboss/seam/resources/DefaultResourceLoaderTest.java
===================================================================
--- modules/trunk/resources/src/test/java/org/jboss/seam/resources/DefaultResourceLoaderTest.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/resources/src/test/java/org/jboss/seam/resources/DefaultResourceLoaderTest.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -7,11 +7,14 @@
import java.net.URL;
import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.Classes;
import org.jboss.testharness.impl.packaging.jsr299.JSR299ArtifactDescriptor;
+import org.jboss.webbeans.log.LoggerProducer;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.testng.annotations.Test;
@Artifact
+(a)Classes(LoggerProducer.class)
public class DefaultResourceLoaderTest extends AbstractWebBeansTest
{
@Test
Modified: modules/trunk/security/pom.xml
===================================================================
--- modules/trunk/security/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/security/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -17,44 +17,45 @@
<dependencies>
<dependency>
- <groupId>${webbeans.groupId}</groupId>
- <artifactId>jsr299-api</artifactId>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>${webbeans.groupId}</groupId>
- <artifactId>webbeans-logging</artifactId>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
<scope>provided</scope>
</dependency>
+ <!-- Is this an acceptable dependency? -->
<dependency>
- <groupId>javax.ejb</groupId>
- <artifactId>ejb-api</artifactId>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <scope>provided</scope>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-core</artifactId>
</dependency>
<dependency>
- <groupId>org.drools</groupId>
- <artifactId>drools-core</artifactId>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
@@ -92,11 +93,16 @@
-->
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate</artifactId>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>jsr299-api</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>webbeans-logger</artifactId>
+ </dependency>
+
</dependencies>
</project>
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/Credentials.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/Credentials.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/Credentials.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -9,29 +9,24 @@
import org.jboss.seam.security.events.CredentialsInitializedEvent;
import org.jboss.seam.security.events.CredentialsUpdatedEvent;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-@Named
+@Named//("org.jboss.seam.security.credentials")
@SessionScoped
public class Credentials implements Serializable
{
private static final long serialVersionUID = -2271248957776488426L;
- public static final String EVENT_INIT_CREDENTIALS = "org.jboss.seam.security.initCredentials";
- public static final String EVENT_CREDENTIALS_UPDATED = "org.jboss.seam.security.credentialsUpdated";
-
- private static final LogProvider log = Logging.getLogProvider(Credentials.class);
-
@Current BeanManager manager;
private String username;
private String password;
- private boolean invalid = false;
+ private boolean invalid;
private boolean initialized;
+ public Credentials() {}
+
public boolean isInitialized()
{
return initialized;
@@ -97,6 +92,7 @@
{
username = null;
password = null;
+ initialized = false;
}
@Override
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/Identity.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/Identity.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/Identity.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -42,8 +42,8 @@
import org.jboss.seam.security.events.QuietLoginEvent;
import org.jboss.seam.security.management.IdentityManager;
import org.jboss.seam.security.permission.PermissionMapper;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* API for authorization and authentication via Seam security.
@@ -60,7 +60,7 @@
public static final String ROLES_GROUP = "Roles";
- private static final LogProvider log = Logging.getLogProvider(Identity.class);
+ @Logger Log log;
@Current private BeanManager manager;
@Current private Credentials credentials;
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/RememberMe.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/RememberMe.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/RememberMe.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -32,52 +32,24 @@
*
* @author Shane Bryzak
*/
-@Named
+@Named//("org.jboss.seam.security.rememberMe")
@SessionScoped
public class RememberMe implements Serializable
{
private static final long serialVersionUID = 2242379431576068199L;
+
+ public enum Mode { disabled, usernameOnly, autoLogin}
- private class DecodedToken
- {
- private String username;
- private String value;
-
- public DecodedToken(String cookieValue)
- {
- if (cookieValue != null)
- {
- try
- {
- String decoded = new String(Base64.decode(cookieValue));
- username = decoded.substring(0, decoded.indexOf(':'));
- value = decoded.substring(decoded.indexOf(':') + 1);
- }
- catch (Exception ex)
- {
- // swallow
- }
- }
- }
-
- public String getUsername()
- {
- return username;
- }
-
- public String getValue()
- {
- return value;
- }
- }
-
+ @Current BeanManager manager;
+ @Current Identity identity;
+ @Current Credentials credentials;
+ @Current IdentityManager identityManager;
+
private ManagedCookie usernameSelector;
private ManagedCookie tokenSelector;
private TokenStore tokenStore;
- @Current BeanManager manager;
-
private boolean enabled;
private int cookieMaxAge = ManagedCookie.DEFAULT_MAX_AGE;
@@ -86,67 +58,13 @@
private Random random = new Random(System.currentTimeMillis());
- public enum Mode { disabled, usernameOnly, autoLogin}
-
private Mode mode = Mode.usernameOnly;
- @Current private Identity identity;
- @Current private Credentials credentials;
- @Current private IdentityManager identityManager;
+ public RememberMe() {}
- public Mode getMode()
- {
- return mode;
- }
-
- public void setMode(Mode mode)
- {
- this.mode = mode;
- }
-
- public boolean isEnabled()
- {
- return enabled;
- }
-
- public void setEnabled(boolean enabled)
- {
- if (this.enabled != enabled)
- {
- this.enabled = enabled;
- // selector is null during component initialization (setup handled in @Create method)
- if (usernameSelector != null && mode.equals(Mode.usernameOnly))
- {
- usernameSelector.setCookieEnabled(enabled);
- }
- // selector is null during component initialization (setup handled in @Create method)
- else if (tokenSelector != null && mode.equals(Mode.autoLogin))
- {
- tokenSelector.setCookieEnabled(enabled);
- }
- }
- }
-
- public int getCookieMaxAge() {
- return cookieMaxAge;
- }
-
- public void setCookieMaxAge(int cookieMaxAge) {
- this.cookieMaxAge = cookieMaxAge;
- }
-
- public TokenStore getTokenStore()
- {
- return tokenStore;
- }
-
- public void setTokenStore(TokenStore tokenStore)
- {
- this.tokenStore = tokenStore;
- }
-
+ public
@Initializer
- public void create()
+ void create()
{
Bean<ManagedCookie> selectorBean = manager.getBeans(ManagedCookie.class).iterator().next();
@@ -169,24 +87,6 @@
}
}
}
-
- protected String generateTokenValue()
- {
- StringBuilder sb = new StringBuilder();
- sb.append(new UID().toString());
- sb.append(":");
- sb.append(random.nextLong());
- return sb.toString();
- }
-
- protected String encodeToken(String username, String value)
- {
- StringBuilder sb = new StringBuilder();
- sb.append(username);
- sb.append(":");
- sb.append(value);
- return Base64.encodeBytes(sb.toString().getBytes());
- }
public void initCredentials(@Observes CredentialsInitializedEvent event)
{
@@ -235,15 +135,7 @@
}
}
}
-
- /**
- * I hate these hacks...
- */
- private class BoolWrapper
- {
- boolean value;
- }
-
+
public void quietLogin(@Observes QuietLoginEvent event)
{
if (mode.equals(Mode.autoLogin) && isEnabled())
@@ -292,14 +184,6 @@
}
}
- public void loggedOut(@Observes LoggedOutEvent event)
- {
- if (mode.equals(Mode.autoLogin))
- {
- tokenSelector.clearCookieValue();
- }
- }
-
public void postAuthenticate(@Observes PostAuthenticateEvent event)
{
if (mode.equals(Mode.usernameOnly))
@@ -339,6 +223,65 @@
}
}
+ public void loggedOut(@Observes LoggedOutEvent event)
+ {
+ if (mode.equals(Mode.autoLogin))
+ {
+ tokenSelector.clearCookieValue();
+ }
+ }
+
+ public Mode getMode()
+ {
+ return mode;
+ }
+
+ public void setMode(Mode mode)
+ {
+ this.mode = mode;
+ }
+
+ public boolean isEnabled()
+ {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled)
+ {
+ if (this.enabled != enabled)
+ {
+ this.enabled = enabled;
+ // selector is null during component initialization (setup handled in @Create method)
+ if (usernameSelector != null && mode.equals(Mode.usernameOnly))
+ {
+ usernameSelector.setCookieEnabled(enabled);
+ }
+ // selector is null during component initialization (setup handled in @Create method)
+ else if (tokenSelector != null && mode.equals(Mode.autoLogin))
+ {
+ tokenSelector.setCookieEnabled(enabled);
+ }
+ }
+ }
+
+ public int getCookieMaxAge() {
+ return cookieMaxAge;
+ }
+
+ public void setCookieMaxAge(int cookieMaxAge) {
+ this.cookieMaxAge = cookieMaxAge;
+ }
+
+ public TokenStore getTokenStore()
+ {
+ return tokenStore;
+ }
+
+ public void setTokenStore(TokenStore tokenStore)
+ {
+ this.tokenStore = tokenStore;
+ }
+
/**
* A flag that an application can use to protect sensitive operations if the user has been
* auto-authenticated.
@@ -348,4 +291,62 @@
return autoLoggedIn;
}
+ protected String generateTokenValue()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.append(new UID().toString());
+ sb.append(":");
+ sb.append(random.nextLong());
+ return sb.toString();
+ }
+
+ protected String encodeToken(String username, String value)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.append(username);
+ sb.append(":");
+ sb.append(value);
+ return Base64.encodeBytes(sb.toString().getBytes());
+ }
+
+ /**
+ * I hate these hacks...
+ */
+ private class BoolWrapper
+ {
+ boolean value;
+ }
+
+ private class DecodedToken
+ {
+ private String username;
+ private String value;
+
+ public DecodedToken(String cookieValue)
+ {
+ if (cookieValue != null)
+ {
+ try
+ {
+ String decoded = new String(Base64.decode(cookieValue));
+ username = decoded.substring(0, decoded.indexOf(':'));
+ value = decoded.substring(decoded.indexOf(':') + 1);
+ }
+ catch (Exception ex)
+ {
+ // intentionally swallow
+ }
+ }
+ }
+
+ public String getUsername()
+ {
+ return username;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+ }
}
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityManager.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityManager.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/management/IdentityManager.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -15,8 +15,8 @@
import org.jboss.seam.security.Identity;
import org.jboss.seam.security.util.Strings;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* Identity Management API, deals with user name/password-based identity management.
@@ -37,14 +37,14 @@
public static final String PERMISSION_UPDATE = "update";
public static final String PERMISSION_DELETE = "delete";
- private static final LogProvider log = Logging.getLogProvider(IdentityManager.class);
+ @Logger Log log;
+ @Current BeanManager manager;
+ @Current Identity identity;
+
private IdentityStore identityStore;
private IdentityStore roleIdentityStore;
- @Current BeanManager manager;
- @Current Identity identity;
-
@Initializer
public void create()
{
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/management/JpaIdentityStore.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -26,8 +26,8 @@
import org.jboss.seam.security.events.PrePersistUserRoleEvent;
import org.jboss.seam.security.events.UserAuthenticatedEvent;
import org.jboss.seam.security.events.UserCreatedEvent;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* The default identity store implementation, uses JPA as its persistence mechanism.
@@ -39,14 +39,14 @@
{
private static final long serialVersionUID = 1171875389743972646L;
- private static final LogProvider log = Logging.getLogProvider(JpaIdentityStore.class);
-
protected FeatureSet featureSet;
+
+ @Logger Log log;
@PersistenceContext EntityManager entityManager;
- JpaIdentityStoreConfig config;
- BeanManager manager;
+ private JpaIdentityStoreConfig config;
+ private BeanManager manager;
public Set<Feature> getFeatures()
{
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/management/LdapIdentityStore.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/management/LdapIdentityStore.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/management/LdapIdentityStore.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -22,8 +22,8 @@
import javax.naming.directory.SearchResult;
import javax.naming.ldap.InitialLdapContext;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* An IdentityStore implementation that integrates with a directory service.
@@ -39,7 +39,7 @@
private static final String LDAP_BOOLEAN_TRUE = "TRUE";
private static final String LDAP_BOOLEAN_FALSE = "FALSE";
- private static final LogProvider log = Logging.getLogProvider(LdapIdentityStore.class);
+ @Logger Log log;
protected FeatureSet featureSet = new FeatureSet();
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/permission/JpaPermissionStore.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -28,8 +28,8 @@
import org.jboss.seam.security.management.JpaIdentityStoreConfig;
import org.jboss.seam.security.permission.PermissionMetadata.ActionSet;
import org.jboss.seam.security.util.AnnotatedBeanProperty;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* A permission store implementation that uses JPA as its persistence mechanism.
@@ -41,7 +41,7 @@
{
private static final long serialVersionUID = 4764590939669047915L;
- private static final LogProvider log = Logging.getLogProvider(JpaPermissionStore.class);
+ @Logger Log log;
private enum Discrimination { user, role, either }
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/permission/PermissionManager.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/permission/PermissionManager.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/permission/PermissionManager.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -7,8 +7,8 @@
import javax.enterprise.inject.Named;
import org.jboss.seam.security.Identity;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* Permission management component, used to grant or revoke permissions on specific objects or of
@@ -25,7 +25,7 @@
public static final String PERMISSION_GRANT = "seam.grant-permission";
public static final String PERMISSION_REVOKE = "seam.revoke-permission";
- private static final LogProvider log = Logging.getLogProvider(PermissionManager.class);
+ @Logger Log log;
@Current PermissionStore permissionStore;
@Current Identity identity;
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/permission/PersistentPermissionResolver.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -12,8 +12,8 @@
import org.jboss.seam.security.Identity;
import org.jboss.seam.security.Role;
import org.jboss.seam.security.SimplePrincipal;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* Resolves dynamically-assigned permissions, mapped to a user or a role, and kept in persistent
@@ -27,7 +27,7 @@
private PermissionStore permissionStore;
- private static final LogProvider log = Logging.getLogProvider(PersistentPermissionResolver.class);
+ @Logger Log log;
@Current BeanManager manager;
@Current Identity identity;
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/permission/RuleBasedPermissionResolver.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -24,8 +24,8 @@
import org.jboss.seam.security.Role;
import org.jboss.seam.security.events.LoggedOutEvent;
import org.jboss.seam.security.events.PostAuthenticateEvent;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
+import org.jboss.webbeans.log.Log;
+import org.jboss.webbeans.log.Logger;
/**
* A permission resolver that uses a Drools rule base to perform permission checks
@@ -37,7 +37,7 @@
{
private static final long serialVersionUID = -7572627522601793024L;
- private static final LogProvider log = Logging.getLogProvider(RuleBasedPermissionResolver.class);
+ @Logger Log log;
private StatefulSession securityContext;
Modified: modules/trunk/transaction/pom.xml
===================================================================
--- modules/trunk/transaction/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/transaction/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -15,34 +15,43 @@
<name>Seam Transaction</name>
<dependencies>
+
<dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>jsr299-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-logging</artifactId>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
</dependency>
+
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
</dependency>
+
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</dependency>
+
<dependency>
- <groupId>javax.ejb</groupId>
- <artifactId>ejb-api</artifactId>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
</dependency>
+
<dependency>
- <groupId>org.jboss.seam</groupId>
+ <groupId>${seam.groupId}</groupId>
<artifactId>seam-el</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>jsr299-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>webbeans-logger</artifactId>
+ </dependency>
+
</dependencies>
</project>
Modified: modules/trunk/web/pom.xml
===================================================================
--- modules/trunk/web/pom.xml 2009-05-29 18:14:11 UTC (rev 11043)
+++ modules/trunk/web/pom.xml 2009-05-29 18:20:39 UTC (rev 11044)
@@ -28,6 +28,11 @@
<dependency>
<groupId>${seam.groupId}</groupId>
+ <artifactId>seam-beans</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${seam.groupId}</groupId>
<artifactId>seam-bridge-api</artifactId>
</dependency>
@@ -39,9 +44,7 @@
<dependency>
<groupId>${webbeans.groupId}</groupId>
- <artifactId>webbeans-logging</artifactId>
- <!-- assumes use of Web Beans impl -->
- <scope>provided</scope>
+ <artifactId>webbeans-logger</artifactId>
</dependency>
</dependencies>
Added: modules/trunk/web/src/main/java/org/jboss/seam/web/SeamListener.java
===================================================================
--- modules/trunk/web/src/main/java/org/jboss/seam/web/SeamListener.java (rev 0)
+++ modules/trunk/web/src/main/java/org/jboss/seam/web/SeamListener.java 2009-05-29 18:20:39 UTC (rev 11044)
@@ -0,0 +1,47 @@
+package org.jboss.seam.web;
+
+import javax.enterprise.inject.AnnotationLiteral;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletRequestEvent;
+import javax.servlet.http.HttpSessionEvent;
+
+import org.jboss.seam.beans.Created;
+import org.jboss.seam.beans.Destroyed;
+import org.jboss.seam.bridge.ManagerBridge;
+import org.jboss.webbeans.servlet.api.ServletListener;
+
+public class SeamListener implements ServletListener
+{
+ public void contextDestroyed(ServletContextEvent event)
+ {
+ }
+
+ public void contextInitialized(ServletContextEvent event)
+ {
+ }
+
+ public void requestDestroyed(ServletRequestEvent event)
+ {
+ }
+
+ public void requestInitialized(ServletRequestEvent event)
+ {
+ }
+
+ public void sessionCreated(HttpSessionEvent event)
+ {
+ getBeanManager().fireEvent(event.getSession(), new AnnotationLiteral<Created>() {});
+ }
+
+ public void sessionDestroyed(HttpSessionEvent event)
+ {
+ getBeanManager().fireEvent(event.getSession(), new AnnotationLiteral<Destroyed>() {});
+ }
+
+ protected BeanManager getBeanManager()
+ {
+ return ManagerBridge.getProvider().getCurrentManager();
+ }
+
+}
15 years, 6 months
Seam SVN: r11043 - in branches/community/Seam_2_1: .settings and 1 other directories.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-05-29 14:14:11 -0400 (Fri, 29 May 2009)
New Revision: 11043
Modified:
branches/community/Seam_2_1/.settings/org.eclipse.jdt.core.prefs
branches/community/Seam_2_1/.settings/org.eclipse.jdt.ui.prefs
branches/community/Seam_2_1/build/default.build.properties
branches/community/Seam_2_1/changelog.txt
Log:
update changelog
Modified: branches/community/Seam_2_1/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/community/Seam_2_1/.settings/org.eclipse.jdt.core.prefs 2009-05-29 18:13:02 UTC (rev 11042)
+++ branches/community/Seam_2_1/.settings/org.eclipse.jdt.core.prefs 2009-05-29 18:14:11 UTC (rev 11043)
@@ -1,13 +1,5 @@
-#Sat Oct 25 15:55:36 BST 2008
+#Mon Apr 20 19:28:12 CDT 2009
eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
@@ -81,26 +73,26 @@
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
@@ -112,17 +104,17 @@
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
@@ -147,20 +139,23 @@
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=3
+org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
@@ -333,6 +328,6 @@
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=3
+org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
Modified: branches/community/Seam_2_1/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- branches/community/Seam_2_1/.settings/org.eclipse.jdt.ui.prefs 2009-05-29 18:13:02 UTC (rev 11042)
+++ branches/community/Seam_2_1/.settings/org.eclipse.jdt.ui.prefs 2009-05-29 18:14:11 UTC (rev 11043)
@@ -1,11 +1,59 @@
-#Mon Oct 20 17:21:22 BST 2008
+#Mon Apr 20 19:28:12 CDT 2009
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=false
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=false
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=org.eclipse.jdt.ui.default.eclipse_clean_up_profile
+cleanup_settings_version=2
eclipse.preferences.version=1
-formatter_profile=_Web Beans
+formatter_profile=_my prefs
formatter_settings_version=11
internal.default.compliance=default
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
org.eclipse.jdt.ui.javadoc=false
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted!
\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" !
deleted\="false" description\="Comment for overriding methods" enabled
\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"></template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new in!
terface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created met!
hod stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.
methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted!
\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" !
deleted\="false" description\="Comment for overriding methods" enabled
\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"></template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new in!
terface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created met!
hod stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.
methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function!
" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoi!
nsert\="true" context\="typecomment_context" deleted\="false" descript
ion\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert!
\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">//!
${todo} Auto-generated catch block\n${exception_var}.printStackTrace(
);</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclips!
e.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
Modified: branches/community/Seam_2_1/build/default.build.properties
===================================================================
--- branches/community/Seam_2_1/build/default.build.properties 2009-05-29 18:13:02 UTC (rev 11042)
+++ branches/community/Seam_2_1/build/default.build.properties 2009-05-29 18:14:11 UTC (rev 11043)
@@ -8,7 +8,7 @@
major.version 2
minor.version .1
patchlevel .2
-qualifier -SNAPSHOT
+qualifier
#
# Other program locations
# -----------------------
Modified: branches/community/Seam_2_1/changelog.txt
===================================================================
--- branches/community/Seam_2_1/changelog.txt 2009-05-29 18:13:02 UTC (rev 11042)
+++ branches/community/Seam_2_1/changelog.txt 2009-05-29 18:14:11 UTC (rev 11043)
@@ -17,7 +17,9 @@
** Task
* [JBSEAM-2232] - Full review of Seam's log levels
+ * [JBSEAM-2399] - Document no-conversation-view-id and conversation-required
* [JBSEAM-3264] - REST requests create anemic HttpSessions
+ * [JBSEAM-3425] - Documentation for clustering
* [JBSEAM-4010] - Document various approaches to Wicket instrumentation
* [JBSEAM-4135] - Upload selenium libs to jboss maven repository
* [JBSEAM-4193] - Document attributes "color" of tag "p:font" and "scaleToFit" of tag "p:image"
15 years, 6 months
Seam SVN: r11042 - tags/JBoss_Seam_2_1_2.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-05-29 14:13:02 -0400 (Fri, 29 May 2009)
New Revision: 11042
Modified:
tags/JBoss_Seam_2_1_2/changelog.txt
Log:
update changelog
Modified: tags/JBoss_Seam_2_1_2/changelog.txt
===================================================================
--- tags/JBoss_Seam_2_1_2/changelog.txt 2009-05-29 17:52:00 UTC (rev 11041)
+++ tags/JBoss_Seam_2_1_2/changelog.txt 2009-05-29 18:13:02 UTC (rev 11042)
@@ -17,7 +17,9 @@
** Task
* [JBSEAM-2232] - Full review of Seam's log levels
+ * [JBSEAM-2399] - Document no-conversation-view-id and conversation-required
* [JBSEAM-3264] - REST requests create anemic HttpSessions
+ * [JBSEAM-3425] - Documentation for clustering
* [JBSEAM-4010] - Document various approaches to Wicket instrumentation
* [JBSEAM-4135] - Upload selenium libs to jboss maven repository
* [JBSEAM-4193] - Document attributes "color" of tag "p:font" and "scaleToFit" of tag "p:image"
15 years, 6 months