gatein SVN: r7763 - in epp/portal/branches/EPP_5_2_Branch/web: portal/src/main/webapp/groovy/portal/webui/portal and 1 other directories.
by do-not-reply@jboss.org
Author: theute
Date: 2011-10-18 02:43:08 -0400 (Tue, 18 Oct 2011)
New Revision: 7763
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl
Log:
JBEPP-1294:Missing ResizeButton in DOM of UIPopupMessage
Modified: epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css 2011-10-18 04:40:20 UTC (rev 7762)
+++ epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UIPopup/UIPopupWindow/Stylesheet.css 2011-10-18 06:43:08 UTC (rev 7763)
@@ -89,6 +89,12 @@
margin: auto;
}
+.UIPopupWindow .ResizeButton {
+ width: 13px;
+ height: 13px;
+ margin: 0px 5px 5px 0px;
+}
+
/************************** UIPortalComposer **************************/
.UIPortalComposer {
@@ -213,12 +219,6 @@
border: none;
}
-.UIPortalComposer .ResizeButton {
- width: 13px;
- height: 13px;
- margin: 0px 0px 5px 0px;
-}
-
.UIPortalComposer > .OverflowContainer{
background: url(background/PortalComposer.gif) repeat-x left -34px;
height: 30px;
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl 2011-10-18 04:40:20 UTC (rev 7762)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/portal/UIPortalComposer.gtmpl 2011-10-18 06:43:08 UTC (rev 7763)
@@ -36,8 +36,8 @@
<a href="javascript:void(0);" class="ViewAsBlockIcon"><%=_ctx.appRes(popupId + ".action.SwitchMode")%></a>
</span>
</div>
- <span class="ResizeButton"></span>
</div>
+ <span class="ResizeButton"></span>
</div>
<script language="javascript">
eXo.portal.portalMode = <%=uicomponent.getPortalMode();%>;
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl 2011-10-18 04:40:20 UTC (rev 7762)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/webui/core/UIPopupWindow.gtmpl 2011-10-18 06:43:08 UTC (rev 7763)
@@ -45,4 +45,5 @@
<div class="UIWindowContent">
<div class="PopupContent" style="$heightStyle"><% uicomponent.renderChildren(); %></div>
</div>
+ <span class="ResizeButton"></span>
</div>
13 years, 2 months
gatein SVN: r7762 - in portal/trunk/web: portal/src/main/webapp/groovy/webui/organization/account and 1 other directory.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2011-10-18 00:40:20 -0400 (Tue, 18 Oct 2011)
New Revision: 7762
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIUserSelector.js
portal/trunk/web/portal/src/main/webapp/groovy/webui/organization/account/UIUserSelector.gtmpl
Log:
GTNPORTAL-2180 Javascript popup error when using UIUserSelector
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIUserSelector.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIUserSelector.js 2011-10-18 04:34:01 UTC (rev 7761)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIUserSelector.js 2011-10-18 04:40:20 UTC (rev 7762)
@@ -102,30 +102,21 @@
}
return keynum ;
} ;
+
/**
- * Process event when user presses a key
- * @param {Object} evt event
+ * Return true if the key pressed is the Enter.
+ * Otherwise return false.
*/
-UIUserSelector.prototype.captureInput = function(input, action) {
- if(typeof(input) == "string") input = document.getElementById(input) ;
- input.form.onsubmit = eXo.webui.UIUserSelector.cancelSubmit ;
- input.onkeypress= eXo.webui.UIUserSelector.onEnter ;
-} ;
-/**
- * Process event when user presses a Enter key
- * @param {Object} evt event
- */
-UIUserSelector.prototype.onEnter = function(evt) {
+UIUserSelector.prototype.isEnterPress = function(evt) {
var _e = evt || window.event ;
- _e.cancelBubble = true ;
var keynum = eXo.webui.UIUserSelector.getKeynum(_e) ;
- if (keynum == 13) {
- var action = eXo.core.DOMUtil.findNextElementByTagName(this, "a");
- if(!action) action = eXo.core.DOMUtil.findPreviousElementByTagName(this, "a") ;
- action = String(action.href).replace("javascript:","").replace("%20","") ;
- eval(action) ;
+ if (keynum == 13)
+ {
+ return true;
}
+ return false;
} ;
+
/**
* Cancel submit action
*/
Modified: portal/trunk/web/portal/src/main/webapp/groovy/webui/organization/account/UIUserSelector.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/webui/organization/account/UIUserSelector.gtmpl 2011-10-18 04:34:01 UTC (rev 7761)
+++ portal/trunk/web/portal/src/main/webapp/groovy/webui/organization/account/UIUserSelector.gtmpl 2011-10-18 04:40:20 UTC (rev 7762)
@@ -5,8 +5,16 @@
def rcontext = _ctx.getRequestContext();
boolean isMulti = uicomponent.getMulti();
rcontext.getJavascriptManager().addJavascript('eXo.webui.UIUserSelector.init("'+uiform.id+'"); ');
- rcontext.getJavascriptManager().addJavascript('eXo.webui.UIUserSelector.captureInput("'+uiform.FIELD_KEYWORD+'","'+uicomponent.event('Search')+'"); ');
- if(uicomponent.isShowSearchGroup()) rcontext.getJavascriptManager().addJavascript('eXo.webui.UIUserSelector.captureInput("'+uiform.FIELD_GROUP+'","'+uicomponent.event('FindGroup',uicomponent.getSelectedGroup())+'"); ');
+
+ String js = "if (eXo.webui.UIUserSelector.isEnterPress(event)) {" + uicomponent.event('Search') + "; return false;}";
+ uiform.getUIStringInput(uiform.FIELD_KEYWORD).setHTMLAttribute("onkeypress", js);
+
+ if(uicomponent.isShowSearchGroup())
+ {
+ js = "if (eXo.webui.UIUserSelector.isEnterPress(event)) {" + uicomponent.event('FindGroup',uicomponent.getSelectedGroup()) + "; return false;}";
+ uiform.getUIStringInput(uiform.FIELD_GROUP).setHTMLAttribute("onkeypress", js);
+ }
+
%>
<div class="UIUserSelector">
<div class="SelectUserContainer">
13 years, 2 months
gatein SVN: r7761 - portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2011-10-18 00:34:01 -0400 (Tue, 18 Oct 2011)
New Revision: 7761
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputBase.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormStringInput.java
Log:
GTNPORTAL-2178 Be able to adapt HTML attributes for UIFormInput components
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputBase.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputBase.java 2011-10-18 04:19:04 UTC (rev 7760)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputBase.java 2011-10-18 04:34:01 UTC (rev 7761)
@@ -20,6 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.commons.serialization.api.annotations.Serialized;
+import org.exoplatform.commons.utils.HTMLEntityEncoder;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.UIContainer;
@@ -27,9 +28,13 @@
import org.exoplatform.webui.form.validator.MandatoryValidator;
import org.exoplatform.webui.form.validator.Validator;
+import java.io.IOException;
+import java.io.Writer;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* Created by The eXo Platform SARL
@@ -90,6 +95,11 @@
* Whether this field is in read only mode
*/
protected boolean readonly_ = false;
+
+ /**
+ * A map of HTML attribute
+ */
+ private Map<String, String> attribute;
public UIFormInputBase(String name, String bindingField, Class<T> typeValue)
{
@@ -237,4 +247,36 @@
{
this.label = label;
}
+
+ public String getHTMLAttribute(String name)
+ {
+ if (attribute != null)
+ {
+ return attribute.get(name);
+ }
+ return null;
+ }
+
+ public void setHTMLAttribute(String name, String value)
+ {
+ if (attribute == null)
+ {
+ attribute = new HashMap<String, String>();
+ }
+ attribute.put(name, value);
+ }
+
+ protected void renderHTMLAttribute(Writer w) throws IOException
+ {
+ if (attribute != null)
+ {
+ w.write(" ");
+ for (String name : attribute.keySet())
+ {
+ String value = HTMLEntityEncoder.getInstance().encodeHTMLAttribute(attribute.get(name));
+ w.write(name + "=\"" + value + "\"");
+ }
+ w.write(" ");
+ }
+ }
}
\ No newline at end of file
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormStringInput.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormStringInput.java 2011-10-18 04:19:04 UTC (rev 7760)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormStringInput.java 2011-10-18 04:34:01 UTC (rev 7761)
@@ -126,6 +126,9 @@
w.write(" readonly ");
if (!enable_)
w.write(" disabled ");
+
+ renderHTMLAttribute(w);
+
w.write("/>");
if (this.isMandatory())
w.write(" *");
13 years, 2 months
gatein SVN: r7760 - in portal/trunk/gadgets: server/src/main/webapp/containers/default and 1 other directory.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2011-10-18 00:19:04 -0400 (Tue, 18 Oct 2011)
New Revision: 7760
Modified:
portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java
portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoOAuthModule.java
portal/trunk/gadgets/server/src/main/webapp/containers/default/container.js
Log:
GTNPORTAL-2175 The default OAuth signing key should NOT be automatically generated if it does not exist
Modified: portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java
===================================================================
--- portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java 2011-10-17 23:09:57 UTC (rev 7759)
+++ portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java 2011-10-18 04:19:04 UTC (rev 7760)
@@ -88,7 +88,7 @@
private void initializeTokenKeyFile()
{
- String keyPath = PropertyManager.getProperty("gatein.gadgets.securityTokenKeyFile");
+ String keyPath = PropertyManager.getProperty("gatein.gadgets.securitytokenkeyfile");
File tokenKeyFile = null;
if (keyPath == null)
@@ -101,82 +101,80 @@
tokenKeyFile = new File(keyPath);
}
- boolean isCreated = initializeKeyFile(tokenKeyFile);
- if (isCreated)
+ keyPath = tokenKeyFile.getAbsolutePath();
+ if (tokenKeyFile.exists())
{
- setTokenKeyPath(tokenKeyFile.getAbsolutePath());
- }
- }
-
- private void initializeSigningKeyFile()
- {
- String signingKey = PropertyManager.getProperty("gatein.gadgets.signingKeyFile");
-
- File signingKeyFile;
- if (signingKey == null)
- {
- log.warn("The gadgets signing key is not configured. The default oauthkey.pem file in /bin will be used");
- signingKeyFile = new File("oauthkey.pem");
- }
- else
- {
- signingKeyFile = new File(signingKey);
- }
-
- boolean isCreated = initializeKeyFile(signingKeyFile);
- if (isCreated)
- {
- signingKey_ = signingKeyFile.getAbsolutePath();
- }
- }
-
- private boolean initializeKeyFile(File file)
- {
- String keyPath = file.getAbsolutePath();
- if (file.exists())
- {
- if (file.isFile())
+ if (tokenKeyFile.isFile())
{
- log.info("Found key file " + keyPath + " for gadgets security");
+ setTokenKeyPath(keyPath);
+ log.info("Found token key file " + keyPath + " for gadgets security");
}
else
{
- log.error("Found path file " + keyPath + " but it's not a key file");
+ log.error("Found token path file " + keyPath + " but it's not a key file");
}
}
else
{
- log.debug("No key file found at path " + keyPath + ". it's generating a new key and saving it");
- File fic = file.getAbsoluteFile();
+ log.debug("No token key file found at path " + keyPath + ". it's generating a new key and saving it");
+ File fic = tokenKeyFile.getAbsoluteFile();
File parentFolder = fic.getParentFile();
if (!parentFolder.exists()) {
if (!parentFolder.mkdirs())
{
- log.error("Coult not create parent folder/s for the key file " + keyPath);
- return false;
+ log.error("Coult not create parent folder/s for the token key file " + keyPath);
+ return;
}
}
String key = generateKey();
Writer out = null;
try
{
- out = new FileWriter(file);
+ out = new FileWriter(tokenKeyFile);
out.write(key);
out.write('\n');
- log.debug("Generated key file " + keyPath + " for eXo Gadgets");
+ setTokenKeyPath(keyPath);
+ log.debug("Generated token key file " + keyPath + " for eXo Gadgets");
}
catch (IOException e)
{
- log.error("Could not create key file " + keyPath, e);
- return false;
+ log.error("Could not create token key file " + keyPath, e);
}
finally
{
Safe.close(out);
}
}
- return true;
}
+
+ private void initializeSigningKeyFile()
+ {
+ String signingKey = PropertyManager.getProperty("gatein.gadgets.signingkeyfile");
+
+ File signingKeyFile;
+ if (signingKey == null)
+ {
+ log.warn("The gadgets signing key is not configured. The default signing key in /bin directory will be used.");
+ signingKeyFile = new File("oauthkey.pem");
+ }
+ else
+ {
+ signingKeyFile = new File(signingKey);
+ }
+
+ if (signingKeyFile.exists())
+ {
+ if (signingKeyFile.isFile())
+ {
+ signingKey_ = signingKeyFile.getAbsolutePath();
+ log.info("Use signing key " + signingKey_ + " for gadget security");
+ }
+ else
+ {
+ log.error("Found signing path file " + signingKeyFile.getAbsolutePath() + " but it's not a key file");
+ }
+ }
+ }
private void setTokenKeyPath(String keyPath)
{
Modified: portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoOAuthModule.java
===================================================================
--- portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoOAuthModule.java 2011-10-17 23:09:57 UTC (rev 7759)
+++ portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoOAuthModule.java 2011-10-18 04:19:04 UTC (rev 7760)
@@ -19,11 +19,11 @@
package org.exoplatform.portal.gadget.core;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
import com.google.inject.Singleton;
+import com.google.inject.name.Names;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.shindig.auth.AnonymousAuthenticationHandler;
@@ -32,16 +32,14 @@
import org.apache.shindig.config.ContainerConfig;
import org.apache.shindig.gadgets.oauth.BasicOAuthStore;
import org.apache.shindig.gadgets.oauth.BasicOAuthStoreConsumerKeyAndSecret;
+import org.apache.shindig.gadgets.oauth.BasicOAuthStoreConsumerKeyAndSecret.KeyType;
import org.apache.shindig.gadgets.oauth.OAuthFetcherConfig;
import org.apache.shindig.gadgets.oauth.OAuthModule;
import org.apache.shindig.gadgets.oauth.OAuthRequest;
import org.apache.shindig.gadgets.oauth.OAuthStore;
-import org.apache.shindig.gadgets.oauth.BasicOAuthStoreConsumerKeyAndSecret.KeyType;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
-import com.google.inject.Inject;
-import com.google.inject.Provider;
-import com.google.inject.name.Names;
-
/**
* Created by IntelliJ IDEA.
* User: jeremi
@@ -59,7 +57,7 @@
private static final String OAUTH_CONFIG = "config/oauth.json";
- private static final Logger logger = Logger.getLogger(OAuthModule.class.getName());
+ private static final Log log = ExoLogger.getLogger(OAuthModule.class);;
@Override
protected void configure()
@@ -103,19 +101,19 @@
BasicOAuthStoreConsumerKeyAndSecret key = null;
if (!StringUtils.isBlank(signingKeyFile)) {
try {
- logger.info("Loading OAuth signing key from " + signingKeyFile);
+ log.info("Loading OAuth signing key from " + signingKeyFile);
String privateKey = IOUtils.toString(ResourceLoader.open(signingKeyFile), "UTF-8");
privateKey = BasicOAuthStore.convertFromOpenSsl(privateKey);
key = new BasicOAuthStoreConsumerKeyAndSecret(null, privateKey, KeyType.RSA_PRIVATE,
signingKeyName, null);
} catch (Throwable t) {
- logger.log(Level.WARNING, "Couldn't load key file " + signingKeyFile, t);
+ log.warn("Couldn't load key file " + signingKeyFile);
}
}
if (key != null) {
store.setDefaultKey(key);
} else {
- logger.log(Level.WARNING, "Couldn't load OAuth signing key. To create a key, run:\n" +
+ log.warn("Couldn't load OAuth signing key. To create a key, run:\n" +
" openssl req -newkey rsa:1024 -days 365 -nodes -x509 -keyout testkey.pem \\\n" +
" -out testkey.pem -subj '/CN=mytestkey'\n" +
" openssl pkcs8 -in testkey.pem -out oauthkey.pem -topk8 -nocrypt -outform PEM\n" +
@@ -130,7 +128,7 @@
String oauthConfigString = ResourceLoader.getContent(OAUTH_CONFIG);
store.initFromConfigString(oauthConfigString);
} catch (Throwable t) {
- logger.log(Level.WARNING, "Failed to initialize OAuth consumers from " + OAUTH_CONFIG, t);
+ log.warn("Failed to initialize OAuth consumers from " + OAUTH_CONFIG, t);
}
}
Modified: portal/trunk/gadgets/server/src/main/webapp/containers/default/container.js
===================================================================
--- portal/trunk/gadgets/server/src/main/webapp/containers/default/container.js 2011-10-17 23:09:57 UTC (rev 7759)
+++ portal/trunk/gadgets/server/src/main/webapp/containers/default/container.js 2011-10-18 04:19:04 UTC (rev 7760)
@@ -97,7 +97,7 @@
"gadgets.osDataUri" : "http://%host%/rpc",
"gadgets.signingKeyFile" : "oauthkey.pem",
-"gadgets.signingKeyName" : "mytestkey",
+"gadgets.signingKeyName" : "exokey",
"gadgets.signedFetchDomain" : "eXo",
@@ -277,4 +277,4 @@
// for a container.
"library": "config/OSML_library.xml"
}
-}}
\ No newline at end of file
+}}
13 years, 2 months
gatein SVN: r7759 - in portal/trunk/portlet/exoadmin/src/main: webapp/WEB-INF and 1 other directory.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-10-17 19:09:57 -0400 (Mon, 17 Oct 2011)
New Revision: 7759
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UINavigationNodeSelector.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPortalNavigationPortlet.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
Log:
GTNPORTAL-2140: add level support for UINavigatorNodeSelector. This is configured using a 'level' portlet preference on the portlet which uses this (in this case UIPortalNavigationPortlet) which passes this value along to its components.
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UINavigationNodeSelector.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UINavigationNodeSelector.java 2011-10-17 23:02:16 UTC (rev 7758)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UINavigationNodeSelector.java 2011-10-17 23:09:57 UTC (rev 7759)
@@ -44,6 +44,8 @@
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.portal.webui.workspace.UIPortalToolPanel;
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
@@ -87,7 +89,7 @@
public class UINavigationNodeSelector extends UIContainer
{
private UserNavigation edittedNavigation;
-
+
/**
* This field holds transient copy of edittedTreeNodeData, which is used when
* user pastes the content to a new tree node
@@ -102,7 +104,8 @@
private Map<String, Map<Locale, State>> userNodeLabels;
- private static final Scope NODE_SCOPE = Scope.GRANDCHILDREN;
+ private static final Scope DEFAULT_SCOPE = Scope.GRANDCHILDREN;
+ private Scope navigationScope = DEFAULT_SCOPE;
public UINavigationNodeSelector() throws Exception
{
@@ -152,12 +155,12 @@
try
{
this.rootNode =
- new TreeNode(edittedNavigation, userPortal.getNode(edittedNavigation, NODE_SCOPE, filterConfig, null));
+ new TreeNode(edittedNavigation, userPortal.getNode(edittedNavigation, navigationScope, filterConfig, null));
TreeNode node = this.rootNode;
if (this.rootNode.getChildren().size() > 0)
{
- node = rebaseNode(this.rootNode.getChild(0), NODE_SCOPE);
+ node = rebaseNode(this.rootNode.getChild(0), navigationScope);
if (node == null)
{
initTreeData();
@@ -305,6 +308,16 @@
return getRootNode().findNode(nodeID);
}
+ public void setScope(Scope scope)
+ {
+ this.navigationScope = scope;
+ }
+
+ public Scope getScope()
+ {
+ return this.navigationScope;
+ }
+
private void invokeI18NizedLabels(TreeNode node)
{
DescriptionService descriptionService = this.getApplicationComponent(DescriptionService.class);
@@ -324,7 +337,7 @@
{
protected TreeNode rebaseNode(TreeNode node, UINavigationNodeSelector selector) throws Exception
{
- return rebaseNode(node, UINavigationNodeSelector.NODE_SCOPE, selector);
+ return rebaseNode(node, selector.getScope(), selector);
}
protected TreeNode rebaseNode(TreeNode node, Scope scope, UINavigationNodeSelector selector) throws Exception
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPortalNavigationPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPortalNavigationPortlet.java 2011-10-17 23:02:16 UTC (rev 7758)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPortalNavigationPortlet.java 2011-10-17 23:09:57 UTC (rev 7759)
@@ -19,6 +19,13 @@
package org.exoplatform.navigation.webui.component;
+import javax.portlet.PortletPreferences;
+import javax.portlet.PortletRequest;
+
+import org.exoplatform.portal.mop.navigation.GenericScope;
+import org.exoplatform.portal.mop.navigation.Scope;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.application.portlet.PortletRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
@@ -26,8 +33,31 @@
@ComponentConfig(lifecycle = UIApplicationLifecycle.class)
public class UIPortalNavigationPortlet extends UIPortletApplication
{
+ public static final int DEFAULT_LEVEL = 2;
+
public UIPortalNavigationPortlet() throws Exception
{
- addChild(UISiteManagement.class, null, null);
+ PortletRequestContext context = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
+ PortletRequest prequest = context.getRequest();
+ PortletPreferences prefers = prequest.getPreferences();
+ int level = DEFAULT_LEVEL;
+ try
+ {
+ level = Integer.valueOf(prefers.getValue("level", String.valueOf(DEFAULT_LEVEL)));
+ }
+ catch (Exception ex)
+ {
+ log.warn("Preference for navigation level can only be integer");
+ }
+
+ UISiteManagement siteManagement = addChild(UISiteManagement.class, null, null);
+ if (level <= 0)
+ {
+ siteManagement.setScope(Scope.ALL);
+ }
+ else
+ {
+ siteManagement.setScope(GenericScope.treeShape(level));
+ }
}
}
\ No newline at end of file
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2011-10-17 23:02:16 UTC (rev 7758)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2011-10-17 23:09:57 UTC (rev 7759)
@@ -30,6 +30,7 @@
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.navigation.Scope;
import org.exoplatform.portal.mop.user.UserNavigation;
import org.exoplatform.portal.mop.user.UserPortal;
import org.exoplatform.portal.webui.page.UISiteBody;
@@ -88,6 +89,9 @@
private LazyPageList<PortalConfig> pageList;
private UINavigationManagement naviManager;
+
+ //set navigationScope to GrandChildren for default value
+ private Scope navigationScope = Scope.GRANDCHILDREN;
public UISiteManagement() throws Exception
{
@@ -184,6 +188,16 @@
}, 10);
}
+
+ public void setScope(Scope scope)
+ {
+ this.navigationScope = scope;
+ }
+
+ public Scope getScope()
+ {
+ return this.navigationScope;
+ }
private boolean stillKeptInPageList(String portalName) throws Exception {
List<PortalConfig> portals = this.getPortalConfigs();
@@ -387,6 +401,7 @@
UserNavigation edittedNavigation = userPortal.getNavigation(SiteKey.portal(portalName));
UINavigationNodeSelector selector = naviManager.getChild(UINavigationNodeSelector.class);
+ selector.setScope(uicomp.getScope());
selector.setEdittedNavigation(edittedNavigation);
selector.setUserPortal(userPortal);
selector.initTreeData();
@@ -408,6 +423,7 @@
UINavigationNodeSelector selector = navigationManager.getChild(UINavigationNodeSelector.class);
TreeNode selectedParent = (TreeNode)uiPageNodeForm.getSelectedParent();
+ selector.setScope(uiSiteManagement.getScope());
selector.selectNode(selectedParent);
WebuiRequestContext context = event.getRequestContext();
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2011-10-17 23:02:16 UTC (rev 7758)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/WEB-INF/portlet.xml 2011-10-17 23:09:57 UTC (rev 7759)
@@ -172,6 +172,14 @@
<short-title>Portal Navigation Portlet</short-title>
<keywords>System</keywords>
</portlet-info>
+
+ <portlet-preferences>
+ <preference>
+ <name>level</name>
+ <value>2</value>
+ </preference>
+ </portlet-preferences>
+
</portlet>
<portlet>
13 years, 2 months
gatein SVN: r7758 - portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server.
by do-not-reply@jboss.org
Author: nscavell
Date: 2011-10-17 19:02:16 -0400 (Mon, 17 Oct 2011)
New Revision: 7758
Modified:
portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java
Log:
Set current container to null after we're done.
Modified: portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java 2011-10-17 22:43:39 UTC (rev 7757)
+++ portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java 2011-10-17 23:02:16 UTC (rev 7758)
@@ -62,6 +62,8 @@
{
log.warn("Illegal state exception ending RequestLifeCycle", e);
}
+
+ ExoContainerContext.setCurrentContainer(null);
}
}
}
13 years, 2 months
gatein SVN: r7757 - portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity.
by do-not-reply@jboss.org
Author: smumford
Date: 2011-10-17 18:43:39 -0400 (Mon, 17 Oct 2011)
New Revision: 7757
Modified:
portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
Log:
GTNPORTAL-2144: Updated OpenSSO to point to Oracle
Modified: portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
===================================================================
--- portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2011-10-17 22:42:30 UTC (rev 7756)
+++ portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2011-10-17 22:43:39 UTC (rev 7757)
@@ -194,37 +194,37 @@
</step>
</procedure>
</section>
- <note>
- <para>
- By default on logout the CAS server will display the CAS logout page with a link to return to the portal. To make the CAS server redirect to the portal page after a logout, modify the
+ <note>
+ <para>
+ By default on logout the CAS server will display the CAS logout page with a link to return to the portal. To make the CAS server redirect to the portal page after a logout, modify the
<filename>cas.war/WEB-INF/cas-servlet.xml</filename> to include the follow line :
- </para>
+ </para>
<programlisting>
- <bean id="logoutController" class="org.jasig.cas.web.LogoutController"
+ <bean id="logoutController" class="org.jasig.cas.web.LogoutController"
p:centralAuthenticationService-ref="centralAuthenticationService"
p:logoutView="casLogoutView"
p:warnCookieGenerator-ref="warnCookieGenerator"
p:ticketGrantingTicketCookieGenerator-ref="ticketGrantingTicketCookieGenerator"
<emphasis role="bold">p:followServiceRedirects="true"/></emphasis>
- </programlisting>
- </note>
- </section>
-
- <section id="sect-Reference_Guide-CAS_Central_Authentication_Service-Setup_the_CAS_client">
- <title>Setup the CAS client</title>
- <procedure>
- <step>
- <para>
- Copy all libraries from <filename>GATEIN_SSO_HOME/cas/gatein.ear/lib</filename> into <filename>JBOSS_HOME/server/default/deploy/gatein.ear/lib</filename> (Or in Tomcat, into $<filename>GATEIN_HOME/lib</filename>)
- </para>
- </step>
- <step>
- <itemizedlist>
- <listitem>
- <para>
- In JBoss AS, edit <filename>gatein.ear/META-INF/gatein-jboss-beans.xml</filename> and uncomment this section:
- </para>
+ </programlisting>
+ </note>
+ </section>
+
+ <section id="sect-Reference_Guide-CAS_Central_Authentication_Service-Setup_the_CAS_client">
+ <title>Setup the CAS client</title>
+ <procedure>
+ <step>
+ <para>
+ Copy all libraries from <filename>GATEIN_SSO_HOME/cas/gatein.ear/lib</filename> into <filename>JBOSS_HOME/server/default/deploy/gatein.ear/lib</filename> (Or in Tomcat, into $<filename>GATEIN_HOME/lib</filename>)
+ </para>
+ </step>
+ <step>
+ <itemizedlist>
+ <listitem>
+ <para>
+ In JBoss AS, edit <filename>gatein.ear/META-INF/gatein-jboss-beans.xml</filename> and uncomment this section:
+ </para>
<programlisting><authentication>
<login-module code="org.gatein.sso.agent.login.SSOLoginModule" flag="required">
</login-module>
@@ -324,79 +324,79 @@
<programlisting>
<![CDATA[
- <filter>
- <filter-name>LoginRedirectFilter</filter-name>
- <filter-class>org.gatein.sso.agent.filter.LoginRedirectFilter</filter-class>
- <init-param>
- <!-- This should point to your SSO authentication server -->
- <param-name>LOGIN_URL</param-name>
- <!--
- If casRenewTicket param value of InitiateLoginServlet is: not specified or false
- -->
- <param-value>http://localhost:8888/cas/login?service=
- http://localhost:8080/portal/initiatessologin</param-value>
- <!--
- If casRenewTicket param value of InitiateLoginServlet is : true
- -->
- <!--
- <param-value>http://localhost:8888/cas/login?
- service=http://localhost:8080/portal/initiatessologin&renew=true</param-value>
- -->
- </init-param>
- </filter>
- <filter>
- <filter-name>CASLogoutFilter</filter-name>
- <filter-class>org.gatein.sso.agent.filter.CASLogoutFilter</filter-class>
- <init-param>
- <!-- This should point to your JOSSO authentication server -->
- <param-name>LOGOUT_URL</param-name>
- <param-value>http://localhost:8888/cas/logout</param-value>
- </init-param>
- </filter>
- <filter>
- <filter-name>InitiateLoginFilter</filter-name>
- <filter-class>org.gatein.sso.agent.filter.InitiateLoginFilter</filter-class>
- <init-param>
- <param-name>ssoServerUrl</param-name>
- <param-value>http://localhost:8888/cas</param-value>
- </init-param>
- <init-param>
- <param-name>casRenewTicket</param-name>
- <param-value>false</param-value>
- </init-param>
- <init-param>
- <param-name>casServiceUrl</param-name>
- <param-value>http://localhost:8080/portal/initiatessologin</param-value>
- </init-param>
- <init-param>
- <param-name>loginUrl</param-name>
- <param-value>http://localhost:8080/portal/dologin</param-value>
- </init-param>
- </filter>
-
- <!-- Mapping the filters at the very top of the filter chain -->
- <filter-mapping>
- <filter-name>LoginRedirectFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>CASLogoutFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
+ <filter>
+ <filter-name>LoginRedirectFilter</filter-name>
+ <filter-class>org.gatein.sso.agent.filter.LoginRedirectFilter</filter-class>
+ <init-param>
+ <!-- This should point to your SSO authentication server -->
+ <param-name>LOGIN_URL</param-name>
+ <!--
+ If casRenewTicket param value of InitiateLoginServlet is: not specified or false
+ -->
+ <param-value>http://localhost:8888/cas/login?service=
+ http://localhost:8080/portal/initiatessologin</param-value>
+ <!--
+ If casRenewTicket param value of InitiateLoginServlet is : true
+ -->
+ <!--
+ <param-value>http://localhost:8888/cas/login?
+ service=http://localhost:8080/portal/initiatessologin&renew=true</param-value>
+ -->
+ </init-param>
+ </filter>
+ <filter>
+ <filter-name>CASLogoutFilter</filter-name>
+ <filter-class>org.gatein.sso.agent.filter.CASLogoutFilter</filter-class>
+ <init-param>
+ <!-- This should point to your JOSSO authentication server -->
+ <param-name>LOGOUT_URL</param-name>
+ <param-value>http://localhost:8888/cas/logout</param-value>
+ </init-param>
+ </filter>
+ <filter>
+ <filter-name>InitiateLoginFilter</filter-name>
+ <filter-class>org.gatein.sso.agent.filter.InitiateLoginFilter</filter-class>
+ <init-param>
+ <param-name>ssoServerUrl</param-name>
+ <param-value>http://localhost:8888/cas</param-value>
+ </init-param>
+ <init-param>
+ <param-name>casRenewTicket</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ <init-param>
+ <param-name>casServiceUrl</param-name>
+ <param-value>http://localhost:8080/portal/initiatessologin</param-value>
+ </init-param>
+ <init-param>
+ <param-name>loginUrl</param-name>
+ <param-value>http://localhost:8080/portal/dologin</param-value>
+ </init-param>
+ </filter>
+
+ <!-- Mapping the filters at the very top of the filter chain -->
+ <filter-mapping>
+ <filter-name>LoginRedirectFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>CASLogoutFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
<filter-mapping>
<filter-name>InitiateLoginFilter</filter-name>
<url-pattern>/initiatessologin</url-pattern>
</filter-mapping>
]]>
</programlisting>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- Once these changes have been made, all links to the user authentication pages will redirect to the CAS centralized authentication form.
- </para>
- </section>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Once these changes have been made, all links to the user authentication pages will redirect to the CAS centralized authentication form.
+ </para>
+ </section>
</section>
@@ -610,10 +610,10 @@
<filter-name>LoginRedirectFilter</filter-name>
<filter-class>org.gatein.sso.agent.filter.LoginRedirectFilter</filter-class>
<init-param>
- <!-- This should point to your SSO authentication server -->
- <param-name>LOGIN_URL</param-name>
- <param-value>http://localhost:8888/josso/signon/login.do?
- josso_back_to=http://localhost:8080/portal/initiatessologin</param-value>
+ <!-- This should point to your SSO authentication server -->
+ <param-name>LOGIN_URL</param-name>
+ <param-value>http://localhost:8888/josso/signon/login.do?
+ josso_back_to=http://localhost:8080/portal/initiatessologin</param-value>
</init-param>
</filter>
<filter>
@@ -626,17 +626,17 @@
</init-param>
</filter>
<filter>
- <filter-name>InitiateLoginFilter</filter-name>
- <filter-class>org.gatein.sso.agent.filter.InitiateLoginFilter</filter-class>
- <init-param>
- <param-name>ssoServerUrl</param-name>
- <param-value>http://localhost:8888/josso/signon/login.do</param-value>
- </init-param>
- <init-param>
- <param-name>loginUrl</param-name>
- <param-value>http://localhost:8080/portal/dologin</param-value>
- </init-param>
- </filter>
+ <filter-name>InitiateLoginFilter</filter-name>
+ <filter-class>org.gatein.sso.agent.filter.InitiateLoginFilter</filter-class>
+ <init-param>
+ <param-name>ssoServerUrl</param-name>
+ <param-value>http://localhost:8888/josso/signon/login.do</param-value>
+ </init-param>
+ <init-param>
+ <param-name>loginUrl</param-name>
+ <param-value>http://localhost:8080/portal/dologin</param-value>
+ </init-param>
+ </filter>
<!-- filters should be placed at the very top of the filter chain -->
<filter-mapping>
@@ -653,23 +653,20 @@
</filter-mapping>
]]>
</programlisting>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- From now on, all links redirecting to the user authentication pages will redirect to the JOSSO centralized authentication form.
- </para>
- </section>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ From now on, all links redirecting to the user authentication pages will redirect to the JOSSO centralized authentication form.
+ </para>
+ </section>
</section>
<section id="sect-Reference_Guide-Single_Sign_On-OpenSSO_The_Open_Web_SSO_project">
<title>OpenSSO - The Open Web SSO project</title>
<para>
- This Single Sign On plugin enables seamless integration between &PRODUCT; and the OpenSSO Single Sign On Framework. Details about OpenSSO can be found <ulink url="https://opensso.dev.java.net/">here</ulink>.
- </para>
- <para>
Setting up this integration involves two steps. The first step is to install or configure an OpenSSO server, and the second is to set up the portal to use the OpenSSO server.
</para>
<section id="sect-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-OpenSSO_server">
@@ -682,11 +679,14 @@
</para>
<section id="sect-Reference_Guide-OpenSSO_server-Obtaining_OpenSSO">
<title>Obtaining OpenSSO</title>
- <para>
+ <!--<para>
OpenSSO can be downloaded from <ulink type="http" url="http://download.oracle.com/otn/nt/middleware/11g/oracle_opensso_80U2.zip">http://download.oracle.com/otn/nt/middleware/11g/oracle_opensso_80U2.zip</ulink>.
</para>
<para>
Once downloaded, extract the package into a suitable location. This location will be referred to as <filename>OPENSSO_HOME</filename> in this example.
+ </para> -->
+ <para>
+ OpenSSO must be purchased from <ulink type="http" url="http://www.oracle.com/technetwork/middleware/id-mgmt/overview/index.html">Oracle</ulink>.
</para>
</section>
@@ -935,10 +935,10 @@
<filter-name>LoginRedirectFilter</filter-name>
<filter-class>org.gatein.sso.agent.filter.LoginRedirectFilter</filter-class>
<init-param>
- <!-- This should point to your SSO authentication server -->
- <param-name>LOGIN_URL</param-name>
- <param-value>http://localhost:8888/opensso/UI/Login?
- realm=gatein&goto=http://localhost:8080/portal/initiatessologin</param-value>
+ <!-- This should point to your SSO authentication server -->
+ <param-name>LOGIN_URL</param-name>
+ <param-value>http://localhost:8888/opensso/UI/Login?
+ realm=gatein&goto=http://localhost:8080/portal/initiatessologin</param-value>
</init-param>
</filter>
<filter>
@@ -951,21 +951,21 @@
</init-param>
</filter>
<filter>
- <filter-name>InitiateLoginFilter</filter-name>
- <filter-class>org.gatein.sso.agent.filter.InitiateLoginFilter</filter-class>
- <init-param>
- <param-name>ssoServerUrl</param-name>
- <param-value>hhttp://localhost:8888/opensso</param-value>
- </init-param>
- <init-param>
- <param-name>loginUrl</param-name>
- <param-value>http://localhost:8080/portal/dologin</param-value>
- </init-param>
- <init-param>
+ <filter-name>InitiateLoginFilter</filter-name>
+ <filter-class>org.gatein.sso.agent.filter.InitiateLoginFilter</filter-class>
+ <init-param>
+ <param-name>ssoServerUrl</param-name>
+ <param-value>hhttp://localhost:8888/opensso</param-value>
+ </init-param>
+ <init-param>
+ <param-name>loginUrl</param-name>
+ <param-value>http://localhost:8080/portal/dologin</param-value>
+ </init-param>
+ <init-param>
<param-name>ssoCookieName</param-name>
<param-value>iPlanetDirectoryPro</param-value>
</init-param>
- </filter>
+ </filter>
<!-- place the filters at the top of the filter chain -->
<filter-mapping>
@@ -982,14 +982,14 @@
</filter-mapping>
]]>
</programlisting>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- From now on, all links redirecting to the user authentication pages will redirect to the OpenSSO centralized authentication form.
- </para>
- </section>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ From now on, all links redirecting to the user authentication pages will redirect to the OpenSSO centralized authentication form.
+ </para>
+ </section>
</section>
13 years, 2 months
gatein SVN: r7756 - epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity.
by do-not-reply@jboss.org
Author: smumford
Date: 2011-10-17 18:42:30 -0400 (Mon, 17 Oct 2011)
New Revision: 7756
Modified:
epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/SSO.xml
Log:
JBEPP-1239: Updated OpenSSO to point to Oracle
Modified: epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/SSO.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/SSO.xml 2011-10-17 22:42:18 UTC (rev 7755)
+++ epp/docs/branches/5.2/Reference_Guide-eXoJCR-1.14/en-US/modules/AuthenticationAndIdentity/SSO.xml 2011-10-17 22:42:30 UTC (rev 7756)
@@ -887,16 +887,13 @@
<section id="sect-Reference_Guide-SSO_Single_Sign_On-OpenSSO_The_Open_Web_SSO_project">
<title>OpenSSO - The Open Web SSO project</title>
<para>
- This Single Sign On plugin enables seamless integration between JBoss Enterprise Portal Platform and the Open Web SSO project (<emphasis role="bold">OpenSSO</emphasis>) Single Sign On Framework. Details about OpenSSO can be found <ulink url="https://opensso.dev.java.net/">here</ulink>.
- </para>
- <para>
This section details the setting up of OpenSSO server to authenticate against the JBoss Enterprise Portal Platform login module.
</para>
<procedure id="proc-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Obtaining_OpenSSO">
<title>Obtaining OpenSSO</title>
<step>
<para>
- OpenSSO must be purchased from Oracle.
+ OpenSSO must be purchased from <ulink type="http" url="http://www.oracle.com/technetwork/middleware/id-mgmt/overview/index.html">Oracle</ulink>.
</para>
</step>
13 years, 2 months
gatein SVN: r7755 - epp/docs/branches/5.2/Reference_Guide/en-US/modules/AuthenticationAndIdentity.
by do-not-reply@jboss.org
Author: smumford
Date: 2011-10-17 18:42:18 -0400 (Mon, 17 Oct 2011)
New Revision: 7755
Modified:
epp/docs/branches/5.2/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
Log:
JBEPP-1239: Updated OpenSSO to point to Oracle
Modified: epp/docs/branches/5.2/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
===================================================================
--- epp/docs/branches/5.2/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2011-10-17 19:47:23 UTC (rev 7754)
+++ epp/docs/branches/5.2/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2011-10-17 22:42:18 UTC (rev 7755)
@@ -757,16 +757,13 @@
<section id="sect-Reference_Guide-SSO_Single_Sign_On-OpenSSO_The_Open_Web_SSO_project">
<title>OpenSSO - The Open Web SSO project</title>
<para>
- This Single Sign On plugin enables seamless integration between JBoss Enterprise Portal Platform and the Open Web SSO project (<emphasis role="bold">OpenSSO</emphasis>) Single Sign On Framework. Details about OpenSSO can be found <ulink url="https://opensso.dev.java.net/">here</ulink>.
- </para>
- <para>
This section details the setting up of OpenSSO server to authenticate against the JBoss Enterprise Portal Platform login module.
</para>
<procedure id="proc-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Obtaining_OpenSSO">
<title>Obtaining OpenSSO</title>
<step>
<para>
- OpenSSO must be purchased from Oracle.
+ OpenSSO must be purchased from <ulink type="http" url="http://www.oracle.com/technetwork/middleware/id-mgmt/overview/index.html">Oracle</ulink>.
</para>
</step>
13 years, 2 months
gatein SVN: r7754 - in components/wsrp/trunk: consumer/src/test/java/org/gatein/wsrp/consumer/registry and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-10-17 15:47:23 -0400 (Mon, 17 Oct 2011)
New Revision: 7754
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/registry/ConsumerRegistryTestCase.java
components/wsrp/trunk/jcr-impl/src/test/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistryTestCase.java
Log:
- Try to activate consumers when we create them if they are marked as active
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java 2011-10-17 18:09:59 UTC (rev 7753)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java 2011-10-17 19:47:23 UTC (rev 7754)
@@ -200,7 +200,7 @@
// make sure we set the registry after loading from DB since registry is not persisted.
// producerInfo.setRegistry(this);
- final WSRPConsumerImpl consumer = new WSRPConsumerImpl(producerInfo);
+ final WSRPConsumerImpl consumer = createAndActivateIfNeeded(producerInfo);
// cache consumer
consumers.putConsumer(producerInfo.getId(), consumer);
@@ -208,6 +208,18 @@
return consumer;
}
+ private WSRPConsumerImpl createAndActivateIfNeeded(ProducerInfo producerInfo)
+ {
+ final WSRPConsumerImpl consumer = new WSRPConsumerImpl(producerInfo);
+
+ // try to activate consumer if it's marked as active and isn't yet
+ if (producerInfo.isActive() && !consumer.isActive())
+ {
+ activateConsumer(consumer);
+ }
+ return consumer;
+ }
+
public void activateConsumerWith(String id) throws ConsumerException
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "Consumer identifier", "Activating a Consumer");
@@ -505,7 +517,7 @@
while (infosFromStorage.hasNext())
{
ProducerInfo info = infosFromStorage.next();
- consumers.put(info.getId(), createConsumerFrom(info));
+ consumers.put(info.getId(), createAndActivateIfNeeded(info));
}
lastModified = System.currentTimeMillis();
setInvalidated(false);
@@ -528,7 +540,7 @@
ProducerInfo info = loadProducerInfo(id);
if (info != null)
{
- consumer = createConsumerFrom(info);
+ consumer = createAndActivateIfNeeded(info);
}
}
return consumer;
@@ -584,7 +596,7 @@
{
info = loadProducerInfo(id);
}
- consumers.put(id, createConsumerFrom(info));
+ consumers.put(id, createAndActivateIfNeeded(info));
}
}
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java 2011-10-17 18:09:59 UTC (rev 7753)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java 2011-10-17 19:47:23 UTC (rev 7754)
@@ -81,6 +81,7 @@
{
// generate a UUID for ProducerInfo
info.setKey(UUID.randomUUID().toString());
+ keysToIds.put(info.getKey(), info.getId());
}
public void delete(ProducerInfo info)
Modified: components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/registry/ConsumerRegistryTestCase.java
===================================================================
--- components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/registry/ConsumerRegistryTestCase.java 2011-10-17 18:09:59 UTC (rev 7753)
+++ components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/consumer/registry/ConsumerRegistryTestCase.java 2011-10-17 19:47:23 UTC (rev 7754)
@@ -150,7 +150,7 @@
assertEquals(1, registry.getConfiguredConsumerNumber());
}
- public void testStoppingShouldntStartConsumers() throws Exception
+ public void testStoppingShouldNotStartConsumers() throws Exception
{
// fake marking consumer as active in persistence
ProducerInfo info = Mockito.mock(ProducerInfo.class);
@@ -159,9 +159,14 @@
Mockito.stub(info.getKey()).toReturn("fooKey");
EndpointConfigurationInfo endpoint = Mockito.mock(EndpointConfigurationInfo.class);
Mockito.stub(info.getEndpointConfigurationInfo()).toReturn(endpoint);
+ registry.save(info, "Couldn't save ProducerInfo");
+ WSRPConsumer original = registry.createConsumerFrom(info);
+
+ // since consumer is supposed to be active, the registry will attempt to start it:
+ assertEquals(original, registry.getFederatingPortletInvoker().getFederatedInvoker("foo").getPortletInvoker());
+
// create a consumer to spy from
- WSRPConsumer original = registry.createConsumerFrom(info);
WSRPConsumer consumer = Mockito.spy(original);
// force re-init of registry from "persistence" to ensure that the spy registry actually uses our spy consumer
@@ -173,14 +178,10 @@
assertTrue(foo.getProducerInfo().isActive());
assertEquals(consumer, foo);
- // start consumer and check that it's properly added to the FederatingPortletInvoker
- registrySpy.activateConsumer(foo);
- assertEquals(consumer, registrySpy.getFederatingPortletInvoker().getFederatedInvoker("foo").getPortletInvoker());
-
- // stop the consumer and then the registry and check that consumer.start has only been called once
+ // stop the consumer and then the registry and check that consumer.start hasn't been called
consumer.stop();
registrySpy.stop();
- Mockito.verify(consumer, Mockito.times(1)).start();
+ Mockito.verify(consumer, Mockito.times(0)).start();
// check that consumer is not known by the FederatingPortletInvoker anymore
assertEquals(null, registrySpy.getFederatingPortletInvoker().getFederatedInvoker("foo"));
Modified: components/wsrp/trunk/jcr-impl/src/test/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistryTestCase.java
===================================================================
--- components/wsrp/trunk/jcr-impl/src/test/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistryTestCase.java 2011-10-17 18:09:59 UTC (rev 7753)
+++ components/wsrp/trunk/jcr-impl/src/test/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistryTestCase.java 2011-10-17 19:47:23 UTC (rev 7754)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, 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.
@@ -88,7 +88,7 @@
}
@Override
- public void testStoppingShouldntStartConsumers() throws Exception
+ public void testStoppingShouldNotStartConsumers() throws Exception
{
// override to bypass this test as I couldn't find a way to make it work properly (i.e. how to inject a Mock
// into the registry to check that start is only called once)
13 years, 2 months