JBoss Portal SVN: r5920 - trunk/core/src/main/org/jboss/portal/core/aspects/controller
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2006-12-20 20:12:34 -0500 (Wed, 20 Dec 2006)
New Revision: 5920
Modified:
trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
Log:
minor reformat
Modified: trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2006-12-21 00:03:45 UTC (rev 5919)
+++ trunk/core/src/main/org/jboss/portal/core/aspects/controller/PageCustomizerInterceptor.java 2006-12-21 01:12:34 UTC (rev 5920)
@@ -67,9 +67,11 @@
*/
public class PageCustomizerInterceptor extends ControllerInterceptor
{
+
/** . */
private static final String RESOURCE_PREFIX = "PAGENAME_";
+ /** . */
private PortalAuthorizationManagerFactory portalAuthorizationManagerFactory;
/** Tab order. */
19 years, 4 months
JBoss Portal SVN: r5919 - in trunk: common/src/main/org/jboss/portal/common/util core/src/main/org/jboss/portal/core/impl/model/portal
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2006-12-20 19:03:45 -0500 (Wed, 20 Dec 2006)
New Revision: 5919
Modified:
trunk/common/src/main/org/jboss/portal/common/util/Tools.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java
Log:
destroy related window customization on a setInstanceRef if needed
Modified: trunk/common/src/main/org/jboss/portal/common/util/Tools.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/util/Tools.java 2006-12-20 23:45:01 UTC (rev 5918)
+++ trunk/common/src/main/org/jboss/portal/common/util/Tools.java 2006-12-21 00:03:45 UTC (rev 5919)
@@ -984,4 +984,16 @@
copy[array.length] = o;
return copy;
}
+
+ public static boolean safeEquals(Object o1, Object o2)
+ {
+ if (o1 == null)
+ {
+ return o2 == null;
+ }
+ else
+ {
+ return o1.equals(o2);
+ }
+ }
}
\ No newline at end of file
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java 2006-12-20 23:45:01 UTC (rev 5918)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java 2006-12-21 00:03:45 UTC (rev 5919)
@@ -26,6 +26,7 @@
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.instance.InstanceContainer;
import org.jboss.portal.core.model.instance.Instance;
+import org.jboss.portal.common.util.Tools;
import java.util.HashMap;
@@ -47,6 +48,8 @@
public WindowImpl(boolean hibernate)
{
super(hibernate);
+
+ //
this.instanceRef = null;
}
@@ -57,6 +60,10 @@
public void setInstanceRef(String instanceRef)
{
+ if (Tools.safeEquals(this.instanceRef, instanceRef) == false)
+ {
+ destroyRelatedCustomization();
+ }
this.instanceRef = instanceRef;
}
@@ -75,20 +82,29 @@
protected void destroy()
{
- // Destroy the associated customization
- //
- AbstractPortalObjectContainer container = (AbstractPortalObjectContainer)getObjectNode().getContext().getContainer();
- InstanceContainer instanceContainer = container.getInstanceContainer();
- Instance instance = instanceContainer.getDefinition(instanceRef);
+ destroyRelatedCustomization();
+ }
- //
- if (instance != null)
+ /**
+ * Destroy the associated customization if it is necessary/possible.
+ */
+ private void destroyRelatedCustomization()
+ {
+ if (instanceRef != null)
{
- // That's how we manufacture dash board keys
- String customizationId = getId().toString();
+ AbstractPortalObjectContainer container = (AbstractPortalObjectContainer)getObjectNode().getContext().getContainer();
+ InstanceContainer instanceContainer = container.getInstanceContainer();
+ Instance instance = instanceContainer.getDefinition(instanceRef);
- // Destroy related instance customization
- instance.destroyCustomization(customizationId);
+ //
+ if (instance != null)
+ {
+ // That's how we manufacture dash board keys
+ String customizationId = getId().toString();
+
+ // Destroy related instance customization
+ instance.destroyCustomization(customizationId);
+ }
}
}
}
19 years, 4 months
JBoss Portal SVN: r5918 - in trunk: core/src/main/org/jboss/portal/core/impl/model core/src/main/org/jboss/portal/core/impl/model/instance core/src/main/org/jboss/portal/core/impl/model/portal core/src/main/org/jboss/portal/core/model/instance federation/src/main/org/jboss/portal/federation/impl portlet/src/main/org/jboss/portal/portlet
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2006-12-20 18:45:01 -0500 (Wed, 20 Dec 2006)
New Revision: 5918
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
trunk/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceImpl.java
trunk/core/src/main/org/jboss/portal/core/impl/model/instance/PersistentInstanceContainer.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java
trunk/core/src/main/org/jboss/portal/core/model/instance/Instance.java
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCustomization.java
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceDefinition.java
trunk/federation/src/main/org/jboss/portal/federation/impl/FederatedPortletInvokerService.java
trunk/federation/src/main/org/jboss/portal/federation/impl/FederatingPortletInvokerService.java
trunk/portlet/src/main/org/jboss/portal/portlet/PortletInvoker.java
Log:
dashboard window destruction leads to potential related instance customization destruction
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2006-12-20 22:09:59 UTC (rev 5917)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2006-12-20 23:45:01 UTC (rev 5918)
@@ -130,7 +130,7 @@
if (isDashboard(window, user))
{
// That's how we manufacture dash board keys
- String dashboardId = userId + "." + window.getId();
+ String dashboardId = window.getId().toString();
//
instance = instance.getCustomization(dashboardId);
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceImpl.java 2006-12-20 22:09:59 UTC (rev 5917)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceImpl.java 2006-12-20 23:45:01 UTC (rev 5918)
@@ -36,9 +36,14 @@
import org.jboss.portal.portlet.state.AccessMode;
import org.jboss.portal.portlet.state.PropertyChange;
import org.jboss.portal.portlet.state.PropertyMap;
+import org.jboss.portal.portlet.state.DestroyCloneFailure;
import java.util.Arrays;
import java.util.Set;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -48,6 +53,9 @@
{
/** . */
+ private static final Logger log = Logger.getLogger(InstanceImpl.class);
+
+ /** . */
protected Long key;
/** . */
@@ -273,21 +281,68 @@
public InstanceCustomization getCustomization(String customizationId)
{
+ if (customizationId == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
// Check if we have an instance for this particular customized id
- Session session = containerContext.getCurrentSession();
- Query query = session.createQuery("from InstanceCustomizationImpl where def.key=:defKey and customizationId=:customizationId");
- query.setParameter("defKey", key);
- query.setParameter("customizationId", customizationId);
- query.setCacheable(true);
- InstanceCustomizationImpl customization = (InstanceCustomizationImpl)query.uniqueResult();
+ InstanceCustomizationImpl customization = loadCustomization(customizationId);
+
+ //
if (customization == null)
{
InstanceDefinitionImpl def = getDef();
customization = new InstanceCustomizationImpl(def, customizationId, containerContext, getPortletContext());
}
+
+ //
return customization;
}
+ public void destroyCustomization(String customizationId)
+ {
+ InstanceCustomizationImpl customization = loadCustomization(customizationId);
+
+ //
+ if (customization != null)
+ {
+ try
+ {
+ PortletContext customizationPortletContext = customization.getPortletContext();
+ List toDestroy = Collections.singletonList(customizationPortletContext);
+ PortletInvoker portletInvoker = containerContext.getPortletInvoker();
+
+ //
+ List failures = portletInvoker.destroyClones(toDestroy);
+ if (failures.size() > 0)
+ {
+ for (Iterator i = failures.iterator();i.hasNext();)
+ {
+ DestroyCloneFailure failure = (DestroyCloneFailure)i.next();
+ log.error("Was not able to destroy " + failure.getPortletId() + " for customization " +
+ customizationId + ", reason is : " + failure.getMessage());
+ }
+ }
+ }
+ catch (PortletInvokerException e)
+ {
+ log.error("Could not destroy customization " + customizationId, e);
+ }
+ }
+ }
+
+ private InstanceCustomizationImpl loadCustomization(String customizationId)
+ {
+ // Check if we have an instance for this particular customized id
+ Session session = containerContext.getCurrentSession();
+ Query query = session.createQuery("from InstanceCustomizationImpl where def.key=:defKey and customizationId=:customizationId");
+ query.setParameter("defKey", key);
+ query.setParameter("customizationId", customizationId);
+ query.setCacheable(true);
+ return (InstanceCustomizationImpl)query.uniqueResult();
+ }
+
// ContextObject implementation *************************************************************************************
public void setContext(Object context)
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/instance/PersistentInstanceContainer.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/instance/PersistentInstanceContainer.java 2006-12-20 22:09:59 UTC (rev 5917)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/instance/PersistentInstanceContainer.java 2006-12-20 23:45:01 UTC (rev 5918)
@@ -324,32 +324,32 @@
Session session = ctx.getCurrentSession();
// Lookup instance
- InstanceDefinitionImpl instance = lookup(session, id);
- if (instance == null)
+ InstanceDefinitionImpl definition = lookup(session, id);
+ if (definition == null)
{
throw new NoSuchInstanceException(id);
}
- Set userInstances = instance.getCustomizations();
+ Set customizations = definition.getCustomizations();
// Collect portlet info to destroy for logging purpose
StringBuffer destroyLog = new StringBuffer("About to destroy portlets for instance=").
- append(instance.getInstanceId()).
+ append(definition.getInstanceId()).
append(" [");
//
- List toDestroy = new ArrayList(userInstances.size());
- for (Iterator i = userInstances.iterator(); i.hasNext();)
+ List toDestroy = new ArrayList(customizations.size());
+ for (Iterator i = customizations.iterator(); i.hasNext();)
{
- InstanceCustomizationImpl userInstance = (InstanceCustomizationImpl)i.next();
+ InstanceCustomizationImpl customization = (InstanceCustomizationImpl)i.next();
// Get the user portlet context
- PortletContext userPortletContext = userInstance.getPortletContext();
+ PortletContext customizationPortletContext = customization.getPortletContext();
// Add the portlet context
- toDestroy.add(userPortletContext);
+ toDestroy.add(customizationPortletContext);
//
- destroyLog.append(userPortletContext);
+ destroyLog.append(customizationPortletContext);
if (i.hasNext())
{
destroyLog.append(',');
@@ -357,10 +357,10 @@
}
//
- if (instance.isModifiable())
+ if (definition.isModifiable())
{
// Destroy the state only if it is not a producer offered portlet
- PortletContext sharedPortletContext = instance.getPortletContext();
+ PortletContext sharedPortletContext = definition.getPortletContext();
toDestroy.add(sharedPortletContext);
destroyLog.append(sharedPortletContext);
}
@@ -374,7 +374,7 @@
if (failures.size() > 0)
{
StringBuffer failureLog = new StringBuffer("Some portlet were not properly destroyed for instance=").
- append(instance.getInstanceId()).
+ append(definition.getInstanceId()).
append(" [");
for (Iterator i = failures.iterator(); i.hasNext();)
{
@@ -390,7 +390,7 @@
}
// Destroy the user instances
- for (Iterator i = userInstances.iterator(); i.hasNext();)
+ for (Iterator i = customizations.iterator(); i.hasNext();)
{
InstanceCustomizationImpl userInstance = (InstanceCustomizationImpl)i.next();
i.remove();
@@ -399,8 +399,8 @@
}
// Delete instance
- removeBindings(session, instance);
- session.delete(instance);
+ removeBindings(session, definition);
+ session.delete(definition);
//
session.flush();
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java 2006-12-20 22:09:59 UTC (rev 5917)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java 2006-12-20 23:45:01 UTC (rev 5918)
@@ -76,25 +76,19 @@
protected void destroy()
{
// Destroy the associated customization
- DashboardContext dbctx = getDashboardContext();
- if (dbctx != null)
+ //
+ AbstractPortalObjectContainer container = (AbstractPortalObjectContainer)getObjectNode().getContext().getContainer();
+ InstanceContainer instanceContainer = container.getInstanceContainer();
+ Instance instance = instanceContainer.getDefinition(instanceRef);
+
+ //
+ if (instance != null)
{
- String dashboardId = dbctx.getId();
+ // That's how we manufacture dash board keys
+ String customizationId = getId().toString();
- //
- AbstractPortalObjectContainer container = (AbstractPortalObjectContainer)getObjectNode().getContext().getContainer();
- InstanceContainer instanceContainer = container.getInstanceContainer();
- Instance instance = instanceContainer.getDefinition(instanceRef);
-
- //
- if (instance != null)
- {
- // That's how we manufacture dash board keys
- String customizationId = dashboardId + "." + getId();
-
- //
- Instance customizedInstance = instance.getCustomization(customizationId);
- }
+ // Destroy related instance customization
+ instance.destroyCustomization(customizationId);
}
}
}
Modified: trunk/core/src/main/org/jboss/portal/core/model/instance/Instance.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/instance/Instance.java 2006-12-20 22:09:59 UTC (rev 5917)
+++ trunk/core/src/main/org/jboss/portal/core/model/instance/Instance.java 2006-12-20 23:45:01 UTC (rev 5918)
@@ -94,4 +94,11 @@
* @return an instance customization
*/
InstanceCustomization getCustomization(String customizationId);
+
+ /**
+ * Destroy the customization
+ *
+ * @param customizationId the id of the customization to destroy
+ */
+ void destroyCustomization(String customizationId);
}
Modified: trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCustomization.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCustomization.java 2006-12-20 22:09:59 UTC (rev 5917)
+++ trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCustomization.java 2006-12-20 23:45:01 UTC (rev 5918)
@@ -29,7 +29,11 @@
public interface InstanceCustomization extends Instance
{
- /** Return the identifier in the scope of its definition. */
+ /**
+ * Return the identifier in the scope of its definition which is the customization id.
+ *
+ * @return the id
+ */
String getId();
/**
Modified: trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceDefinition.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceDefinition.java 2006-12-20 22:09:59 UTC (rev 5917)
+++ trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceDefinition.java 2006-12-20 23:45:01 UTC (rev 5918)
@@ -28,7 +28,11 @@
*/
public interface InstanceDefinition extends Instance
{
- /** Return the identifier in the scope of its container. */
+ /**
+ * Return the identifier in the scope of its container.
+ *
+ * @return the instance id
+ */
String getId();
/**
Modified: trunk/federation/src/main/org/jboss/portal/federation/impl/FederatedPortletInvokerService.java
===================================================================
--- trunk/federation/src/main/org/jboss/portal/federation/impl/FederatedPortletInvokerService.java 2006-12-20 22:09:59 UTC (rev 5917)
+++ trunk/federation/src/main/org/jboss/portal/federation/impl/FederatedPortletInvokerService.java 2006-12-20 23:45:01 UTC (rev 5918)
@@ -156,19 +156,19 @@
return reference(cloneContext);
}
- public List destroyClones(List portletIds) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ public List destroyClones(List portletContexts) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
{
- if (portletIds == null)
+ if (portletContexts == null)
{
throw new IllegalArgumentException("Null portlet id list not accepted");
}
- if (portletIds.size() == 0)
+ if (portletContexts.size() == 0)
{
return Collections.EMPTY_LIST;
}
//
- List dereferencedList = new ArrayList(portletIds);
+ List dereferencedList = new ArrayList(portletContexts);
for (int i = 0; i < dereferencedList.size(); i++)
{
PortletContext compoundPortletContext = (PortletContext)dereferencedList.get(i);
@@ -177,7 +177,7 @@
}
//
- List failures = portletInvoker.destroyClones(portletIds);
+ List failures = portletInvoker.destroyClones(dereferencedList);
for (int i = 0; i < failures.size(); i++)
{
DestroyCloneFailure failure = (DestroyCloneFailure)failures.get(i);
Modified: trunk/federation/src/main/org/jboss/portal/federation/impl/FederatingPortletInvokerService.java
===================================================================
--- trunk/federation/src/main/org/jboss/portal/federation/impl/FederatingPortletInvokerService.java 2006-12-20 22:09:59 UTC (rev 5917)
+++ trunk/federation/src/main/org/jboss/portal/federation/impl/FederatingPortletInvokerService.java 2006-12-20 23:45:01 UTC (rev 5918)
@@ -169,22 +169,22 @@
return federated.createClone(compoundPortletContext);
}
- public List destroyClones(List portletIds) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
+ public List destroyClones(List portletContexts) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException
{
- if (portletIds == null)
+ if (portletContexts == null)
{
throw new IllegalArgumentException("No null list accepted");
}
- if (portletIds.size() == 0)
+ if (portletContexts.size() == 0)
{
return Collections.EMPTY_LIST;
}
// Get the invoker and check that we address only one invoker (for now)
FederatedPortletInvoker invoker = null;
- for (int i = 0; i < portletIds.size(); i++)
+ for (int i = 0; i < portletContexts.size(); i++)
{
- String compoundPortletId = (String)portletIds.get(i);
+ PortletContext compoundPortletId = (PortletContext)portletContexts.get(i);
FederatedPortletInvoker federated = getFederatedPortletInvokerFor(compoundPortletId);
if (invoker == null)
{
@@ -197,7 +197,7 @@
}
//
- return invoker.destroyClones(portletIds);
+ return invoker.destroyClones(portletContexts);
}
public PropertyMap getProperties(PortletContext compoundPortletContext, Set keys) throws PortletInvokerException
@@ -235,18 +235,8 @@
}
//
- return getFederatedPortletInvokerFor(compoundPortletContext.getId());
- }
+ String compoundPortletId = compoundPortletContext.getId();
- /**
- * Retrieves the portlet invoker associated with the specified compound portlet id or null if it is not found.
- *
- * @param compoundPortletId the portlet id for which the invoker is to be retrieved
- * @return the portlet invoker associated with the specified compound portlet id
- * @throws IllegalArgumentException if the compound portlet id is not well formed or null
- */
- private FederatedPortletInvoker getFederatedPortletInvokerFor(String compoundPortletId) throws IllegalArgumentException, NoSuchPortletException
- {
//
int pos = compoundPortletId.indexOf(SEPARATOR);
if (pos == -1)
@@ -261,6 +251,8 @@
{
throw new NoSuchPortletException(compoundPortletId);
}
+
+ //
return federated;
}
}
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/PortletInvoker.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/PortletInvoker.java 2006-12-20 22:09:59 UTC (rev 5917)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/PortletInvoker.java 2006-12-20 23:45:01 UTC (rev 5918)
@@ -56,7 +56,7 @@
* Invoke an operation on a specific portlet.
*
* @param invocation the portlet invocation
- * @return the invocatin response
+ * @return the invocation response
* @throws IllegalArgumentException if the invocation is null
*/
PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException;
@@ -76,7 +76,7 @@
* @param portletContexts a list of portlet contexts to destroy
* @return a list of {@link org.jboss.portal.portlet.state.DestroyCloneFailure}, one per clone that couldn't be
* destroyed
- * @throws IllegalArgumentException if the portletId is null
+ * @throws IllegalArgumentException if the portletContext is null
* @throws UnsupportedOperationException if the invoker does not support this operation
*/
List destroyClones(List portletContexts) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException;
@@ -87,7 +87,7 @@
* @param portletContext the portlet context
* @param keys the set of keys to retrieve
* @return the properties
- * @throws IllegalArgumentException if the portletId or the keys arguments are null
+ * @throws IllegalArgumentException if the portletContext or the keys arguments are null
* @throws UnsupportedOperationException if the invoker does not support this operation
*/
PropertyMap getProperties(PortletContext portletContext, Set keys) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException;
@@ -97,7 +97,7 @@
*
* @param portletContext the portlet context
* @return the properties
- * @throws IllegalArgumentException if the portletId is null
+ * @throws IllegalArgumentException if the portletContext is null
* @throws UnsupportedOperationException if the invoker does not support this operation
*/
PropertyMap getProperties(PortletContext portletContext) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException;
@@ -107,7 +107,7 @@
*
* @param portletContext the portlet context
* @param changes the changes
- * @throws IllegalArgumentException if the portletId or the properties is null
+ * @throws IllegalArgumentException if the portletContext or the properties is null
* @throws UnsupportedOperationException if the invoker does not support this operation
*/
PortletContext setProperties(PortletContext portletContext, PropertyChange[] changes) throws IllegalArgumentException, PortletInvokerException, UnsupportedOperationException;
19 years, 4 months
JBoss Portal SVN: r5917 - in trunk: common/src/main/org/jboss/portal/common/util core/src/main/org/jboss/portal/core/portlet/role identity identity/src/main/org/jboss/portal/identity identity/src/main/org/jboss/portal/identity/ldap identity/src/main/org/jboss/portal/test/identity/ldap identity/src/resources/test/config test/src/etc
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2006-12-20 17:09:59 -0500 (Wed, 20 Dec 2006)
New Revision: 5917
Modified:
trunk/common/src/main/org/jboss/portal/common/util/Tools.java
trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java
trunk/identity/build.xml
trunk/identity/src/main/org/jboss/portal/identity/User.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleUserModuleTestCase.java
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPTestCase.java
trunk/identity/src/resources/test/config/opends-config.xml
trunk/identity/src/resources/test/config/profile-config.xml
trunk/test/src/etc/directories.xml
Log:
- few small fixes and updates
Modified: trunk/common/src/main/org/jboss/portal/common/util/Tools.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/util/Tools.java 2006-12-20 22:05:33 UTC (rev 5916)
+++ trunk/common/src/main/org/jboss/portal/common/util/Tools.java 2006-12-20 22:09:59 UTC (rev 5917)
@@ -642,7 +642,7 @@
md.update(text.getBytes());
byte[] encoded = md.digest();
- if ("hex".equals(encoding))
+ if ("HEX".equalsIgnoreCase(encoding))
{
return toHexString(encoded);
}
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java 2006-12-20 22:05:33 UTC (rev 5916)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java 2006-12-20 22:09:59 UTC (rev 5917)
@@ -718,6 +718,11 @@
try
{
role = roleModule.findRoleByName(name);
+ //in case that exception was not thrown
+ if (role == null)
+ {
+ return true;
+ }
}
catch (IllegalArgumentException e)
{
Modified: trunk/identity/build.xml
===================================================================
--- trunk/identity/build.xml 2006-12-20 22:05:33 UTC (rev 5916)
+++ trunk/identity/build.xml 2006-12-20 22:09:59 UTC (rev 5917)
@@ -449,11 +449,11 @@
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.db.DBIdentityTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.UserProtoTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ConfigurationTestCase"/>-->
- <!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleUserModuleTestCase"/>-->
+ <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleUserModuleTestCase"/>
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleRoleModuleTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticGroupMembershipModuleTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticRoleMembershipModuleTestCase"/>-->
- <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPUserProfileModuleTestCase"/>
+ <!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPUserProfileModuleTestCase"/>-->
</x-test>
<x-classpath>
<pathelement location="${build.lib}/portal-identity-lib.jar"/>
Modified: trunk/identity/src/main/org/jboss/portal/identity/User.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/User.java 2006-12-20 22:05:33 UTC (rev 5916)
+++ trunk/identity/src/main/org/jboss/portal/identity/User.java 2006-12-20 22:09:59 UTC (rev 5917)
@@ -23,6 +23,7 @@
package org.jboss.portal.identity;
import org.jboss.portal.identity.ProfileMap;
+import org.jboss.portal.common.p3p.P3PConstants;
import java.util.Date;
import java.util.Locale;
@@ -37,31 +38,31 @@
*/
public interface User
{
- String INFO_USER_NAME_GIVEN = "portal.user.name.given";
- String INFO_USER_NAME_FAMILY = "portal.user.name.family";
- String INFO_USER_LOCATION = "portal.user.location";
- String INFO_USER_OCCUPATION = "portal.user.occupation";
- String INFO_USER_EXTRA = "portal.user.extra";
- String INFO_USER_SIGNATURE = "portal.user.signature";
- String INFO_USER_INTERESTS = "portal.user.interests";
- String INFO_USER_LOCALE = "portal.user.locale";
- String INFO_USER_IM_ICQ = "portal.user.im.icq";
- String INFO_USER_IM_AIM = "portal.user.im.aim";
- String INFO_USER_IM_MSNM = "portal.user.im.msnm";
- String INFO_USER_IM_YIM = "portal.user.im.yim";
- String INFO_USER_IM_SKYPE = "portal.user.im.skype";
- String INFO_USER_HOMEPAGE = "portal.user.homepage";
- String INFO_USER_TIME_ZONE_OFFSET = "portal.user.time-zone-offset";
- String INFO_USER_THEME = "portal.user.theme";
- String INFO_USER_SECURITY_QUESTION = "portal.user.security.question";
- String INFO_USER_SECURITY_ANSWER = "portal.user.security.answer";
- String INFO_USER_EMAIL_FAKE = "portal.user.email.fake";
- String INFO_USER_VIEW_EMAIL_VIEW_REAL = "portal.user.email.view-real";
- String INFO_USER_LAST_LOGIN_DATE = "portal.user.last-login-date";
- String INFO_USER_REGISTRATION_DATE = "portal.user.registration-date";
+ public static final String INFO_USER_NAME_GIVEN = "portal.user.name.given";
+ public static final String INFO_USER_NAME_FAMILY = "portal.user.name.family";
+ public static final String INFO_USER_LOCATION = "portal.user.location";
+ public static final String INFO_USER_OCCUPATION = "portal.user.occupation";
+ public static final String INFO_USER_EXTRA = "portal.user.extra";
+ public static final String INFO_USER_SIGNATURE = "portal.user.signature";
+ public static final String INFO_USER_INTERESTS = "portal.user.interests";
+ public static final String INFO_USER_LOCALE = "portal.user.locale";
+ public static final String INFO_USER_IM_ICQ = "portal.user.im.icq";
+ public static final String INFO_USER_IM_AIM = "portal.user.im.aim";
+ public static final String INFO_USER_IM_MSNM = "portal.user.im.msnm";
+ public static final String INFO_USER_IM_YIM = "portal.user.im.yim";
+ public static final String INFO_USER_IM_SKYPE = "portal.user.im.skype";
+ public static final String INFO_USER_HOMEPAGE = "portal.user.homepage";
+ public static final String INFO_USER_TIME_ZONE_OFFSET = "portal.user.time-zone-offset";
+ public static final String INFO_USER_THEME = "portal.user.theme";
+ public static final String INFO_USER_SECURITY_QUESTION = "portal.user.security.question";
+ public static final String INFO_USER_SECURITY_ANSWER = "portal.user.security.answer";
+ public static final String INFO_USER_EMAIL_FAKE = "portal.user.email.fake";
+ public static final String INFO_USER_VIEW_EMAIL_VIEW_REAL = "portal.user.email.view-real";
+ public static final String INFO_USER_LAST_LOGIN_DATE = "portal.user.last-login-date";
+ public static final String INFO_USER_REGISTRATION_DATE = "portal.user.registration-date";
- String INFO_USER_ENABLED = "portal.user.enabled";
- String INFO_USER_EMAIL_REAL = "portal.user.email.real";
+ public static final String INFO_USER_ENABLED = "portal.user.enabled";
+ public static final String INFO_USER_EMAIL_REAL = P3PConstants.INFO_USER_BUSINESS_INFO_ONLINE_EMAIL;
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2006-12-20 22:05:33 UTC (rev 5916)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2006-12-20 22:09:59 UTC (rev 5917)
@@ -170,21 +170,7 @@
attrs.put(attr);
}
- //TODO:testcase password behaviour
-// String algorithm = getHashAlgorightm();
-// if (algorithm == null)
-// {
-// attrs.put(getPasswordAttributeId(), password);
-// }
-// else
-// {
-// attrs.put(getPasswordAttributeId(), Tools.hashAndEncodeString(password,algorithm, getHashEncoding()));
-// }
-
attrs.put(getPasswordAttributeId(), password);
- //
- //email
- //attrs.put(getEmailAttributeId(), realEmail);
String dn = getUidAttributeID().concat("=").concat(userName);
@@ -195,7 +181,7 @@
// {
// throw new IdentityException("Failed to create user", e);
// }
- catch (NamingException e)
+ catch (Exception e)
{
throw new IdentityException("Failed to create user", e);
}
Modified: trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleUserModuleTestCase.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleUserModuleTestCase.java 2006-12-20 22:05:33 UTC (rev 5916)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPSimpleUserModuleTestCase.java 2006-12-20 22:09:59 UTC (rev 5917)
@@ -25,10 +25,19 @@
import junit.framework.TestSuite;
import org.jboss.portal.identity.UserModule;
import org.jboss.portal.identity.ldap.LDAPUserImpl;
+import org.jboss.portal.identity.ldap.LDAPRoleImpl;
import org.jboss.portal.identity.IdentityServiceControllerImpl;
import org.jboss.portal.identity.IdentityContext;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.identity.MembershipModule;
+import org.jboss.portal.identity.UserProfileModule;
+import org.jboss.portal.identity.Role;
import org.jboss.portal.test.identity.ldap.LDAPTestCase;
+import java.util.Set;
+import java.util.HashSet;
+
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
* @version $Revision: 1.1 $
@@ -45,6 +54,14 @@
UserModule userModule;
+ RoleModule roleModule;
+
+ MembershipModule membershipModule;
+
+ UserProfileModule userProfileModule;
+
+
+
private String suffix;
public void setUp() throws Exception
@@ -80,6 +97,10 @@
controller.start();
identityContext = controller.getIdentityContext();
userModule = (UserModule)identityContext.getObject(IdentityContext.TYPE_USER_MODULE);
+ userModule = (UserModule)identityContext.getObject(IdentityContext.TYPE_USER_MODULE);
+ roleModule = (RoleModule)identityContext.getObject(IdentityContext.TYPE_ROLE_MODULE);
+ membershipModule = (MembershipModule)identityContext.getObject(IdentityContext.TYPE_MEMBERSHIP_MODULE);
+ userProfileModule = (UserProfileModule)identityContext.getObject(IdentityContext.TYPE_USER_PROFILE_MODULE);
suffix = getDirectoryServerConfigParameter().getCleanUpDN();
@@ -88,50 +109,74 @@
}
- public void testFirstSimple() throws Exception
- {
- log.info("test framework works ;]");
- }
+// public void testFirstSimple() throws Exception
+// {
+// log.info("test framework works ;]");
+// }
- public void testFindUserByName() throws Exception
- {
- LDAPUserImpl ldapu = (LDAPUserImpl)userModule.findUserById("jduke");
- assertEquals(ldapu.getDn(), "uid=jduke,ou=People," + suffix);
- assertEquals(ldapu.getUserName(), "jduke");
- }
+// public void testFindUserByName() throws Exception
+// {
+// LDAPUserImpl ldapu = (LDAPUserImpl)userModule.findUserById("jduke");
+// assertEquals(ldapu.getDn(), "uid=jduke,ou=People," + suffix);
+// assertEquals(ldapu.getUserName(), "jduke");
+// }
+//
+// public void testRemoveUser() throws Exception
+// {
+// LDAPUserImpl ldapu = (LDAPUserImpl)userModule.findUserById("jduke");
+// assertNotNull(ldapu);
+// assertEquals(ldapu.getDn(), "uid=jduke,ou=People," + suffix);
+// userModule.removeUser("jduke");
+// ldapu = (LDAPUserImpl)userModule.findUserById("jduke");
+// assertNull(ldapu);
+// }
+//
+// public void testCreateUser() throws Exception
+// {
+// LDAPUserImpl ldapu = (LDAPUserImpl)userModule.createUser("testUser", "testPassword");
+// assertNotNull(ldapu);
+// assertEquals("testUser", ldapu.getUserName());
+//
+// ldapu = (LDAPUserImpl)userModule.findUserById("testUser");
+// assertNotNull(ldapu);
+// userModule.removeUser("testUser");
+//
+// ldapu = (LDAPUserImpl)userModule.findUserById("testUser");
+// assertNull(ldapu);
+//
+// }
+//
+// public void testgetUserCount() throws Exception
+// {
+// LDAPUserImpl ldapu = (LDAPUserImpl)userModule.findUserById("jduke");
+// assertEquals(ldapu.getDn(), "uid=jduke,ou=People," + suffix);
+// assertEquals(ldapu.getUserName(), "jduke");
+//
+// int count = userModule.getUserCount();
+// assertEquals(5, count);
+// }
- public void testRemoveUser() throws Exception
+ public void testPassword() throws Exception
{
- LDAPUserImpl ldapu = (LDAPUserImpl)userModule.findUserById("jduke");
- assertNotNull(ldapu);
- assertEquals(ldapu.getDn(), "uid=jduke,ou=People," + suffix);
- userModule.removeUser("jduke");
- ldapu = (LDAPUserImpl)userModule.findUserById("jduke");
- assertNull(ldapu);
- }
+ userModule.createUser("testUser", "testPassword");
+ User u = userModule.findUserByUserName("testUser");
+ assertNotNull(u);
+ assertEquals("testUser", u.getUserName());
+ assertTrue(u.validatePassword("testPassword"));
- public void testCreateUser() throws Exception
- {
- LDAPUserImpl ldapu = (LDAPUserImpl)userModule.createUser("testUser", "testPassword");
- assertNotNull(ldapu);
- assertEquals("testUser", ldapu.getUserName());
+ Role r = roleModule.createRole("testRole", "testDisplayName");
+ Set a = new HashSet();
+ a.add(r);
+ membershipModule.assignRoles(u, a);
+ assertTrue(u.validatePassword("testPassword"));
- ldapu = (LDAPUserImpl)userModule.findUserById("testUser");
- assertNotNull(ldapu);
- userModule.removeUser("testUser");
+ userProfileModule.setProperty(u, User.INFO_USER_EMAIL_REAL, "testRealEmail");
+ assertTrue(u.validatePassword("testPassword"));
- ldapu = (LDAPUserImpl)userModule.findUserById("testUser");
- assertNull(ldapu);
- }
+// assertTrue(!u.validatePassword("1testPassword1"));
+// u.updatePassword("1testPassword1");
+// assertTrue(u.validatePassword("1testPassword1"));
- public void testgetUserCount() throws Exception
- {
- LDAPUserImpl ldapu = (LDAPUserImpl)userModule.findUserById("jduke");
- assertEquals(ldapu.getDn(), "uid=jduke,ou=People," + suffix);
- assertEquals(ldapu.getUserName(), "jduke");
-
- int count = userModule.getUserCount();
- assertEquals(5, count);
}
}
Modified: trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPTestCase.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPTestCase.java 2006-12-20 22:05:33 UTC (rev 5916)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPTestCase.java 2006-12-20 22:09:59 UTC (rev 5917)
@@ -227,7 +227,7 @@
DirContext org = ctx;
-
+
removeContext(org, removeContext);
}
catch (Exception e)
Modified: trunk/identity/src/resources/test/config/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/opends-config.xml 2006-12-20 22:05:33 UTC (rev 5916)
+++ trunk/identity/src/resources/test/config/opends-config.xml 2006-12-20 22:09:59 UTC (rev 5917)
@@ -106,5 +106,24 @@
<value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
</option-group>
+ <option-group>
+ <group-name>userCreateAttibutes</group-name>
+ <option>
+ <name>objectClass</name>
+ <!--This objectclasses should work with Red Hat Directory-->
+ <value>top</value>
+ <value>person</value>
+ <value>inetOrgPerson</value>
+ </option>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>sn</name>
+ <value>none</value>
+ </option>
+ </option-group>
</options>
</identity-configuration>
\ No newline at end of file
Modified: trunk/identity/src/resources/test/config/profile-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/profile-config.xml 2006-12-20 22:05:33 UTC (rev 5916)
+++ trunk/identity/src/resources/test/config/profile-config.xml 2006-12-20 22:09:59 UTC (rev 5917)
@@ -22,31 +22,45 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
- <!DOCTYPE profile PUBLIC
+ <!--<!DOCTYPE profile PUBLIC
"-//JBoss Portal//DTD JBoss User Profile Configuration 1.0//EN"
- "http://www.jboss.org/portal/dtd/profile-config_1_0.dtd">
+ "http://www.jboss.org/portal/dtd/profile-config_1_0.dtd">-->
<profile>
<!--Database mapping - jbp_user table column mapping-->
<property>
- <name>portal.user.name.given</name>
+ <name>user.name.nickName</name>
<type>java.lang.String</type>
- <access-mode>read-write</access-mode>
+ <access-mode>read-only</access-mode>
<usage>mandatory</usage>
<display-name xml:lang="en">Name</display-name>
<description xml:lang="en">The user name</description>
<mapping>
<database>
<type>column</type>
- <value>jbp_username</value>
+ <value>jbp_uname</value>
</database>
</mapping>
</property>
<property>
- <name>portal.user.name.family</name>
+ <name>user.name.given</name>
<type>java.lang.String</type>
<access-mode>read-write</access-mode>
<usage>mandatory</usage>
+ <display-name xml:lang="en">Given Name</display-name>
+ <description xml:lang="en">The user given name</description>
+ <mapping>
+ <database>
+ <type>column</type>
+ <value>jbp_givenname</value>
+ </database>
+ </mapping>
+ </property>
+ <property>
+ <name>user.name.family</name>
+ <type>java.lang.String</type>
+ <access-mode>read-write</access-mode>
+ <usage>mandatory</usage>
<display-name xml:lang="en">Family name</display-name>
<description xml:lang="en">The user family name</description>
<mapping>
@@ -57,7 +71,7 @@
</mapping>
</property>
<property>
- <name>portal.user.email.real</name>
+ <name>user.business-info.online.email</name>
<type>java.lang.String</type>
<access-mode>read-write</access-mode>
<usage>mandatory</usage>
@@ -188,9 +202,9 @@
<type>dynamic</type>
<value>portal.user.signature</value>
</database>
- <ldap>
+ <!--<ldap>
<value>personalSignature</value>
- </ldap>
+ </ldap>-->
</mapping>
</property>
<property>
@@ -219,9 +233,9 @@
<type>dynamic</type>
<value>portal.user.locale</value>
</database>
- <ldap>
- <value>localityName</value>
- </ldap>
+ <!--<ldap>-->
+ <!--<value>localityName</value>-->
+ <!--</ldap>-->
</mapping>
</property>
<property>
Modified: trunk/test/src/etc/directories.xml
===================================================================
--- trunk/test/src/etc/directories.xml 2006-12-20 22:05:33 UTC (rev 5916)
+++ trunk/test/src/etc/directories.xml 2006-12-20 22:09:59 UTC (rev 5917)
@@ -37,7 +37,7 @@
<!--DN that will be removed to perform cleanup after each test-->
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
</directory>
- <!--<directory>
+ <directory>
<directory-name>RedHatDS</directory-name>
<description>RedHat Directory in QA Labs (need vpn access)</description>
@@ -51,5 +51,5 @@
<populate-ldif>ldap/ldif/initial-tests-qa.ldif</populate-ldif>
<cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
- </directory>-->
+ </directory>
</directories>
19 years, 4 months
JBoss Portal SVN: r5916 - trunk/core/src/resources/portal-core-sar/conf/identity
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2006-12-20 17:05:33 -0500 (Wed, 20 Dec 2006)
New Revision: 5916
Modified:
trunk/core/src/resources/portal-core-sar/conf/identity/identity-config.xml
trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml
trunk/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml
Log:
- update identity configuration files
Modified: trunk/core/src/resources/portal-core-sar/conf/identity/identity-config.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/identity/identity-config.xml 2006-12-20 22:02:51 UTC (rev 5915)
+++ trunk/core/src/resources/portal-core-sar/conf/identity/identity-config.xml 2006-12-20 22:05:33 UTC (rev 5916)
@@ -51,12 +51,7 @@
<!--type used to correctly map in IdentityContext registry-->
<type>UserProfile</type>
<implementation>DELEGATING</implementation>
- <config>
- <option>
- <name>profileConfigFile</name>
- <value>conf/identity/profile-config.xml</value>
- </option>
- </config>
+ <config/>
</module>
<module>
<type>DBDelegateUserProfile</type>
Modified: trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml 2006-12-20 22:02:51 UTC (rev 5915)
+++ trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml 2006-12-20 22:05:33 UTC (rev 5916)
@@ -33,7 +33,7 @@
<config>
<option>
<name>host</name>
- <value>localhost</value>
+ <value>jboss.com</value>
</option>
<option>
<name>port</name>
@@ -45,7 +45,7 @@
</option>
<option>
<name>adminPassword</name>
- <value>password</value>
+ <value>qpq123qpq</value>
</option>
</config>
</datasource>
@@ -67,16 +67,11 @@
<implementation>LDAP</implementation>
<config/>
</module>
-
<module>
<type>UserProfile</type>
<implementation>DELEGATING</implementation>
<config>
<option>
- <name>profileConfigFile</name>
- <value>conf/profile-config.xml</value>
- </option>
- <option>
<name>ldapModuleJNDIName</name>
<value>java:/portal/LDAPUserProfileModule</value>
</option>
@@ -85,7 +80,12 @@
<module>
<type>DBDelegateUserProfile</type>
<implementation>DB</implementation>
- <config/>
+ <config>
+ <option>
+ <name>randomSynchronizePassword</name>
+ <value>true</value>
+ </option>
+ </config>
</module>
<module>
<type>LDAPDelegateUserProfile</type>
@@ -99,12 +99,31 @@
<group-name>common</group-name>
<option>
<name>userContainerDN</name>
- <value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=People,dc=portal26,dc=jboss,dc=com</value>
</option>
<option>
<name>roleContainerDN</name>
- <value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ <value>ou=Roles,dc=portal26,dc=jboss,dc=com</value>
</option>
</option-group>
+ <option-group>
+ <group-name>userCreateAttibutes</group-name>
+ <option>
+ <name>objectClass</name>
+ <!--This objectclasses should work with Red Hat Directory-->
+ <value>top</value>
+ <value>person</value>
+ <value>inetOrgPerson</value>
+ </option>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <option>
+ <name>sn</name>
+ <value>none</value>
+ </option>
+ </option-group>
</options>
</identity-configuration>
\ No newline at end of file
Modified: trunk/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml 2006-12-20 22:02:51 UTC (rev 5915)
+++ trunk/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml 2006-12-20 22:05:33 UTC (rev 5916)
@@ -123,6 +123,10 @@
<name>dbModuleJNDIName</name>
<value>java:/portal/DBUserProfileModule</value>
</option>
+ <option>
+ <name>profileConfigFile</name>
+ <value>conf/identity/profile-config.xml</value>
+ </option>
</config>
</module>
@@ -337,14 +341,6 @@
<value>userPassword</value>
</option>
<option>
- <name>hashAlgorithm</name>
- <value>MD5</value>
- </option>
- <option>
- <name>hashEncoding</name>
- <value>hex</value>
- </option>
- <option>
<name>roleContainerDN</name>
<value>ou=Roles,dc=example,dc=com</value>
</option>
@@ -403,101 +399,5 @@
<value>uid=dummynonexistinguser,ou=People,dc=jboss,dc=org</value>
</option>
</option-group>
- <option-group>
- <group-name>userProfileMappings</group-name>
- <option>
- <name>portal.user.name.given</name>
- <!--inetOrgPerson-->
- <value>givenName</value>
- </option>
- <!--<option>
- <name>portal.user.name.family</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.location</name>
- <value></value>
- </option>-->
- <option>
- <name>portal.user.occupation</name>
- <!--inetOrgPerson-->
- <value>title</value>
- </option>
- <!--<option>
- <name>portal.user.extra</name>
- <value></value>
- </option>-->
- <option>
- <name>portal.user.signature</name>
- <!--newPilotPerson-->
- <value>personalSignature</value>
- </option>
- <!--<option>
- <name>portal.user.interests</name>
- <value></value>
- </option>-->
- <option>
- <name>portal.user.locale</name>
- <!--inetOrgPerson-->
- <value>localityName</value><!--or prefferedLanguage-->
- </option>
- <!--<option>
- <name>portal.user.im.icq</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.im.aim</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.im.msnm</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.im.yim</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.im.skype</name>
- <value></value>
- </option>-->
- <option>
- <name>portal.user.homepage</name>
- <!--inetOrgPerson-->
- <value>seeAlso</value>
- </option>
- <!--<option>
- <name>portal.user.time-zone-offset</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.theme</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.security.question</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.security.answer</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.email.fake</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.email.view-real</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.last-login-date</name>
- <value></value>
- </option>
- <option>
- <name>portal.user.registration-date</name>
- <value></value>
- </option>-->
- </option-group>
</options>
</identity-configuration>
\ No newline at end of file
19 years, 4 months
JBoss Portal SVN: r5915 - in trunk/core/src: main/org/jboss/portal/core/deployment/jboss main/org/jboss/portal/core/impl/model main/org/jboss/portal/core/impl/model/instance main/org/jboss/portal/core/impl/model/portal main/org/jboss/portal/core/management main/org/jboss/portal/core/metadata main/org/jboss/portal/core/model/instance main/org/jboss/portal/core/model/instance/command main/org/jboss/portal/core/portlet/dashboard main/org/jboss/portal/core/portlet/management main/org/jboss/port
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2006-12-20 17:02:51 -0500 (Wed, 20 Dec 2006)
New Revision: 5915
Added:
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/DashboardContext.java
Removed:
trunk/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerListener.java
Modified:
trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
trunk/core/src/main/org/jboss/portal/core/impl/model/instance/PersistentInstanceContainer.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/AbstractPortalObjectContainer.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java
trunk/core/src/main/org/jboss/portal/core/management/PortalImpl.java
trunk/core/src/main/org/jboss/portal/core/metadata/InstancesMetaData.java
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceContainer.java
trunk/core/src/main/org/jboss/portal/core/model/instance/command/InvokePortletInstanceCommand.java
trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/Configurator.java
trunk/core/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java
trunk/core/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
trunk/core/src/main/org/jboss/portal/core/portlet/management/actions/CreateInstanceAction.java
trunk/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java
trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
Log:
- renamed *Instance methods on InstanceContainer to *Definition
- started to implement stuff for per dashboard window -> destroy associated instance customization in instance container
Modified: trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/deployment/jboss/PortletAppDeployment.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -357,7 +357,7 @@
private void handleInstance(InstanceMetaDataContext metaDataCtx) throws PortletInvokerException, SecurityConfigurationException, DuplicateInstanceException
{
InstanceMetaData metaData = metaDataCtx.metaData;
- Instance instance = factory.getInstanceContainer().getInstance(metaData.getId());
+ Instance instance = factory.getInstanceContainer().getDefinition(metaData.getId());
if (instance == null)
{
createInstance(metaData);
@@ -411,7 +411,7 @@
String resolvedRef = resolvePortletRef(metaData.getPortletRef());
// Create the instance
- Instance instance = factory.getInstanceContainer().createInstance(metaData.getId(), resolvedRef);
+ Instance instance = factory.getInstanceContainer().createDefinition(metaData.getId(), resolvedRef);
// Configure
configureInstance(instance, metaData);
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/CustomizationManagerService.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -118,7 +118,7 @@
}
// Get the instance
- Instance instance = instanceContainer.getInstance(instanceId);
+ Instance instance = instanceContainer.getDefinition(instanceId);
if (instance != null)
{
// If we are in the context of an existing user we get a customization for that user
Deleted: trunk/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerListener.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerListener.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerListener.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -1,10 +0,0 @@
-package org.jboss.portal.core.impl.model.instance;
-
-public interface InstanceContainerListener
-{
-
- void portletInstanceCreated(InstanceDefinitionImpl instance);
-
- void portletInstanceDestroyed(InstanceDefinitionImpl instance);
-
-}
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/instance/PersistentInstanceContainer.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/instance/PersistentInstanceContainer.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/instance/PersistentInstanceContainer.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -81,8 +81,6 @@
PermissionRepository, PermissionFactory
{
- private List listeners = new ArrayList();
-
/** . */
protected InterceptorStackFactory stackFactory;
@@ -239,7 +237,7 @@
sessionFactory = null;
}
- public InstanceDefinition getInstance(String id)
+ public InstanceDefinition getDefinition(String id)
{
if (id == null)
{
@@ -249,12 +247,12 @@
return lookup(session, id);
}
- public InstanceDefinition createInstance(String id, String portletId) throws DuplicateInstanceException, IllegalArgumentException, PortletInvokerException
+ public InstanceDefinition createDefinition(String id, String portletId) throws DuplicateInstanceException, IllegalArgumentException, PortletInvokerException
{
- return createInstance(id, portletId, cloneOnCreate);
+ return createDefinition(id, portletId, cloneOnCreate);
}
- public InstanceDefinition createInstance(String id, String portletId, boolean clone) throws DuplicateInstanceException, PortletInvokerException
+ public InstanceDefinition createDefinition(String id, String portletId, boolean clone) throws DuplicateInstanceException, PortletInvokerException
{
if (id == null)
{
@@ -275,7 +273,7 @@
portletInvoker.getPortlet(portletContext);
//
- InstanceDefinitionImpl instance = null;
+ InstanceDefinitionImpl instance;
try
{
// Create the persistent instance which may raise a constraint violation exception if it already exist
@@ -311,13 +309,11 @@
session.update(instance);
}
- raiseCreatedPortletInstanceEvent(instance);
-
//
return instance;
}
- public void destroyInstance(String id) throws PortletInvokerException, NoSuchInstanceException
+ public void destroyDefinition(String id) throws PortletInvokerException, NoSuchInstanceException
{
if (id == null)
{
@@ -408,32 +404,10 @@
//
session.flush();
-
- raiseDestroyedPortletInstanceEvent(instance);
}
- private void raiseCreatedPortletInstanceEvent(InstanceDefinitionImpl instance)
+ public Collection getDefinitions()
{
- Iterator it = listeners.iterator();
- while (it.hasNext())
- {
- InstanceContainerListener listener = (InstanceContainerListener)it.next();
- listener.portletInstanceCreated(instance);
- }
- }
-
- private void raiseDestroyedPortletInstanceEvent(InstanceDefinitionImpl instance)
- {
- Iterator it = listeners.iterator();
- while (it.hasNext())
- {
- InstanceContainerListener listener = (InstanceContainerListener)it.next();
- listener.portletInstanceDestroyed(instance);
- }
- }
-
- public Collection getInstances()
- {
//
PortalAuthorizationManager mgr = portalAuthorizationManagerFactory.getManager();
@@ -687,16 +661,6 @@
return this;
}
- public void addListener(InstanceContainerListener listener)
- {
- listeners.add(listener);
- }
-
- public void removeListener(InstanceContainerListener listener)
- {
- listeners.remove(listener);
- }
-
private void removeBindings(Session session, InstanceDefinitionImpl instance)
{
if (instance.getSecurityBindings() != null)
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/AbstractPortalObjectContainer.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/AbstractPortalObjectContainer.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/AbstractPortalObjectContainer.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -26,6 +26,7 @@
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.PortalObjectPermission;
import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.instance.InstanceContainer;
import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.security.PortalPermission;
import org.jboss.portal.security.PortalPermissionCollection;
@@ -39,7 +40,6 @@
import java.util.Collection;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Set;
/**
@@ -53,6 +53,19 @@
/** . */
private PortalObjectIdImpl rootId = new PortalObjectIdImpl();
+ /** . */
+ private InstanceContainer instanceContainer;
+
+ public InstanceContainer getInstanceContainer()
+ {
+ return instanceContainer;
+ }
+
+ public void setInstanceContainer(InstanceContainer instanceContainer)
+ {
+ this.instanceContainer = instanceContainer;
+ }
+
public PortalObject getRootObject()
{
return getObject(rootId);
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -105,10 +105,4 @@
clone.setDeclaredPropertyMap(new HashMap(getDeclaredPropertyMap()));
return clone;
}
-
- public boolean isDashboard()
- {
- Object b = declaredPropertyMap.get("dashboard");
- return "true".equals(b);
- }
}
Added: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/DashboardContext.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/DashboardContext.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/DashboardContext.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.core.impl.model.portal;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class DashboardContext
+{
+
+ /** . */
+ private final String id;
+
+ public DashboardContext(String id)
+ {
+ this.id = id;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+}
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -155,6 +155,7 @@
throw new IllegalArgumentException("No null name accepted");
}
+ //
log.debug("Removing child of '" + path + "' with name '" + name + "'");
ObjectNode child = (ObjectNode)children.get(name);
if (child == null)
@@ -169,6 +170,9 @@
child.removeChild(childName);
}
+ // Callback
+ child.getObject().destroy();
+
// Let the container destroy it
context.destroyChild(child);
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -48,23 +48,23 @@
// Persistent fields
/** The primary key when the object is persisted */
- protected Long key;
+ private Long key;
/** . */
- protected Map declaredPropertyMap;
+ private Map declaredPropertyMap;
/** . */
- protected String listener;
+ private String listener;
/** The node. */
- protected ObjectNode objectNode;
+ private ObjectNode objectNode;
// Runtime fields
- protected Collection collection;
- protected Map properties;
- protected PortalObjectIdImpl id;
- protected Boolean dashboard;
+ private Collection collection;
+ private Map properties;
+ private PortalObjectIdImpl id;
+ private DashboardContext dashboardContext;
public PortalObjectImpl()
{
@@ -392,21 +392,45 @@
return getChild(portalName);
}
- public boolean isDashboard()
+ public final boolean isDashboard()
{
- if (dashboard == null)
+ return getDashboardContext() != null;
+ }
+
+ /**
+ * Overridable callback.
+ */
+ protected void destroy()
+ {
+ }
+
+ protected final DashboardContext getDashboardContext()
+ {
+ if (dashboardContext == null)
{
- ObjectNode parent = objectNode.getParent();
- if (parent == null)
+ // Get parent object
+ PortalObjectImpl parent = (PortalObjectImpl)getParent();
+
+ // We need the parent to find out the context details
+ if (parent instanceof ContextImpl)
{
- dashboard = Boolean.FALSE;
+ ContextImpl context = (ContextImpl)parent;
+
+ //
+ String dashboard = context.getDeclaredProperty("dashboard");
+ if ("true".equals(dashboard))
+ {
+ String dashboardId = getName();
+ dashboardContext = new DashboardContext(dashboardId);
+ }
}
- else
+ else if (parent != null)
{
- PortalObjectImpl parentObject = parent.getObject();
- dashboard = Boolean.valueOf(parentObject.isDashboard());
+ dashboardContext = parent.getDashboardContext();
}
}
- return dashboard.booleanValue();
+
+ //
+ return dashboardContext;
}
}
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/WindowImpl.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -24,6 +24,8 @@
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.Window;
+import org.jboss.portal.core.model.instance.InstanceContainer;
+import org.jboss.portal.core.model.instance.Instance;
import java.util.HashMap;
@@ -70,4 +72,29 @@
clone.setDeclaredPropertyMap(new HashMap(getDeclaredPropertyMap()));
return clone;
}
+
+ protected void destroy()
+ {
+ // Destroy the associated customization
+ DashboardContext dbctx = getDashboardContext();
+ if (dbctx != null)
+ {
+ String dashboardId = dbctx.getId();
+
+ //
+ AbstractPortalObjectContainer container = (AbstractPortalObjectContainer)getObjectNode().getContext().getContainer();
+ InstanceContainer instanceContainer = container.getInstanceContainer();
+ Instance instance = instanceContainer.getDefinition(instanceRef);
+
+ //
+ if (instance != null)
+ {
+ // That's how we manufacture dash board keys
+ String customizationId = dashboardId + "." + getId();
+
+ //
+ Instance customizedInstance = instance.getCustomization(customizationId);
+ }
+ }
+ }
}
Modified: trunk/core/src/main/org/jboss/portal/core/management/PortalImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/management/PortalImpl.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/management/PortalImpl.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -36,7 +36,7 @@
public int getNbInstances()
{
- return instanceContainer.getInstances().size();
+ return instanceContainer.getDefinitions().size();
}
public void setInstanceContainer(InstanceContainer instanceContainer)
Modified: trunk/core/src/main/org/jboss/portal/core/metadata/InstancesMetaData.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/metadata/InstancesMetaData.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/metadata/InstancesMetaData.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -68,7 +68,7 @@
InstanceMetaData instanceMD = (InstanceMetaData)i.next();
try
{
- container.destroyInstance(instanceMD.getId());
+ container.destroyDefinition(instanceMD.getId());
}
catch (NoSuchInstanceException e)
{
Modified: trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceContainer.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceContainer.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceContainer.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.model.instance;
-import org.jboss.portal.core.impl.model.instance.InstanceContainerListener;
import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.security.spi.provider.AuthorizationDomain;
@@ -51,7 +50,7 @@
* @param id the instance id
* @throws IllegalArgumentException if the instance id is null
*/
- InstanceDefinition getInstance(String id) throws IllegalArgumentException;
+ InstanceDefinition getDefinition(String id) throws IllegalArgumentException;
/**
* Create a new instance of the specified portlet.
@@ -62,7 +61,7 @@
* @throws DuplicateInstanceException if the instance already exist
* @throws IllegalArgumentException if the instance id is null
*/
- InstanceDefinition createInstance(String id, String portletId) throws DuplicateInstanceException, IllegalArgumentException, PortletInvokerException;
+ InstanceDefinition createDefinition(String id, String portletId) throws DuplicateInstanceException, IllegalArgumentException, PortletInvokerException;
/**
* Create a new instance of the specified portlet.
@@ -74,7 +73,7 @@
* @throws DuplicateInstanceException if the instance already exist
* @throws IllegalArgumentException if the instance id is null
*/
- InstanceDefinition createInstance(String id, String portletId, boolean clone) throws DuplicateInstanceException, IllegalArgumentException, PortletInvokerException;
+ InstanceDefinition createDefinition(String id, String portletId, boolean clone) throws DuplicateInstanceException, IllegalArgumentException, PortletInvokerException;
/**
* Destroy the specified instance.
@@ -82,14 +81,14 @@
* @param id
* @throws IllegalArgumentException if the instance id is null
*/
- void destroyInstance(String id) throws NoSuchInstanceException, PortletInvokerException, IllegalArgumentException;
+ void destroyDefinition(String id) throws NoSuchInstanceException, PortletInvokerException, IllegalArgumentException;
/**
* Return all the instances in the container.
*
* @return a collection containing the instances in the container
*/
- Collection getInstances();
+ Collection getDefinitions();
/**
* Return the AuthorizationDomain
@@ -97,8 +96,4 @@
* @return the authorization domain
*/
AuthorizationDomain getAuthorizationDomain();
-
- void addListener(InstanceContainerListener listener);
-
- void removeListener(InstanceContainerListener listener);
}
Modified: trunk/core/src/main/org/jboss/portal/core/model/instance/command/InvokePortletInstanceCommand.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/instance/command/InvokePortletInstanceCommand.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/model/instance/command/InvokePortletInstanceCommand.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -67,7 +67,7 @@
InstanceContainer container = context.getController().getInstanceContainer();
//
- instance = container.getInstance(instanceId);
+ instance = container.getDefinition(instanceId);
if (instance == null)
{
throw new ControllerException("Configurator portlet instance " + instanceId + " not found");
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/Configurator.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/Configurator.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/dashboard/Configurator.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -130,7 +130,7 @@
}
// load insances this user has access to.
- List available_instances = (List)instanceContainer.getInstances();
+ List available_instances = (List)instanceContainer.getDefinitions();
resp.setContentType("text/html");
try
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -179,7 +179,7 @@
{
if (selectedId != null)
{
- return instanceContainer.getInstance(selectedId);
+ return instanceContainer.getDefinition(selectedId);
}
else
{
@@ -218,7 +218,7 @@
public Collection getInstances()
{
List instances = new ArrayList();
- for (Iterator i = instanceContainer.getInstances().iterator(); i.hasNext();)
+ for (Iterator i = instanceContainer.getDefinitions().iterator(); i.hasNext();)
{
Instance instance = (Instance)i.next();
try
@@ -274,7 +274,7 @@
try
{
- instanceContainer.destroyInstance(id);
+ instanceContainer.destroyDefinition(id);
//
if (id.equals(selectedId))
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -422,7 +422,7 @@
public SelectItem[] getInstanceItems()
{
- Collection instances = instanceContainer.getInstances();
+ Collection instances = instanceContainer.getDefinitions();
//sort instances by id
List sortedInstances = new LinkedList();
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/management/actions/CreateInstanceAction.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/management/actions/CreateInstanceAction.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/management/actions/CreateInstanceAction.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -95,7 +95,7 @@
InstanceContainer container = instanceMgr.getInstanceContainer();
try
{
- Instance instance = container.createInstance(instanceId, portlet.getContext().getId());
+ Instance instance = container.createDefinition(instanceId, portlet.getContext().getId());
instanceMgr.setSelectedId(instanceId);
//
Modified: trunk/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/main/org/jboss/portal/test/core/model/instance/InstanceContainerTestCase.java 2006-12-20 22:02:51 UTC (rev 5915)
@@ -325,7 +325,7 @@
});
//
- Instance instance = instanceContainer.createInstance("MyInstance", "MyPortlet", true);
+ Instance instance = instanceContainer.createDefinition("MyInstance", "MyPortlet", true);
assertNotNull(instance);
//
@@ -366,7 +366,7 @@
try
{
TransactionAssert.beginTransaction();
- instanceContainer.createInstance("MyInstance", "UnknownPortlet");
+ instanceContainer.createDefinition("MyInstance", "UnknownPortlet");
fail("Was expecting NoSuchPortletException");
}
catch (NoSuchPortletException expected)
@@ -434,12 +434,12 @@
//
TransactionAssert.beginTransaction();
- instanceContainer.createInstance("MyInstance", popId, cloneInstance);
+ instanceContainer.createDefinition("MyInstance", popId, cloneInstance);
TransactionAssert.commitTransaction();
//
TransactionAssert.beginTransaction();
- InstanceDefinition instanceDef = instanceContainer.getInstance("MyInstance");
+ InstanceDefinition instanceDef = instanceContainer.getDefinition("MyInstance");
Instance instance = instanceDef;
if (identity != null)
{
@@ -493,7 +493,7 @@
// Check state
TransactionAssert.beginTransaction();
- InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getInstance("MyInstance");
+ InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getDefinition("MyInstance");
assertNotNull(instanceImpl);
Set userInstances = instanceImpl.getCustomizations();
assertNotNull(userInstances);
@@ -523,7 +523,7 @@
// Check state
TransactionAssert.beginTransaction();
- InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getInstance("MyInstance");
+ InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getDefinition("MyInstance");
assertNotNull(instanceImpl);
Set userInstances = instanceImpl.getCustomizations();
assertNotNull(userInstances);
@@ -546,7 +546,7 @@
// Check state
TransactionAssert.beginTransaction();
- InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getInstance("MyInstance");
+ InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getDefinition("MyInstance");
assertNotNull(instanceImpl);
Set userInstances = instanceImpl.getCustomizations();
assertNotNull(userInstances);
@@ -581,7 +581,7 @@
// Check state
TransactionAssert.beginTransaction();
- InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getInstance("MyInstance");
+ InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getDefinition("MyInstance");
assertNotNull(instanceImpl);
Set userInstances = instanceImpl.getCustomizations();
assertNotNull(userInstances);
@@ -618,7 +618,7 @@
// Check state
TransactionAssert.beginTransaction();
- InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getInstance("MyInstance");
+ InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getDefinition("MyInstance");
Set userInstances = instanceImpl.getCustomizations();
assertNotNull(userInstances);
assertEquals(0, userInstances.size());
@@ -640,7 +640,7 @@
// Check state
TransactionAssert.beginTransaction();
- InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getInstance("MyInstance");
+ InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getDefinition("MyInstance");
Set userInstances = instanceImpl.getCustomizations();
assertNotNull(userInstances);
assertEquals(0, userInstances.size());
@@ -662,7 +662,7 @@
// Check state
TransactionAssert.beginTransaction();
- InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getInstance("MyInstance");
+ InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getDefinition("MyInstance");
Set userInstances = instanceImpl.getCustomizations();
assertNotNull(userInstances);
assertEquals(0, userInstances.size());
@@ -684,7 +684,7 @@
// Check state
TransactionAssert.beginTransaction();
- InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getInstance("MyInstance");
+ InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getDefinition("MyInstance");
Set userInstances = instanceImpl.getCustomizations();
assertNotNull(userInstances);
assertEquals(0, userInstances.size());
@@ -704,12 +704,12 @@
// Create the instance
TransactionAssert.beginTransaction();
- instanceContainer.createInstance("MyInstance", "MyPortlet", true);
+ instanceContainer.createDefinition("MyInstance", "MyPortlet", true);
TransactionAssert.commitTransaction();
// Create a clone for a user
TransactionAssert.beginTransaction();
- Instance instance = instanceContainer.getInstance("MyInstance").getCustomization("julien");
+ Instance instance = instanceContainer.getDefinition("MyInstance").getCustomization("julien");
PortletInvocation action = new ActionInvocation(new ActionContextImpl(Mode.VIEW));
action.setUserContext(new UserContextImpl("julien"));
instance.invoke(action);
@@ -717,7 +717,7 @@
//
TransactionAssert.beginTransaction();
- InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getInstance("MyInstance");
+ InstanceDefinitionImpl instanceImpl = (InstanceDefinitionImpl)instanceContainer.getDefinition("MyInstance");
PortletContext sharedPortletContext = instanceImpl.getPortletContext();
assertNotNull(producer.getPortlet(sharedPortletContext));
assertNotNull(instance);
@@ -732,7 +732,7 @@
//
TransactionAssert.beginTransaction();
- instanceContainer.destroyInstance("MyInstance");
+ instanceContainer.destroyDefinition("MyInstance");
TransactionAssert.commitTransaction();
//
@@ -764,24 +764,24 @@
portletContainer.addPortlet("MyPortlet", new TestPortletSupport());
TransactionAssert.beginTransaction();
- instanceContainer.createInstance("MyInstance", "MyPortlet");
+ instanceContainer.createDefinition("MyInstance", "MyPortlet");
TransactionAssert.commitTransaction();
//
TransactionAssert.beginTransaction();
- Instance instance = instanceContainer.getInstance("MyInstance");
+ Instance instance = instanceContainer.getDefinition("MyInstance");
assertNotNull(instance);
TransactionAssert.commitTransaction();
//
TransactionAssert.beginTransaction();
- instanceContainer.destroyInstance("MyInstance");
- instanceContainer.createInstance("MyInstance", "MyPortlet");
+ instanceContainer.destroyDefinition("MyInstance");
+ instanceContainer.createDefinition("MyInstance", "MyPortlet");
TransactionAssert.commitTransaction();
//
TransactionAssert.beginTransaction();
- instance = instanceContainer.getInstance("MyInstance");
+ instance = instanceContainer.getDefinition("MyInstance");
assertNotNull(instance);
TransactionAssert.commitTransaction();
}
Modified: trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2006-12-20 21:40:00 UTC (rev 5914)
+++ trunk/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2006-12-20 22:02:51 UTC (rev 5915)
@@ -592,11 +592,14 @@
<depends
optional-attribute-name="AuthorizationDomainRegistry"
proxy-type="attribute">portal:service=AuthorizationDomainRegistry</depends>
+ <depends
+ optional-attribute-name="InstanceContainer"
+ proxy-type="attribute">portal:container=Instance</depends>
<attribute name="SessionFactoryJNDIName">java:/portal/PortalObjectSessionFactory</attribute>
<attribute name="CacheNaturalId">true</attribute>
</mbean>
- <!-- Customization maanger -->
+ <!-- Customization manager -->
<mbean
code="org.jboss.portal.core.impl.model.CustomizationManagerService"
name="portal:service=CustomizationManager"
19 years, 4 months
JBoss Portal SVN: r5914 - trunk/core/src/resources/portal-core-sar/conf/identity
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2006-12-20 16:40:00 -0500 (Wed, 20 Dec 2006)
New Revision: 5914
Modified:
trunk/core/src/resources/portal-core-sar/conf/identity/profile-config.xml
Log:
- update of profile mappings
Modified: trunk/core/src/resources/portal-core-sar/conf/identity/profile-config.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/identity/profile-config.xml 2006-12-20 20:28:24 UTC (rev 5913)
+++ trunk/core/src/resources/portal-core-sar/conf/identity/profile-config.xml 2006-12-20 21:40:00 UTC (rev 5914)
@@ -202,9 +202,9 @@
<type>dynamic</type>
<value>portal.user.signature</value>
</database>
- <ldap>
+ <!--<ldap>
<value>personalSignature</value>
- </ldap>
+ </ldap>-->
</mapping>
</property>
<property>
@@ -233,9 +233,9 @@
<type>dynamic</type>
<value>portal.user.locale</value>
</database>
- <ldap>
- <value>localityName</value>
- </ldap>
+ <!--<ldap>-->
+ <!--<value>localityName</value>-->
+ <!--</ldap>-->
</mapping>
</property>
<property>
19 years, 4 months
JBoss Portal SVN: r5913 - in trunk/core/src: main/org/jboss/portal/core/impl/model/portal main/org/jboss/portal/core/model/portal main/org/jboss/portal/core/model/portal/command resources/portal-core-sar/conf/data
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2006-12-20 15:28:24 -0500 (Wed, 20 Dec 2006)
New Revision: 5913
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/AbstractPortalObjectContainer.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java
trunk/core/src/main/org/jboss/portal/core/model/portal/command/PortalObjectCommand.java
trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml
Log:
slightly different approach for the dashboard state in portal objects : the dashboard is a property of an object (context) and implies the navigation permission implicitely.
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/AbstractPortalObjectContainer.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/AbstractPortalObjectContainer.java 2006-12-20 19:27:01 UTC (rev 5912)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/AbstractPortalObjectContainer.java 2006-12-20 20:28:24 UTC (rev 5913)
@@ -31,7 +31,6 @@
import org.jboss.portal.security.PortalPermissionCollection;
import org.jboss.portal.security.PortalSecurityException;
import org.jboss.portal.security.RoleSecurityBinding;
-import org.jboss.portal.security.SecurityConstants;
import org.jboss.portal.security.spi.provider.AuthorizationDomain;
import org.jboss.portal.security.spi.provider.DomainConfigurator;
import org.jboss.portal.security.spi.provider.PermissionFactory;
@@ -123,14 +122,10 @@
ObjectNode on = getObjectNode(id);
if (on != null)
{
- for (Iterator i = on.getBindings().iterator(); i.hasNext();)
+ RoleSecurityBinding binding = on.getBinding(roleName);
+ if (binding != null)
{
- RoleSecurityBinding binding = (RoleSecurityBinding)i.next();
- String constraintRoleName = binding.getRoleName();
- if (constraintRoleName.equals(roleName) || SecurityConstants.UNCHECKED_ROLE_NAME.equals(constraintRoleName))
- {
- return createPermission(uri, binding.getActions());
- }
+ return createPermission(uri, binding.getActions());
}
}
return null;
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java 2006-12-20 19:27:01 UTC (rev 5912)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ContextImpl.java 2006-12-20 20:28:24 UTC (rev 5913)
@@ -105,4 +105,10 @@
clone.setDeclaredPropertyMap(new HashMap(getDeclaredPropertyMap()));
return clone;
}
+
+ public boolean isDashboard()
+ {
+ Object b = declaredPropertyMap.get("dashboard");
+ return "true".equals(b);
+ }
}
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2006-12-20 19:27:01 UTC (rev 5912)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2006-12-20 20:28:24 UTC (rev 5913)
@@ -34,6 +34,7 @@
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
+import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -285,9 +286,49 @@
for (Iterator i = securityConstraints.values().iterator(); i.hasNext();)
{
ObjectNodeSecurityConstraint onsc = (ObjectNodeSecurityConstraint)i.next();
- RoleSecurityBinding sc = new RoleSecurityBinding(onsc.getActions(), onsc.getRole());
+ Set actions = onsc.getActions();
+ RoleSecurityBinding sc = new RoleSecurityBinding(actions, onsc.getRole());
bindings.add(sc);
}
return bindings;
}
+
+ public RoleSecurityBinding getBinding(String roleName)
+ {
+ Set actions = null;
+ for (Iterator i = securityConstraints.values().iterator(); i.hasNext();)
+ {
+ ObjectNodeSecurityConstraint onsc = (ObjectNodeSecurityConstraint)i.next();
+ if (onsc.getRole().equals(roleName))
+ {
+ actions = onsc.getActions();
+ break;
+ }
+ }
+
+ //
+ String dashboard = object.getDeclaredProperty("dashboard");
+ if ("true".equals(dashboard))
+ {
+ if (actions == null)
+ {
+ actions = Collections.singleton("dashboard");
+ }
+ else
+ {
+ actions = new HashSet(actions);
+ actions.add("dashboard");
+ }
+ }
+
+ // Add the dashboard permission
+ if (actions != null)
+ {
+ return new RoleSecurityBinding(actions, roleName);
+ }
+ else
+ {
+ return null;
+ }
+ }
}
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2006-12-20 19:27:01 UTC (rev 5912)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2006-12-20 20:28:24 UTC (rev 5913)
@@ -64,6 +64,7 @@
protected Collection collection;
protected Map properties;
protected PortalObjectIdImpl id;
+ protected Boolean dashboard;
public PortalObjectImpl()
{
@@ -390,4 +391,22 @@
}
return getChild(portalName);
}
+
+ public boolean isDashboard()
+ {
+ if (dashboard == null)
+ {
+ ObjectNode parent = objectNode.getParent();
+ if (parent == null)
+ {
+ dashboard = Boolean.FALSE;
+ }
+ else
+ {
+ PortalObjectImpl parentObject = parent.getObject();
+ dashboard = Boolean.valueOf(parentObject.isDashboard());
+ }
+ }
+ return dashboard.booleanValue();
+ }
}
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java 2006-12-20 19:27:01 UTC (rev 5912)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObject.java 2006-12-20 20:28:24 UTC (rev 5913)
@@ -166,4 +166,11 @@
* @return a map of the properties declared by the object
*/
Map getDeclaredProperties();
+
+ /**
+ * Return true if the portal object is part of a dashboard.
+ *
+ * @return if it is a dashboard
+ */
+ boolean isDashboard();
}
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/command/PortalObjectCommand.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/command/PortalObjectCommand.java 2006-12-20 19:27:01 UTC (rev 5912)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/command/PortalObjectCommand.java 2006-12-20 20:28:24 UTC (rev 5913)
@@ -101,6 +101,11 @@
return target;
}
+ /**
+ * Return true if the command is in a dashboard context.
+ *
+ * @return
+ */
public boolean isDashboard()
{
if (dashboard == null)
Modified: trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml
===================================================================
--- trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml 2006-12-20 19:27:01 UTC (rev 5912)
+++ trunk/core/src/resources/portal-core-sar/conf/data/default-object.xml 2006-12-20 20:28:24 UTC (rev 5913)
@@ -193,23 +193,22 @@
<name>layout.strategyId</name>
<value>maximizedRegion</value>
</property>
+ <!--
+ | Set the dashboard property
+ -->
+ <property>
+ <name>dashboard</name>
+ <value>true</value>
+ </property>
</properties>
- <supported-modes>
- <mode>view</mode>
- <mode>edit</mode>
- <mode>help</mode>
- </supported-modes>
- <supported-window-states>
- <window-state>normal</window-state>
- <window-state>minimized</window-state>
- <window-state>maximized</window-state>
- </supported-window-states>
+<!--
<security-constraint>
<policy-permission>
<role-name>Authenticated</role-name>
- <action-name>dashboard</action-name>
+ <action-name>view</action-name>
</policy-permission>
</security-constraint>
+-->
</context>
</deployment>
<deployment>
19 years, 4 months
JBoss Portal SVN: r5912 - trunk/identity/src/main/org/jboss/portal/identity
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2006-12-20 14:27:01 -0500 (Wed, 20 Dec 2006)
New Revision: 5912
Modified:
trunk/identity/src/main/org/jboss/portal/identity/DelegatingUserProfileModuleImpl.java
Log:
- more verbose exeption message
Modified: trunk/identity/src/main/org/jboss/portal/identity/DelegatingUserProfileModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/DelegatingUserProfileModuleImpl.java 2006-12-20 19:25:16 UTC (rev 5911)
+++ trunk/identity/src/main/org/jboss/portal/identity/DelegatingUserProfileModuleImpl.java 2006-12-20 19:27:01 UTC (rev 5912)
@@ -105,7 +105,7 @@
}
catch (Exception e)
{
- throw new IdentityException("Cannot resolve property: ", e);
+ throw new IdentityException("Cannot resolve property: " + propertyName, e);
}
}
@@ -149,7 +149,7 @@
}
catch (Exception e)
{
- throw new IdentityException("Cannot resolve property: ", e);
+ throw new IdentityException("Cannot resolve property: " + name, e);
}
}
@@ -173,7 +173,7 @@
}
catch (Exception e)
{
- throw new IdentityException("Cannot resolve property: ", e);
+ throw new IdentityException("Cannot resolve properties: ", e);
}
}
19 years, 4 months
JBoss Portal SVN: r5911 - trunk/identity/src/main/org/jboss/portal/identity
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2006-12-20 14:25:16 -0500 (Wed, 20 Dec 2006)
New Revision: 5911
Modified:
trunk/identity/src/main/org/jboss/portal/identity/MembershipModule.java
Log:
- remove @depreciated tag from method
Modified: trunk/identity/src/main/org/jboss/portal/identity/MembershipModule.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/MembershipModule.java 2006-12-20 14:59:52 UTC (rev 5910)
+++ trunk/identity/src/main/org/jboss/portal/identity/MembershipModule.java 2006-12-20 19:25:16 UTC (rev 5911)
@@ -76,7 +76,6 @@
* @param roleName
* @param offset
* @param limit
- * @deprecated
*/
Set findRoleMembers(String roleName, int offset, int limit, String userNameFilter) throws IdentityException, IllegalArgumentException;
}
19 years, 4 months