JBoss Portal SVN: r6253 - trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-13 11:30:08 -0500 (Tue, 13 Feb 2007)
New Revision: 6253
Modified:
trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp
Log:
TinyMCE won't filter <style> anymore.
It was used in the default content index.html so this fixes: JBPORTAL-1227
Modified: trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp
===================================================================
--- trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp 2007-02-13 15:51:43 UTC (rev 6252)
+++ trunk/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/edit.jsp 2007-02-13 16:30:08 UTC (rev 6253)
@@ -35,7 +35,7 @@
plugin_insertdate_timeFormat : "%H:%M:%S",
relative_urls : "false",
document_base_url : "<%= sDocBase %>",
- extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],font[face|size|color],hr[class|width|size|noshade]"
+ extended_valid_elements : "style[type],a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],font[face|size|color],hr[class|width|size|noshade]"
});
</script>
<!-- /tinyMCE -->
19 years, 2 months
JBoss Portal SVN: r6252 - in trunk/core/src: resources/portal-core-war/WEB-INF/jsp/management/plugins and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-13 10:51:43 -0500 (Tue, 13 Feb 2007)
New Revision: 6252
Modified:
trunk/core/src/main/org/jboss/portal/core/portlet/management/AbstractAuthorizationBean.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/PortletManagerBean.java
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/plugins/security.xhtml
Log:
JBPORTAL-1207 : Management portlet shows the role name instead of the role displayname
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/management/AbstractAuthorizationBean.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/management/AbstractAuthorizationBean.java 2007-02-13 15:16:40 UTC (rev 6251)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/management/AbstractAuthorizationBean.java 2007-02-13 15:51:43 UTC (rev 6252)
@@ -25,8 +25,12 @@
import org.jboss.portal.common.util.Tools;
import org.jboss.portal.faces.el.PropertyAccessor;
import org.jboss.portal.security.RoleSecurityBinding;
+import org.jboss.portal.security.SecurityConstants;
import org.jboss.portal.security.spi.provider.DomainConfigurator;
import org.jboss.portal.security.spi.provider.SecurityConfigurationException;
+import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.IdentityException;
import javax.faces.model.SelectItem;
import java.util.HashMap;
@@ -34,6 +38,9 @@
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -42,11 +49,6 @@
public abstract class AbstractAuthorizationBean
{
- public DomainConfigurator getDomainConfigurator()
- {
- throw new UnsupportedOperationException("Implement me");
- }
-
public PropertyAccessor getForRole()
{
return new PropertyAccessor()
@@ -126,13 +128,14 @@
}
}
- /** Return the roles. */
public String[] getRoles()
{
+ SortedSet roleNames = new TreeSet();
+
+ // Get role names from URI
String uri = getURI();
if (uri != null)
{
- Set roleNames = new HashSet();
Set constraints = getDomainConfigurator().getSecurityBindings(uri);
if (constraints != null)
{
@@ -142,14 +145,54 @@
roleNames.add(binding.getRoleName());
}
}
- return (String[])roleNames.toArray(new String[roleNames.size()]);
}
- else
+
+ // Get other roles from role module
+ try
{
- return null;
+ roleNames.add(SecurityConstants.UNCHECKED_ROLE_NAME);
+ for (Iterator i = getRoleModule().findRoles().iterator(); i.hasNext();)
+ {
+ Role role = (Role)i.next();
+ roleNames.add(role.getName());
+ }
}
+ catch (IdentityException e)
+ {
+ e.printStackTrace();
+ }
+
+ //
+ return (String[])roleNames.toArray(new String[roleNames.size()]);
}
+ public Map getRoleDisplayNameMap()
+ {
+ try
+ {
+ Map map = new HashMap();
+ for (Iterator i = getRoleModule().findRoles().iterator();i.hasNext();)
+ {
+ Role role = (Role)i.next();
+ String displayName = role.getDisplayName();
+ if (displayName != null)
+ {
+ String name = role.getName();
+ map.put(name, displayName);
+ }
+ }
+ return map;
+ }
+ catch (IdentityException e)
+ {
+ return Collections.EMPTY_MAP;
+ }
+ }
+
+ public abstract RoleModule getRoleModule();
+
+ public abstract DomainConfigurator getDomainConfigurator();
+
public abstract SelectItem[] getAvailableActions();
protected abstract String getURI();
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 2007-02-13 15:16:40 UTC (rev 6251)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/management/InstanceManagerBean.java 2007-02-13 15:51:43 UTC (rev 6252)
@@ -440,29 +440,9 @@
}
}
-
- public String[] getRoles()
+ public RoleModule getRoleModule()
{
- String[] roles = super.getRoles();
- if (roles != null)
- {
- try
- {
- Set tmp = Tools.toSet(roles);
- tmp.add(SecurityConstants.UNCHECKED_ROLE_NAME);
- for (Iterator i = getRoleModule().findRoles().iterator(); i.hasNext();)
- {
- Role role = (Role)i.next();
- tmp.add(role.getName());
- }
- roles = (String[])tmp.toArray(new String[tmp.size()]);
- }
- catch (IdentityException e)
- {
- e.printStackTrace();
- }
- }
- return roles;
+ return roleModule;
}
public SelectItem[] getAvailableActions()
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 2007-02-13 15:16:40 UTC (rev 6251)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-13 15:51:43 UTC (rev 6252)
@@ -846,31 +846,6 @@
}
}
-
- public String[] getRoles()
- {
- String[] roles = super.getRoles();
- if (roles != null)
- {
- try
- {
- Set tmp = Tools.toSet(roles);
- tmp.add(SecurityConstants.UNCHECKED_ROLE_NAME);
- for (Iterator i = getRoleModule().findRoles().iterator(); i.hasNext();)
- {
- Role role = (Role)i.next();
- tmp.add(role.getName());
- }
- roles = (String[])tmp.toArray(new String[tmp.size()]);
- }
- catch (IdentityException e)
- {
- e.printStackTrace();
- }
- }
- return roles;
- }
-
public SelectItem[] getAvailableActions()
{
return new SelectItem[]{
@@ -881,6 +856,11 @@
new SelectItem("dashboard"),
};
}
+
+ public RoleModule getRoleModule()
+ {
+ return roleModule;
+ }
}
public final class ThemeBean
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java 2007-02-13 15:16:40 UTC (rev 6251)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/management/PortletManagerBean.java 2007-02-13 15:51:43 UTC (rev 6252)
@@ -431,30 +431,16 @@
}
}
- public String[] getRoles()
+ public RoleModule getRoleModule()
{
- String[] roles = super.getRoles();
- if (roles != null)
- {
- try
- {
- Set tmp = Tools.toSet(roles);
- tmp.add(SecurityConstants.UNCHECKED_ROLE_NAME);
- for (Iterator i = getRoleModule().findRoles().iterator(); i.hasNext();)
- {
- Role role = (Role)i.next();
- tmp.add(role.getName());
- }
- roles = (String[])tmp.toArray(new String[tmp.size()]);
- }
- catch (IdentityException e)
- {
- e.printStackTrace();
- }
- }
- return roles;
+ return roleModule;
}
+ public DomainConfigurator getDomainConfigurator()
+ {
+ return PortletManagerBean.this.getDomainConfigurator();
+ }
+
public SelectItem[] getAvailableActions()
{
return new SelectItem[]{
Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/plugins/security.xhtml
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/plugins/security.xhtml 2007-02-13 15:16:40 UTC (rev 6251)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/plugins/security.xhtml 2007-02-13 15:51:43 UTC (rev 6252)
@@ -18,7 +18,7 @@
<f:facet name="header">
<h:outputText value="Role"/>
</f:facet>
- <h:outputText value="#{role == '__unchecked__' ? 'Unchecked' : role}"/>
+ <h:outputText value="#{role == '__unchecked__' ? 'Unchecked' : (auth.roleDisplayNameMap[role] != null ? auth.roleDisplayNameMap[role] : role)}"/>
</h:column>
<h:column
id="actions_column">
19 years, 2 months
JBoss Portal SVN: r6251 - trunk/common/src/main/org/jboss/portal/common/util.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-13 10:16:40 -0500 (Tue, 13 Feb 2007)
New Revision: 6251
Modified:
trunk/common/src/main/org/jboss/portal/common/util/LocaleInfo.java
Log:
* Fixed: Multiple versions of languages in language drop-down in user profile - [JBPORTAL-957]
* Better, not perfect
Modified: trunk/common/src/main/org/jboss/portal/common/util/LocaleInfo.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/util/LocaleInfo.java 2007-02-13 15:08:45 UTC (rev 6250)
+++ trunk/common/src/main/org/jboss/portal/common/util/LocaleInfo.java 2007-02-13 15:16:40 UTC (rev 6251)
@@ -252,7 +252,7 @@
{
workInfos = sharedInfos;
}
- LocaleInfo info = (LocaleInfo)workInfos.byLocale.get(locale.toString());
+ LocaleInfo info = (LocaleInfo)workInfos.byLocaleCode.get(locale.toString());
// If the lookup fail we create a new object
if (info == null)
19 years, 2 months
JBoss Portal SVN: r6250 - in trunk: core/src/main/org/jboss/portal/core/model/portal and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-13 10:08:45 -0500 (Tue, 13 Feb 2007)
New Revision: 6250
Modified:
trunk/common/src/main/org/jboss/portal/common/text/FastURLEncoder.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
trunk/core/src/main/org/jboss/portal/core/portlet/management/LazyPortalObjectTreeNode.java
trunk/core/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java
Log:
JBPORTAL-1188 : In the management portlet, can't configure a page that has a name containing accents or other special characters
Modified: trunk/common/src/main/org/jboss/portal/common/text/FastURLEncoder.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/text/FastURLEncoder.java 2007-02-13 14:13:18 UTC (rev 6249)
+++ trunk/common/src/main/org/jboss/portal/common/text/FastURLEncoder.java 2007-02-13 15:08:45 UTC (rev 6250)
@@ -37,6 +37,9 @@
{
/** . */
+ public static final FastURLEncoder DEFAULT_ENCODER = create("UTF-8", 0, 1024);
+
+ /** . */
protected final String encoding;
/** . */
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2007-02-13 14:13:18 UTC (rev 6249)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2007-02-13 15:08:45 UTC (rev 6250)
@@ -25,9 +25,11 @@
import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.common.util.ParameterValidation;
import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.common.util.Base64;
import java.util.Iterator;
import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
/**
* A composite id for a portal object.
@@ -334,9 +336,12 @@
};
/** The internal format when it is persisted, smth like a.b.c */
- public static final Format LEGACY_FORMAT = new Format()
+ public static final Format LEGACY_FORMAT = new LegacyFormat();
+
+ public static class LegacyFormat extends Format
{
+ /** . */
private final String[] EMPTY_STRING_ARRAY = new String[0];
public String[] parse(String value)
@@ -360,9 +365,13 @@
int previous = 0;
for (int next = value.indexOf('.'); next != -1; previous = next + 1, next = value.indexOf('.', next + 1))
{
- names[length++] = value.substring(previous, next);
+ String name = value.substring(previous, next);
+ name = decodeName(name);
+ names[length++] = name;
}
- names[length] = value.substring(previous);
+ String name = value.substring(previous);
+ name = decodeName(name);
+ names[length] = name;
//
return names;
@@ -387,9 +396,51 @@
{
throw new IllegalArgumentException("No null name expected in the name string array");
}
+ name = encodeName(name);
buffer.append(name);
}
return buffer.toString();
}
+
+ protected String decodeName(String name)
+ {
+ return name;
+ }
+
+ protected String encodeName(String name)
+ {
+ return name;
+ }
+ }
+
+ public static final Format LEGACY_BASE64_FORMAT = new LegacyFormat()
+ {
+
+ protected String decodeName(String name)
+ {
+ try
+ {
+ byte[] bytes = Base64.decode(name);
+ return new String(bytes, "UTF-8");
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ throw new Error(e);
+ }
+ }
+
+ protected String encodeName(String name)
+ {
+ try
+ {
+ byte[] bytes = name.getBytes("UTF-8");
+ name = Base64.encodeBytes(bytes);
+ return name;
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ throw new Error(e);
+ }
+ }
};
}
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/management/LazyPortalObjectTreeNode.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/management/LazyPortalObjectTreeNode.java 2007-02-13 14:13:18 UTC (rev 6249)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/management/LazyPortalObjectTreeNode.java 2007-02-13 15:08:45 UTC (rev 6250)
@@ -140,7 +140,7 @@
public String getIdentifier()
{
- return object.getId().toString(PortalObjectId.CANONICAL_FORMAT);
+ return object.getId().toString(PortalObjectId.LEGACY_BASE64_FORMAT);
}
public void setIdentifier(String name)
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 2007-02-13 14:13:18 UTC (rev 6249)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/management/PortalObjectManagerBean.java 2007-02-13 15:08:45 UTC (rev 6250)
@@ -88,8 +88,18 @@
public class PortalObjectManagerBean implements Serializable
{
- private Logger log = Logger.getLogger(getClass());
+ /** . */
+ private static final int MOVE_UP = 0;
+ /** . */
+ private static final int MOVE_DOWN = 1;
+
+ /** . */
+ private static final int MOVE_LEFT = 2;
+
+ /** . */
+ private static final int MOVE_RIGHT = 3;
+
/** The serialVersionUID */
private static final long serialVersionUID = -8923517554726982622L;
@@ -123,8 +133,7 @@
LocalizedString displayName = portlet.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);
FacesContext ctx = FacesContext.getCurrentInstance();
Locale locale = ctx.getExternalContext().getRequestLocale();
- String name = displayName.getString(locale, true);
- return name;
+ return displayName.getString(locale, true);
}
});
portletDef.addAccessor("description", new PropertyDef(String.class)
@@ -149,19 +158,18 @@
{
Portlet portlet = (Portlet)base;
PortletInfo info = portlet.getInfo();
- Boolean remotable = info.isRemotable();
- return remotable;
+ return info.isRemotable();
}
});
DelegatingPropertyResolver.registerTypeDef(portletDef);
}
+ /** . */
+ private Logger log = Logger.getLogger(getClass());
+
/** The selected id. */
private String selectedId;
- /** The selected node properties. */
- private List selectedProperties;
-
/** The current tab name. */
private String selectedPlugin;
@@ -192,6 +200,9 @@
/** . */
private ThemeBean themes = new ThemeBean();
+ /** . */
+ private HtmlTree _tree;
+
/** Compares two windows according to their order. */
private static final Comparator comparator = new Comparator()
{
@@ -248,19 +259,11 @@
this.layoutService = layoutService;
}
-
public ThemeService getThemeService()
{
return themeService;
}
-
- /**
- * bind the theme service. (defined in the faces-config.xml; injected in WebAppEnhancer, based on jboss-portlet.xml
- * service entry)
- *
- * @param themeService
- */
public void setThemeService(ThemeService themeService)
{
this.themeService = themeService;
@@ -300,7 +303,7 @@
{
try
{
- PortalObjectId id = PortalObjectId.parse(selectedId, PortalObjectId.CANONICAL_FORMAT);
+ PortalObjectId id = PortalObjectId.parse(selectedId, PortalObjectId.LEGACY_BASE64_FORMAT);
result = portalObjectContainer.getObject(id);
}
catch (Exception e)
@@ -341,12 +344,8 @@
{
try
{
- // Select the empty plugin
- // selectedPlugin = null;
-
// Clear state
selectedId = null;
- selectedProperties = null;
selectedPlugin = null;
// Get id
@@ -356,23 +355,14 @@
// Set the state from the id
if (id != null)
{
- PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.CANONICAL_FORMAT);
+ PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.LEGACY_BASE64_FORMAT);
PortalObject object = portalObjectContainer.getObject(poid);
- //
+ // Update state if possible
if (object != null)
{
- List properties = new ArrayList();
- for (Iterator i = object.getDeclaredProperties().entrySet().iterator(); i.hasNext();)
- {
- Map.Entry entry = (Map.Entry)i.next();
- properties.add(new String[]{(String)entry.getKey(), (String)entry.getValue()});
- }
-
- // Update state
selectedId = id;
selectedPlugin = "manager";
- selectedProperties = properties;
}
}
}
@@ -389,7 +379,6 @@
{
// Clear state
selectedId = null;
- selectedProperties = null;
selectedPlugin = null;
// Get id
@@ -399,7 +388,7 @@
// Destroy the object
if (id != null)
{
- PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.CANONICAL_FORMAT);
+ PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.LEGACY_BASE64_FORMAT);
PortalObject object = portalObjectContainer.getObject(poid);
//
@@ -412,8 +401,6 @@
}
}
- private HtmlTree _tree;
-
public TreeNode getTreeData()
{
PortalObject root = portalObjectContainer.getRootObject();
@@ -516,7 +503,7 @@
{
Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String id = (String)pmap.get("id");
- PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.CANONICAL_FORMAT);
+ PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.LEGACY_BASE64_FORMAT);
Window target = (Window)portalObjectContainer.getObject(poid);
move(target, MOVE_UP);
}
@@ -532,7 +519,7 @@
{
Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String id = (String)pmap.get("id");
- PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.CANONICAL_FORMAT);
+ PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.LEGACY_BASE64_FORMAT);
Window target = (Window)portalObjectContainer.getObject(poid);
move(target, MOVE_DOWN);
}
@@ -548,7 +535,7 @@
{
Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String id = (String)pmap.get("id");
- PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.CANONICAL_FORMAT);
+ PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.LEGACY_BASE64_FORMAT);
Window target = (Window)portalObjectContainer.getObject(poid);
move(target, MOVE_RIGHT);
}
@@ -564,7 +551,7 @@
{
Map pmap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String id = (String)pmap.get("id");
- PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.CANONICAL_FORMAT);
+ PortalObjectId poid = PortalObjectId.parse(id, PortalObjectId.LEGACY_BASE64_FORMAT);
Window target = (Window)portalObjectContainer.getObject(poid);
move(target, MOVE_LEFT);
}
@@ -763,14 +750,6 @@
return (Map[])maps.toArray(new Map[maps.size()]);
}
-
- private static final int MOVE_UP = 0;
- private static final int MOVE_DOWN = 1;
- private static final int MOVE_LEFT = 2;
- private static final int MOVE_RIGHT = 3;
-
- // ***
-
/**
* NOTE: This is just to show an alternative way of supplying tree data. You can supply either a TreeModel or
* TreeNode.
19 years, 2 months
JBoss Portal SVN: r6249 - trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-13 09:13:18 -0500 (Tue, 13 Feb 2007)
New Revision: 6249
Modified:
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/index.xhtml
Log:
JBPORTAL-1235 : unable to create a portal
Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/index.xhtml
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/index.xhtml 2007-02-13 14:12:46 UTC (rev 6248)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/management/index.xhtml 2007-02-13 14:13:18 UTC (rev 6249)
@@ -23,12 +23,18 @@
org.apache.myfaces.tree2.CLIENT_SIDE_TOGGLE="#{false}">
<f:facet name="context">
<h:panelGroup>
- <t:graphicImage
- value="/images/management/tree/context.png"
- style="vertical-align:middle;" title="Example ToolTip on Image"/>
+ <h:commandLink
+ action="#{portalobjectmgr.selectObject}" title="Context">
+ <t:graphicImage
+ value="/images/management/tree/context.png"
+ style="vertical-align:middle;"/>
+ <f:param
+ name="id"
+ value="#{node.identifier}"/>
+ </h:commandLink>
<h:outputText> </h:outputText>
<h:commandLink
- action="#{portalobjectmgr.selectObject}" title="Example ToolTip">
+ action="#{portalobjectmgr.selectObject}" title="Context">
<h:outputText
value="#{node.description}"/>
<f:param
@@ -43,12 +49,18 @@
</f:facet>
<f:facet name="portal">
<h:panelGroup>
- <t:graphicImage
- value="/images/management/tree/portal.png"
- style="vertical-align:middle;"/>
+ <h:commandLink
+ action="#{portalobjectmgr.selectObject}" title="Portal">
+ <t:graphicImage
+ value="/images/management/tree/portal.png"
+ style="vertical-align:middle;"/>
+ <f:param
+ name="id"
+ value="#{node.identifier}"/>
+ </h:commandLink>
<h:outputText> </h:outputText>
<h:commandLink
- action="#{portalobjectmgr.selectObject}">
+ action="#{portalobjectmgr.selectObject}" title="Portal">
<h:outputText
value="#{node.description}"/>
<f:param
@@ -63,12 +75,18 @@
</f:facet>
<f:facet name="page">
<h:panelGroup>
- <t:graphicImage
- value="/images/management/tree/page.png"
- style="vertical-align:middle;"/>
+ <h:commandLink
+ action="#{portalobjectmgr.selectObject}" title="Page">
+ <t:graphicImage
+ value="/images/management/tree/page.png"
+ style="vertical-align:middle;"/>
+ <f:param
+ name="id"
+ value="#{node.identifier}"/>
+ </h:commandLink>
<h:outputText> </h:outputText>
<h:commandLink
- action="#{portalobjectmgr.selectObject}">
+ action="#{portalobjectmgr.selectObject}" title="Page">
<h:outputText
value="#{node.description}"/>
<f:param
@@ -83,12 +101,18 @@
</f:facet>
<f:facet name="window">
<h:panelGroup>
- <t:graphicImage
- value="/images/management/tree/window.png"
- style="vertical-align:middle;"/>
+ <h:commandLink
+ action="#{portalobjectmgr.selectObject}" title="Window">
+ <t:graphicImage
+ value="/images/management/tree/window.png"
+ style="vertical-align:middle;"/>
+ <f:param
+ name="id"
+ value="#{node.identifier}"/>
+ </h:commandLink>
<h:outputText> </h:outputText>
<h:commandLink
- action="#{portalobjectmgr.selectObject}">
+ action="#{portalobjectmgr.selectObject}" title="Window">
<h:outputText
value="#{node.description}"/>
<f:param
19 years, 2 months
JBoss Portal SVN: r6248 - trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-13 09:12:46 -0500 (Tue, 13 Feb 2007)
New Revision: 6248
Modified:
trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/ACLEnforcer.java
Log:
Fixed bug when non-admin user was doing a search.
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/ACLEnforcer.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/ACLEnforcer.java 2007-02-13 13:28:19 UTC (rev 6247)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/command/ACLEnforcer.java 2007-02-13 14:12:46 UTC (rev 6248)
@@ -140,7 +140,7 @@
}
else if(cmsSecurityContext.getAttribute("path")!=null)
{
- String path = (String)cmsSecurityContext.getAttribute("applyFilter");
+ String path = (String)cmsSecurityContext.getAttribute("path");
hasAccess = this.computeAccess(loggedInUser, path, "read");
}
//check if workflow management protection needs to be enforced
19 years, 2 months
JBoss Portal SVN: r6247 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-02-13 08:28:19 -0500 (Tue, 13 Feb 2007)
New Revision: 6247
Modified:
docs/trunk/referenceGuide/en/modules/cmsPortlet.xml
Log:
modified CMS doc in order to tell how to properly configure CMS content
Modified: docs/trunk/referenceGuide/en/modules/cmsPortlet.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/cmsPortlet.xml 2007-02-13 13:18:47 UTC (rev 6246)
+++ docs/trunk/referenceGuide/en/modules/cmsPortlet.xml 2007-02-13 13:28:19 UTC (rev 6247)
@@ -43,10 +43,41 @@
</orderedlist>
</section>
<section>
+ <title>CMS content</title>
+ <para>Since 2.6 displaying CMS content in the portal is done using the new content integration
+ feature. Each window of the portal can be configured to display CMS content directly instead of
+ having to configure the CMS portlet as it used to be.
+ </para>
+ <section>
+ <title>Configuring a window to display CMS content</title>
+ <para>Showing CMS content in a portal window can be done in the deployment descriptor quite easily
+ <programlisting><![CDATA[
+<window>
+ <window-name>MyCMSWindow</window-name>
+ <content>
+ <content-type>cms</content-type>
+ <content-uri>/default/index.html</content-uri>
+ </content>
+ <region>center</region>
+ <height>1</height>
+</window>
+]]></programlisting>
+ At the first display of the window, the content is initialized with the content uri value.
+ When the user clicks on a link that navigates to another CMS file, the CMS file will be shown in the
+ same window.
+ </para>
+ </section>
+ </section>
+ <section>
<title>CMS Configuration</title>
<section>
- <title>Welcome page</title>
- <para>The CMS portlet default page is defined as a preference and can be overriden like any
+ <title>Display CMS content</title>
+ <para>Since 2.6 displaying CMS content in the portal is done using the new content integration
+ feature.
+
+
+ The portal is also able to map urls content to the CMS through a specific window.
+ The CMS portlet default page is defined as a preference and can be overriden like any
other preference up to the user's preference level. The default CMS portlet displayed
when you install JBoss Portal for the first time is describe in the following file:
<emphasis>jboss-portal.sar/portal-core.war/WEB-INF/portlet.xml</emphasis>
19 years, 2 months
JBoss Portal SVN: r6246 - in trunk/core-search: src/main/org/jboss/portal and 3 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-13 08:18:47 -0500 (Tue, 13 Feb 2007)
New Revision: 6246
Added:
trunk/core-search/src/main/org/jboss/portal/core/
trunk/core-search/src/main/org/jboss/portal/core/search/
Removed:
trunk/core-search/src/main/org/jboss/portal/search/
Modified:
trunk/core-search/.classpath
trunk/core-search/src/main/org/jboss/portal/core/search/SearchConstants.java
trunk/core-search/src/main/org/jboss/portal/core/search/SearchPortlet.java
trunk/core-search/src/resources/portal-search-war/WEB-INF/portlet.xml
Log:
Rename package
Modified: trunk/core-search/.classpath
===================================================================
--- trunk/core-search/.classpath 2007-02-13 12:54:12 UTC (rev 6245)
+++ trunk/core-search/.classpath 2007-02-13 13:18:47 UTC (rev 6246)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/main"/>
+ <classpathentry excluding="org/jboss/portal/search/" kind="src" path="src/main"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/api"/>
<classpathentry combineaccessrules="false" kind="src" path="/core"/>
Copied: trunk/core-search/src/main/org/jboss/portal/core/search (from rev 6213, trunk/core-search/src/main/org/jboss/portal/search)
Modified: trunk/core-search/src/main/org/jboss/portal/core/search/SearchConstants.java
===================================================================
--- trunk/core-search/src/main/org/jboss/portal/search/SearchConstants.java 2007-02-12 15:10:03 UTC (rev 6213)
+++ trunk/core-search/src/main/org/jboss/portal/core/search/SearchConstants.java 2007-02-13 13:18:47 UTC (rev 6246)
@@ -20,7 +20,7 @@
* 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.search;
+package org.jboss.portal.core.search;
/**
* @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
Modified: trunk/core-search/src/main/org/jboss/portal/core/search/SearchPortlet.java
===================================================================
--- trunk/core-search/src/main/org/jboss/portal/search/SearchPortlet.java 2007-02-12 15:10:03 UTC (rev 6213)
+++ trunk/core-search/src/main/org/jboss/portal/core/search/SearchPortlet.java 2007-02-13 13:18:47 UTC (rev 6246)
@@ -20,7 +20,7 @@
* 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.search;
+package org.jboss.portal.core.search;
import java.io.IOException;
import java.util.List;
@@ -30,6 +30,7 @@
import javax.portlet.PortletException;
import org.jboss.portal.api.node.PortalNode;
+import org.jboss.portal.search.QueryConverter;
import org.jboss.portal.search.federation.SearchFederation;
import org.jboss.portal.search.query.Query;
import org.jboss.portlet.JBossPortlet;
Modified: trunk/core-search/src/resources/portal-search-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-search/src/resources/portal-search-war/WEB-INF/portlet.xml 2007-02-13 12:54:12 UTC (rev 6245)
+++ trunk/core-search/src/resources/portal-search-war/WEB-INF/portlet.xml 2007-02-13 13:18:47 UTC (rev 6246)
@@ -32,7 +32,7 @@
<portlet-name>SearchPortlet</portlet-name>
<display-name>Search Portlet</display-name>
- <portlet-class>org.jboss.portal.search.SearchPortlet</portlet-class>
+ <portlet-class>org.jboss.portal.core.search.SearchPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
19 years, 2 months
JBoss Portal SVN: r6245 - in trunk: identity and 9 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-02-13 07:54:12 -0500 (Tue, 13 Feb 2007)
New Revision: 6245
Added:
trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtRoleModuleTestCase.java
trunk/identity/src/resources/test/config/extrole/
trunk/identity/src/resources/test/config/extrole/opends-config.xml
trunk/test/src/etc/directories-extrolemodule.xml
Modified:
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
trunk/identity/build.xml
trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java
trunk/identity/src/resources/test/config/extuser/opends-config.xml
trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml
trunk/identity/src/resources/test/config/identity/opends-config.xml
trunk/identity/src/resources/test/config/identity/openldap-config.xml
trunk/identity/src/resources/test/config/identity/rhds-config-staticrole.xml
trunk/identity/src/resources/test/config/identity/rhds-config.xml
trunk/identity/src/resources/test/config/msad-config.xml
trunk/identity/src/resources/test/config/opends-config.xml
trunk/identity/src/resources/test/config/openldap-config.xml
trunk/identity/src/resources/test/config/rhds-config.xml
trunk/identity/src/resources/test/config/standardidentity-config.xml
trunk/identity/src/resources/test/config/staticrole/opends-config.xml
trunk/identity/src/resources/test/config/staticrole/rhds-config.xml
Log:
- minor change of parameter naming
- base LDAPExtRoleModule testcase
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 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/core/src/resources/portal-core-sar/conf/identity/ldap_identity-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -33,20 +33,24 @@
<config>
<option>
<name>host</name>
- <value>jboss.com</value>
+ <value>localhost</value>
</option>
<option>
<name>port</name>
- <value>10389</value>
+ <value>636</value>
</option>
<option>
<name>adminDN</name>
- <value>cn=Directory Manager</value>
+ <value>cn=Manager,dc=my-domain,dc=com</value>
</option>
<option>
<name>adminPassword</name>
- <value>qpq123qpq</value>
+ <value>secret</value>
</option>
+ <option>
+ <name>protocol</name>
+ <value>ssl</value>
+ </option>
</config>
</datasource>
</datasources>
@@ -98,12 +102,12 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
- <value>ou=People,dc=portal26,dc=jboss,dc=com</value>
+ <name>userCtxDN</name>
+ <value>ou=People,o=portal,dc=my-domain,dc=com</value>
</option>
<option>
- <name>roleContainerDN</name>
- <value>ou=Roles,dc=portal26,dc=jboss,dc=com</value>
+ <name>roleCtxDN</name>
+ <value>ou=Roles,o=portal,dc=my-domain,dc=com</value>
</option>
</option-group>
<option-group>
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 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -329,7 +329,7 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,dc=example,dc=com</value>
</option>
<option>
@@ -341,7 +341,7 @@
<value>userPassword</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,dc=example,dc=com</value>
</option>
<option>
Modified: trunk/identity/build.xml
===================================================================
--- trunk/identity/build.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/build.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -395,6 +395,7 @@
<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.LDAPExtUserModuleTestCase"/>
+ <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPExtRoleModuleTestCase"/>
</x-test>
@@ -459,6 +460,7 @@
<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.LDAPExtUserModuleTestCase"/>
+ <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPExtRoleModuleTestCase"/>
</x-test>
<x-classpath>
<pathelement location="${build.lib}/portal-identity-lib.jar"/>
Modified: trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/main/org/jboss/portal/identity/IdentityConfiguration.java 2007-02-13 12:54:12 UTC (rev 6245)
@@ -62,7 +62,7 @@
public static final String USER_PRINCIPAL_SUFFIX = "principalDNSuffix";
- public static final String USER_CONTAINER_DN = "userContainerDN";
+ //public static final String USER_CONTAINER_DN = "userContainerDN";
public static final String USER_UID_ATTRIBUTE_ID = "uidAttributeID";
@@ -70,11 +70,13 @@
public static final String USER_EMAIL_ATTRIBUTE_ID = "emailAttributeID";
- public static final String USER_SEARCH_CTX_DN = "userSearchCtxDN";
+ public static final String USER_CONTEXT_DN = "userCtxDN";
+ public static final String USER_CONTAINER_DN = USER_CONTEXT_DN;
+
public static final String USER_SEARCH_FILTER = "userSearchFilter";
- public static final String ROLE_CONTAINER_DN = "roleContainerDN";
+ //public static final String ROLE_CONTAINER_DN = "roleContainerDN";
public static final String ROLE_RID_ATTRIBUTE_ID = "ridAttributeID";
@@ -87,8 +89,9 @@
public static final String ROLE_SEARCH_FILTER = "roleSearchFilter";
//TODO:
- public static final String ROLE_CONTEXT_DN = "rolesCtxDN";
+ public static final String ROLE_CONTEXT_DN = "roleCtxDN";
+ public static final String ROLE_CONTAINER_DN = ROLE_CONTEXT_DN;
public static final String MEMBERSHIP_ATTRIBUTE_ID = "membershipAttributeID";
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java 2007-02-13 12:54:12 UTC (rev 6245)
@@ -299,10 +299,10 @@
protected String getUserSearchCtxDN() throws IdentityException
{
- String searchCtx = getIdentityConfiguration().getValue(IdentityConfiguration.USER_SEARCH_CTX_DN);
+ String searchCtx = getIdentityConfiguration().getValue(IdentityConfiguration.USER_CONTEXT_DN);
if (searchCtx == null)
{
- throw new IdentityException(IdentityConfiguration.USER_SEARCH_CTX_DN + " missing in configuration");
+ throw new IdentityException(IdentityConfiguration.USER_CONTEXT_DN + " missing in configuration");
}
else
{
@@ -331,7 +331,7 @@
protected int getSearchScope() throws IdentityException
{
int searchScope = SearchControls.ONELEVEL_SCOPE;
- String scope = getIdentityConfiguration().getValue(IdentityConfiguration.USER_SEARCH_CTX_DN);
+ String scope = getIdentityConfiguration().getValue(IdentityConfiguration.USER_CONTEXT_DN);
if (scope != null)
{
if ("OBJECT_SCOPE".equalsIgnoreCase(scope))
Added: trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtRoleModuleTestCase.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtRoleModuleTestCase.java (rev 0)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/ldap/LDAPExtRoleModuleTestCase.java 2007-02-13 12:54:12 UTC (rev 6245)
@@ -0,0 +1,184 @@
+package org.jboss.portal.test.identity.ldap;
+
+import junit.framework.TestSuite;
+import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.identity.IdentityServiceControllerImpl;
+import org.jboss.portal.identity.IdentityContext;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.ldap.LDAPRoleImpl;
+
+import java.util.Set;
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Iterator;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
+ * @version $Revision: 1.1 $
+ */
+public class LDAPExtRoleModuleTestCase extends LDAPTestCase
+{
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(LDAPExtRoleModuleTestCase.class);
+
+ public static TestSuite suite() throws Exception
+ {
+ return createTestSuite(LDAPExtRoleModuleTestCase.class, "directories-extrolemodule.xml", "datasources.xml");
+ }
+
+ RoleModule roleModule;
+
+ private String suffix;
+
+ public void setUp() throws Exception
+ {
+
+ super.setUp();
+
+ /*IdentityContextImpl context = new IdentityContextImpl();
+ context.start();
+ identityContext = context;
+
+ SimpleConfigurationImpl configuration = new SimpleConfigurationImpl();
+ configuration.setIdentityContext(identityContext);
+ configuration.setConfigFile(getDirectoryServerConfigParameter().getConfigFile());
+ configuration.start();
+
+ LDAPConnectionContext connection = new LDAPConnectionContext();
+ connection.setIdentityContext(identityContext);
+ connection.start();
+
+ LDAPRoleModuleImpl roleModule = new LDAPRoleModuleImpl();
+ roleModule.setIdentityContext(identityContext);
+ //roleModule.setContainerDN("ou=Roles,dc=jboss,dc=org");
+ //roleModule.setRidAttributeID("cn");
+ roleModule.start();
+ this.roleModule = roleModule;*/
+
+ IdentityServiceControllerImpl controller = new IdentityServiceControllerImpl();
+ controller.setConfigFile(getDirectoryServerConfigParameter().getConfigFile());
+ controller.setDefaultConfigFile("test/config/standardidentity-config.xml");
+ controller.setRegisterMBeans(false);
+ controller.start();
+ identityContext = controller.getIdentityContext();
+ this.roleModule = (RoleModule)identityContext.getObject(IdentityContext.TYPE_ROLE_MODULE);
+
+ suffix = getDirectoryServerConfigParameter().getCleanUpDN();
+
+ populate();
+
+ }
+
+
+ /*public void testFirstSimple() throws Exception
+ {
+ log.info("test framework works ;]");
+ }*/
+
+ public void testFindRoleByName() throws Exception
+ {
+ LDAPRoleImpl ldapr = (LDAPRoleImpl)roleModule.findRoleByName("Echo");
+ assertEquals(ldapr.getDn().toLowerCase(), ("cn=Echo,ou=Roles," + suffix).toLowerCase());
+ assertEquals(ldapr.getName(), "Echo");
+ }
+
+ /*public void testRemoveRole() throws Exception
+ {
+ LDAPRoleImpl ldapr = (LDAPRoleImpl)roleModule.findRoleByName("Echo");
+ assertEquals(ldapr.getDn().toLowerCase(), ("cn=Echo,ou=Roles," + suffix).toLowerCase());
+ assertEquals(ldapr.getName(), "Echo");
+ roleModule.removeRole(ldapr.getId());
+ try
+ {
+ ldapr = (LDAPRoleImpl)roleModule.findRoleByName("Echo");
+ fail();
+ }
+ catch (IdentityException e)
+ {
+ //expected
+ }
+ //assertNull(ldapr);
+ }
+
+ public void testCreateRole() throws Exception
+ {
+ LDAPRoleImpl ldapr = (LDAPRoleImpl)roleModule.createRole("testRole", "testDisplayName");
+ assertNotNull(ldapr);
+ assertEquals("testRole", ldapr.getName());
+ //assertEquals("testDisplayName",ldapr.getDisplayName());
+
+ ldapr = (LDAPRoleImpl)roleModule.findRoleByName("testRole");
+ assertNotNull(ldapr);
+ roleModule.removeRole(ldapr.getId());
+
+
+ try
+ {
+ roleModule.findRoleByName("testRole");
+ fail("shouldn reach this");
+ }
+ catch (Exception e)
+ {
+ //expected
+ }
+ //assertNull(ldapr);
+
+ }*/
+
+ public void testgetRoleCount() throws Exception
+ {
+ LDAPRoleImpl ldapr = (LDAPRoleImpl)roleModule.findRoleByName("Echo");
+ assertEquals(ldapr.getDn().toLowerCase(), ("cn=Echo,ou=Roles," + suffix).toLowerCase());
+ assertEquals(ldapr.getName(), "Echo");
+
+ int count = roleModule.getRolesCount();
+ assertEquals(3, count);
+ }
+
+ public void testFindRolesByNames() throws Exception
+ {
+ Set roles = roleModule.findRolesByNames(new String[] {"Echo"});
+
+ assertEquals(1, roles.size());
+
+ List roleNames = new LinkedList();
+
+ for (Iterator iterator = roles.iterator(); iterator.hasNext();)
+ {
+ LDAPRoleImpl role = (LDAPRoleImpl)iterator.next();
+ roleNames.add(role.getDn().toLowerCase());
+ }
+ assertTrue(roleNames.contains(("cn=Echo,ou=Roles," + suffix).toLowerCase()));
+
+
+ //
+ roles = roleModule.findRolesByNames(new String[] {"Echo", "Echo1"});
+
+ assertEquals(2, roles.size());
+
+ roleNames = new LinkedList();
+
+ for (Iterator iterator = roles.iterator(); iterator.hasNext();)
+ {
+ LDAPRoleImpl role = (LDAPRoleImpl)iterator.next();
+ roleNames.add(role.getDn().toLowerCase());
+ }
+ assertTrue(roleNames.contains(("cn=Echo,ou=Roles," + suffix).toLowerCase()));
+ assertTrue(roleNames.contains(("cn=Echo1,ou=Roles," + suffix).toLowerCase()));
+
+ //
+ roles = roleModule.findRolesByNames(new String[] {"Echo", "Echo1", "TheDuke"});
+
+ assertEquals(3, roles.size());
+
+ roleNames = new LinkedList();
+
+ for (Iterator iterator = roles.iterator(); iterator.hasNext();)
+ {
+ LDAPRoleImpl role = (LDAPRoleImpl)iterator.next();
+ roleNames.add(role.getDn().toLowerCase());
+ }
+ assertTrue(roleNames.contains(("cn=Echo,ou=Roles," + suffix).toLowerCase()));
+ assertTrue(roleNames.contains(("cn=Echo1,ou=Roles," + suffix).toLowerCase()));
+ assertTrue(roleNames.contains(("cn=TheDuke,ou=Roles," + suffix).toLowerCase()));
+ }
+}
Added: trunk/identity/src/resources/test/config/extrole/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/extrole/opends-config.xml (rev 0)
+++ trunk/identity/src/resources/test/config/extrole/opends-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+ <!--<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Identity Configuration 1.0//EN"
+ "http://www.jboss.org/portal/dtd/identity-config_1_0.dtd">-->
+
+<identity-configuration>
+ <datasources>
+ <datasource>
+ <name>LDAP</name>
+ <config>
+ <option>
+ <name>host</name>
+ <value>localhost</value>
+ </option>
+ <option>
+ <name>port</name>
+ <value>10389</value>
+ </option>
+ <option>
+ <name>adminDN</name>
+ <value>cn=Directory Manager</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>password</value>
+ </option>
+ </config>
+ </datasource>
+ </datasources>
+ <modules>
+ <module>
+ <!--type used to correctly map in IdentityContext registry-->
+ <type>User</type>
+ <implementation>LDAP</implementation>
+ <class>org.jboss.portal.identity.ldap.LDAPExtUserModuleImpl</class>
+ <config/>
+ </module>
+ <module>
+ <type>Role</type>
+ <implementation>LDAP</implementation>
+ <class>org.jboss.portal.identity.ldap.LDAPExtRoleModuleImpl</class>
+ <config/>
+ </module>
+ <module>
+ <type>Membership</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+
+ <module>
+ <type>UserProfile</type>
+ <implementation>DELEGATING</implementation>
+ <config>
+ <option>
+ <name>profileConfigFile</name>
+ <value>test/config/profile-config.xml</value>
+ </option>
+ <option>
+ <name>ldapModuleJNDIName</name>
+ <value>java:/portal/LDAPUserProfileModule</value>
+ </option>
+ </config>
+ </module>
+ <module>
+ <type>DBDelegateUserProfile</type>
+ <implementation>DB</implementation>
+ <config/>
+ </module>
+ <module>
+ <type>LDAPDelegateUserProfile</type>
+ <implementation>LDAP</implementation>
+ <config/>
+ </module>
+ </modules>
+
+ <options>
+ <option-group>
+ <group-name>common</group-name>
+ <option>
+ <name>userCtxDN</name>
+ <value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>userSearchFilter</name>
+ <value>(uid={0})</value>
+ </option>
+ <option>
+ <name>roleCtxDN</name>
+ <value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ <option>
+ <name>roleSearchFilter</name>
+ <value><![CDATA[(& (objectClass=groupOfNames) (cn={0}))]]></value>
+ </option>
+ <option>
+ <name>searchScope</name>
+ <value>SUBTREE_SCOPE</value>
+ </option>
+ </option-group>
+ <option-group>
+ <group-name>roleCreateAttibutes</group-name>
+ <!--Schema requires those to have initial value-->
+ <option>
+ <name>cn</name>
+ <value>none</value>
+ </option>
+ <!--Some directory servers require this attribute to be valid DN-->
+ <!--For safety reasons point to the admin user here-->
+ <option>
+ <name>member</name>
+ <value>uid=admin,ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
+ </option>
+ </option-group>
+ </options>
+</identity-configuration>
\ No newline at end of file
Modified: trunk/identity/src/resources/test/config/extuser/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/extuser/opends-config.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/extuser/opends-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -99,7 +99,7 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userSearchCtxDN</name>
+ <name>userCtxDN</name>
<value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
@@ -107,7 +107,7 @@
<value>(uid={0})</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
</option-group>
Modified: trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/identity/opends-config-staticrole.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -99,11 +99,11 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
Modified: trunk/identity/src/resources/test/config/identity/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/opends-config.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/identity/opends-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -98,11 +98,11 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
</option-group>
Modified: trunk/identity/src/resources/test/config/identity/openldap-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/openldap-config.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/identity/openldap-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -98,11 +98,11 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
</option>
</option-group>
Modified: trunk/identity/src/resources/test/config/identity/rhds-config-staticrole.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/rhds-config-staticrole.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/identity/rhds-config-staticrole.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -99,11 +99,11 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
Modified: trunk/identity/src/resources/test/config/identity/rhds-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/identity/rhds-config.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/identity/rhds-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -98,11 +98,11 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
</option-group>
Modified: trunk/identity/src/resources/test/config/msad-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/msad-config.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/msad-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -102,11 +102,11 @@
<value>cn</value>
</option>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,ou=testsuite,ou=portal,dc=jboss,dc=test</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,ou=testsuite,ou=portal,dc=jboss,dc=test</value>
</option>
</option-group>
Modified: trunk/identity/src/resources/test/config/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/opends-config.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/opends-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -98,11 +98,11 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
</option-group>
Modified: trunk/identity/src/resources/test/config/openldap-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/openldap-config.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/openldap-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -98,11 +98,11 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,dc=testsuite,dc=portal,dc=my-domain,dc=com</value>
</option>
</option-group>
Modified: trunk/identity/src/resources/test/config/rhds-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/rhds-config.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/rhds-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -98,11 +98,11 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
</option-group>
Modified: trunk/identity/src/resources/test/config/standardidentity-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/standardidentity-config.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/standardidentity-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -327,7 +327,7 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,dc=example,dc=com</value>
</option>
<option>
@@ -339,7 +339,7 @@
<value>userPassword</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,dc=example,dc=com</value>
</option>
<option>
Modified: trunk/identity/src/resources/test/config/staticrole/opends-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/staticrole/opends-config.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/staticrole/opends-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -99,11 +99,11 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
Modified: trunk/identity/src/resources/test/config/staticrole/rhds-config.xml
===================================================================
--- trunk/identity/src/resources/test/config/staticrole/rhds-config.xml 2007-02-13 12:50:17 UTC (rev 6244)
+++ trunk/identity/src/resources/test/config/staticrole/rhds-config.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -99,11 +99,11 @@
<option-group>
<group-name>common</group-name>
<option>
- <name>userContainerDN</name>
+ <name>userCtxDN</name>
<value>ou=People,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
- <name>roleContainerDN</name>
+ <name>roleCtxDN</name>
<value>ou=Roles,o=example2,dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</value>
</option>
<option>
Added: trunk/test/src/etc/directories-extrolemodule.xml
===================================================================
--- trunk/test/src/etc/directories-extrolemodule.xml (rev 0)
+++ trunk/test/src/etc/directories-extrolemodule.xml 2007-02-13 12:54:12 UTC (rev 6245)
@@ -0,0 +1,98 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<directories>
+ <directory>
+ <directory-name>OpenDS</directory-name>
+ <description>OpenDS service deployed on JBoss AS as an mbean - StaticRoleMembership config</description>
+ <config-file>test/config/extrole/opends-config.xml</config-file>
+ <host>localhost</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>password</admin-password>
+ <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>
+ <directory-name>RedHatDS</directory-name>
+ <description>RedHat Directory in QA Labs (need vpn access) - StaticGroupMembership config</description>
+
+ <config-file>test/config/identity/rhds-config.xml</config-file>
+ <host>dev39.qa.atl.jboss.com</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>qpq123qpq</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
+
+ <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+ <directory>
+ <directory-name>RedHatDS</directory-name>
+ <description>RedHat Directory in QA Labs (need vpn access) - StaticRoleMembership config</description>
+
+ <config-file>test/config/identity/rhds-config-staticrole.xml</config-file>
+ <host>dev39.qa.atl.jboss.com</host>
+ <port>10389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Directory Manager</admin-dn>
+ <admin-password>qpq123qpq</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-notpopulated.ldif</populate-ldif>
+
+ <cleanup-dn>dc=testsuite,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</cleanup-dn>
+ </directory>
+
+ <directory>
+ <directory-name>OpenLDAP</directory-name>
+ <description>OpenLDAP Directory in QA Labs (need vpn access) - StaticGroupMembership config</description>
+
+ <config-file>test/config/identity/openldap-config.xml</config-file>
+ <host>dev09.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>cn=Manager,dc=my-domain,dc=com</admin-dn>
+ <admin-password>jbossqa</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-notpopulated-openldap.ldif</populate-ldif>
+
+ <cleanup-dn>dc=testsuite,dc=portal,dc=my-domain,dc=com</cleanup-dn>
+ </directory>-->
+ <!--<directory>
+ <directory-name>MSAD</directory-name>
+ <description>Microsoft Active Directory in QA Labs (need vpn access)</description>
+
+ <config-file>test/config/msad-config.xml</config-file>
+ <host>dev44.qa.atl.jboss.com</host>
+ <port>389</port>
+ <context-factory>com.sun.jndi.ldap.LdapCtxFactory</context-factory>
+ <admin-dn>JBOSS\jbossqa</admin-dn>
+ <admin-password>jboss42</admin-password>
+
+ <populate-ldif>ldap/ldif/initial-tests-qa-msad.ldif</populate-ldif>
+
+ <cleanup-dn>ou=testsuite,ou=portal,dc=jboss,dc=test</cleanup-dn>
+ </directory>-->
+</directories>
19 years, 2 months
JBoss Portal SVN: r6244 - in trunk: core-cms/src/main/org/jboss/portal/core/cms/ui and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-02-13 07:50:17 -0500 (Tue, 13 Feb 2007)
New Revision: 6244
Modified:
trunk/cms/src/main/org/jboss/portal/cms/search/CMSFederatedSearch.java
trunk/cms/src/main/org/jboss/portal/cms/search/CMSResult.java
trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java
trunk/core-search/src/resources/portal-search-war/WEB-INF/default-object.xml
Log:
Cleanup
Modified: trunk/cms/src/main/org/jboss/portal/cms/search/CMSFederatedSearch.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/search/CMSFederatedSearch.java 2007-02-13 11:35:34 UTC (rev 6243)
+++ trunk/cms/src/main/org/jboss/portal/cms/search/CMSFederatedSearch.java 2007-02-13 12:50:17 UTC (rev 6244)
@@ -46,12 +46,15 @@
private CMS cms;
private Info info;
private String id;
+ private String urlPrefix;
- public CMSFederatedSearch(Portlet portlet, String id)
+ public CMSFederatedSearch(String id)
{
this.id = id;
info = new Info();
info.setStatus(Info.Status.AVAILABLE);
+
+ this.urlPrefix = "portal/content";
}
public void setCMS(CMS cms)
@@ -91,7 +94,7 @@
while (it.hasNext())
{
File file = (File)it.next();
- results.add(new CMSResult(file));
+ results.add(new CMSResult(file, urlPrefix));
}
return results;
}
Modified: trunk/cms/src/main/org/jboss/portal/cms/search/CMSResult.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/search/CMSResult.java 2007-02-13 11:35:34 UTC (rev 6243)
+++ trunk/cms/src/main/org/jboss/portal/cms/search/CMSResult.java 2007-02-13 12:50:17 UTC (rev 6244)
@@ -36,10 +36,10 @@
private File file;
private ResultURL url;
- public CMSResult(File file)
+ public CMSResult(File file, String prefix)
{
this.file = file;
- this.url = new CMSResultURL("portal/content", file);
+ this.url = new CMSResultURL(prefix, file);
}
public float getScore()
Modified: trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java
===================================================================
--- trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java 2007-02-13 11:35:34 UTC (rev 6243)
+++ trunk/core-cms/src/main/org/jboss/portal/core/cms/ui/CMSPortlet.java 2007-02-13 12:50:17 UTC (rev 6244)
@@ -148,7 +148,7 @@
SearchFederation searchFederationService = (SearchFederation)getPortletContext().getAttribute("SearchFederationService");
if (searchFederationService.getSearchFederated(CMSConstants.SEARCH_ID) == null)
{
- CMSFederatedSearch federatedSearch = new CMSFederatedSearch(this, CMSConstants.SEARCH_ID);
+ CMSFederatedSearch federatedSearch = new CMSFederatedSearch(CMSConstants.SEARCH_ID);
federatedSearch.setCMS(CMSService);
searchFederationService.register(federatedSearch);
}
Modified: trunk/core-search/src/resources/portal-search-war/WEB-INF/default-object.xml
===================================================================
--- trunk/core-search/src/resources/portal-search-war/WEB-INF/default-object.xml 2007-02-13 11:35:34 UTC (rev 6243)
+++ trunk/core-search/src/resources/portal-search-war/WEB-INF/default-object.xml 2007-02-13 12:50:17 UTC (rev 6244)
@@ -30,7 +30,7 @@
<deployment>
<parent-ref>default</parent-ref>
<page>
- <page-name>search</page-name>
+ <page-name>Search</page-name>
<window>
<window-name>SearchPortletWindow</window-name>
<instance-ref>SearchPortletInstance</instance-ref>
19 years, 2 months