JBoss Portal SVN: r9068 - in branches/JBoss_Portal_Branch_2_6/core/src: bin/portal-core-war/css and 11 other directories.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2007-11-21 13:32:50 -0500 (Wed, 21 Nov 2007)
New Revision: 9068
Added:
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/css/
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/css/login.css
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/css/modal.css
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/login-content-bg.gif
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/login-header-bg.gif
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-black.png
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-gray.png
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-white-grad.png
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-white.png
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/js/
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/js/modal.js
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/1column/index.jsp
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/3columns/index.jsp
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/index.jsp
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/WEB-INF/web.xml
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/error.jsp
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/login.jsp
Log:
JBPORTAL-1789 :Improve login page of jboss-portal to match JBP LnF
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/css/login.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/css/login.css (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/css/login.css 2007-11-21 18:32:50 UTC (rev 9068)
@@ -0,0 +1,66 @@
+div.login-container {
+ font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
+ font-size: 11px;
+ width: 255px;
+ height: 155px;
+ border: 1px solid #436999;
+ position: relative;
+ margin: 0 auto 0 auto;
+ background-color:white;
+}
+
+input.login-button {
+ background-color: #5078AA;
+ border-color: #97B7C6 rgb( 37, 72, 105 ) rgb( 37, 72, 105 ) rgb( 151, 183, 198 );
+ border-style: solid;
+ border-width: 1px;
+ color: #FFFFFF;
+ font-size: 10px;
+ font-weight: bold;
+ position: absolute;
+ bottom: 20px;
+ right: 10px;
+ width: 70px;
+}
+
+div.login-container div.login-header {
+ background-image: url( ../images/modal/login-header-bg.gif );
+ background-position: top left;
+ background-repeat: repeat-x;
+ width: 255px;
+ height: 27px;
+ text-align: left;
+}
+
+div.login-container div.login-header h2 {
+ color: #fff;
+ font-weight: bold;
+ padding: 7px 0 0 5px;
+ margin: 0;
+ font-size: 11px;
+ text-align: left;
+}
+
+div.login-container div.login-content {
+ background-image: url( ../images/modal/login-content-bg.gif );
+ background-position: top left;
+ background-repeat: repeat-x;
+ width: 255px;
+ height: 116px;
+ font-weight: bold;
+ padding: 10px 0 0 0;
+ text-align: right;
+}
+
+div.login-container div.login-content div.form-field {
+ height: 25px;
+ padding-right: 7px;
+}
+
+div.error-message {
+ color: red;
+ margin: 0 auto 0 auto;
+ width: 300px;
+ font-family: Verdana, Arial, Helvetica, Sans-Serif, sans-serif;
+ font-size: 11px;
+}
\ No newline at end of file
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/css/modal.css
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/css/modal.css (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/css/modal.css 2007-11-21 18:32:50 UTC (rev 9068)
@@ -0,0 +1,50 @@
+
+/*Modal Window*/
+
+.modal {
+ background-color: #eee;
+ padding: 0;
+ border: 0;
+}
+.modal p {
+ margin: 8px 0;
+}
+
+.modal-details {
+ font-size: 8px;
+ padding-top: 4px;
+}
+
+.modal-caption {
+ float: left;
+}
+
+.loadingMsg {
+ float: right;
+}
+
+.modal img {
+ border: none;
+ clear: both;
+}
+
+.overlay img {
+ border: none;
+}
+
+.overlay {
+ background-image: url(../images/modal/overlay-black.png);
+}
+
+* html .overlay {
+ background-color: transparent;
+ background-image: url(blank.gif);
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../images/modal/overlay-black.png", sizingMethod="scale");
+}
+
+iframe.login-content{
+ padding:0;
+ margin:0;
+ border:0;
+}
+
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/login-content-bg.gif
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/login-content-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/login-header-bg.gif
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/login-header-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-black.png
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-black.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-gray.png
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-gray.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-white-grad.png
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-white-grad.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-white.png
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/modal/overlay-white.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/js/modal.js
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/js/modal.js (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/js/modal.js 2007-11-21 18:32:50 UTC (rev 9068)
@@ -0,0 +1,657 @@
+
+
+var loadingImage = 'loading.gif';
+var closeButton = 'close.gif';
+
+//
+// getPageScroll()
+// Returns array with x,y page scroll values.
+// Core code from - quirksmode.org
+//
+function getPageScroll(){
+
+ var yScroll;
+
+ if (self.pageYOffset) {
+ yScroll = self.pageYOffset;
+ } else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict
+ yScroll = document.documentElement.scrollTop;
+ } else if (document.body) {// all other Explorers
+ yScroll = document.body.scrollTop;
+ }
+
+ arrayPageScroll = new Array('',yScroll)
+ return arrayPageScroll;
+}
+
+
+//
+// getPageSize()
+// Returns array with page width, height and window width, height
+// Core code from - quirksmode.org
+//
+function getPageSize(){
+
+ var xScroll, yScroll;
+
+ if (window.innerHeight && window.scrollMaxY) {
+ xScroll = document.body.scrollWidth;
+ yScroll = window.innerHeight + window.scrollMaxY;
+ } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
+ xScroll = document.body.scrollWidth;
+ yScroll = document.body.scrollHeight;
+ } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
+ xScroll = document.body.offsetWidth;
+ yScroll = document.body.offsetHeight;
+ }
+
+ var windowWidth, windowHeight;
+ if (self.innerHeight) { // all except Explorer
+ windowWidth = self.innerWidth;
+ windowHeight = self.innerHeight;
+ } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
+ windowWidth = document.documentElement.clientWidth;
+ windowHeight = document.documentElement.clientHeight;
+ } else if (document.body) { // other Explorers
+ windowWidth = document.body.clientWidth;
+ windowHeight = document.body.clientHeight;
+ }
+
+ // for small pages with total height less then height of the viewport
+ if(yScroll < windowHeight){
+ pageHeight = windowHeight;
+ } else {
+ pageHeight = yScroll;
+ }
+
+ // for small pages with total width less then width of the viewport
+ if(xScroll < windowWidth){
+ pageWidth = windowWidth;
+ } else {
+ pageWidth = xScroll;
+ }
+
+
+ arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
+ return arrayPageSize;
+}
+
+
+//
+// pause(numberMillis)
+// Pauses code execution for specified time. Uses busy code, not good.
+// Code from http://www.faqts.com/knowledge_base/view.phtml/aid/1602
+//
+function pause(numberMillis) {
+ var now = new Date();
+ var exitTime = now.getTime() + numberMillis;
+ while (true) {
+ now = new Date();
+ if (now.getTime() > exitTime)
+ return;
+ }
+}
+
+//
+// getKey(key)
+// Gets keycode. If 'x' is pressed then it hides the Modal.
+//
+
+function getKey(e){
+ if (e == null) { // ie
+ keycode = event.keyCode;
+ } else { // mozilla
+ keycode = e.which;
+ }
+ key = String.fromCharCode(keycode).toLowerCase();
+
+ if(key == 'x'){ hideContentModal(); }
+}
+
+
+//
+// listenKey()
+//
+function listenKey () {
+ document.onkeypress = getKey;
+}
+
+
+//
+// showModal()
+// Preloads images. Pleaces new image in Modal then centers and displays.
+//
+function showModal(objLink) {
+ try{
+ // prep objects
+ var objOverlay = document.getElementById('overlay');
+ var objModal = document.getElementById('modal');
+ var objCaption = document.getElementById('modal-caption');
+ var objImage = document.getElementById('modal-image');
+ var objLoadingImage = document.getElementById('loadingImage');
+ var objModalDetails = document.getElementById('modal-details');
+
+ var arrayPageSize = getPageSize();
+ var arrayPageScroll = getPageScroll();
+
+ // center loadingImage if it exists
+ if (objLoadingImage) {
+ objLoadingImage.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - objLoadingImage.height) / 2) + 'px');
+ objLoadingImage.style.left = (((arrayPageSize[0] - 20 - objLoadingImage.width) / 2) + 'px');
+ objLoadingImage.style.display = 'block';
+ }
+
+ // set height and width of Overlay to take up whole page and show
+ objOverlay.style.height = (arrayPageSize[1] + 'px');
+ objOverlay.style.width = (arrayPageSize[2] + 'px');
+ objOverlay.style.display = 'block';
+
+ // preload image
+ imgPreload = new Image();
+
+ imgPreload.onload=function(){
+ objImage.src = objLink;
+
+ // center Modal and make sure that the top and left values are not negative
+ // and the image placed outside the viewport
+ var ModalTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - imgPreload.height) / 2);
+ var ModalLeft = ((arrayPageSize[0] - 20 - imgPreload.width) / 2);
+
+ objModal.style.top = (ModalTop < 0) ? "0px" : ModalTop + "px";
+ objModal.style.left = (ModalLeft < 0) ? "0px" : ModalLeft + "px";
+
+
+ objModalDetails.style.width = imgPreload.width + 'px';
+
+ //objCaption.innerHTML = "Loading...";
+
+
+ // A small pause between the image loading and displaying is required with IE,
+ // this prevents the previous image displaying for a short burst causing flicker.
+ if (navigator.appVersion.indexOf("MSIE")!=-1){
+ pause(250);
+ }
+
+ if (objLoadingImage) {
+ objLoadingImage.style.display = 'none';
+ }
+
+ // Hide select boxes as they will 'peek' through the image in IE
+ //TODO - Need to add a condition form ajax submit so these are hidden during modal showing
+ //TODO - For now I will comment out
+ selects = document.getElementsByTagName("select");
+ //for (i = 0; i != selects.length; i++) {
+ //selects[i].style.visibility = "hidden";
+ //}
+
+ objModal.style.display = 'block';
+
+ // After image is loaded, update the overlay height as the new image might have
+ // increased the overall page height.
+ arrayPageSize = getPageSize();
+ objOverlay.style.height = (arrayPageSize[1] + 'px');
+
+ // Check for 'x' keypress
+ listenKey();
+
+ return false;
+ }
+
+ imgPreload.src = objLink;
+
+ }catch(Exception){
+
+ }
+}
+
+//
+// hideModal()
+//
+function hideModal()
+{
+ // get objects
+ objOverlay = document.getElementById('overlay');
+ objModal = document.getElementById('modal');
+
+ // hide Modal and overlay
+ objOverlay.style.display = 'none';
+ objModal.style.display = 'none';
+
+ // make select boxes visible
+ selects = document.getElementsByTagName("select");
+ for (i = 0; i != selects.length; i++) {
+ selects[i].style.visibility = "visible";
+ }
+
+ // disable keypress listener
+ document.onkeypress = '';
+
+}
+
+function hideContentModal(modalId)
+{
+ // get objects
+ objModal = document.getElementById(modalId + '-modal');
+
+ document.getElementById(modalId + "-overlay").style.display = 'none';
+
+ // hide Modal and overlay
+ objModal.style.display = 'none';
+
+ // make select boxes visible
+ selects = document.getElementsByTagName("select");
+ for (i = 0; i != selects.length; i++) {
+ selects[i].style.visibility = "visible";
+ }
+
+ // disable keypress listener
+ //document.onkeypress = '';
+
+}
+
+//
+// initLoadingModal()
+//
+function initModal()
+{
+ try{
+ var objBody = document.getElementById("loading-modal");
+
+ // create overlay div and hardcode some functional styles (aesthetic styles are in CSS file)
+ var objOverlay = document.createElement("div");
+ objOverlay.setAttribute('id','overlay');
+ objOverlay.className = 'overlay';
+ //objOverlay.onclick = function () {hideModal(); return false;}
+ objOverlay.style.display = 'none';
+ objOverlay.style.position = 'absolute';
+ objOverlay.style.top = '0';
+ objOverlay.style.left = '0';
+ objOverlay.style.zIndex = '90';
+ objOverlay.style.width = '100%';
+ objBody.insertBefore(objOverlay, objBody.firstChild);
+ var arrayPageSize = getPageSize();
+ var arrayPageScroll = getPageScroll();
+
+ // preload and create loader image
+ var imgPreloader = new Image();
+
+ // if loader image found, create link to hide Modal and create loadingimage
+ imgPreloader.onload=function(){
+
+ var objLoadingImageLink = document.createElement("a");
+ objLoadingImageLink.setAttribute('href','#');
+ objLoadingImageLink.onclick = function () {hideModal(); return false;}
+ objOverlay.appendChild(objLoadingImageLink);
+
+ var objLoadingImage = document.createElement("img");
+ objLoadingImage.src = loadingImage;
+ objLoadingImage.setAttribute('id','loading-image');
+ objLoadingImage.style.position = 'absolute';
+ objLoadingImage.style.zIndex = '150';
+ objLoadingImageLink.appendChild(objLoadingImage);
+
+ imgPreloader.onload=function(){}; // clear onLoad, as IE will flip out w/animated gifs
+
+ return false;
+ }
+
+ imgPreloader.src = loadingImage;
+
+ // create Modal div, same note about styles as above
+ var objModal = document.createElement("div");
+ objModal.setAttribute('id','modal');
+ objModal.className = 'modal';
+ objModal.style.display = 'none';
+ objModal.style.position = 'absolute';
+ objModal.style.zIndex = '100';
+ objBody.insertBefore(objModal, objOverlay.nextSibling);
+
+ // create link
+ var objLink = document.createElement("a");
+ objLink.setAttribute('href','#');
+ objLink.setAttribute('title','Click to close');
+ objLink.onclick = function () {hideModal(); return false;}
+ objModal.appendChild(objLink);
+
+ // preload and create close button image
+ var imgPreloadCloseButton = new Image();
+
+ // if close button image found,
+ imgPreloadCloseButton.onload=function(){
+
+ var objCloseButton = document.createElement("img");
+ objCloseButton.src = closeButton;
+ objCloseButton.setAttribute('id','close-button');
+ objCloseButton.style.position = 'absolute';
+ objCloseButton.style.zIndex = '200';
+ objLink.appendChild(objCloseButton);
+
+ return false;
+ }
+
+ imgPreloadCloseButton.src = closeButton;
+
+ // create image
+ var objImage = document.createElement("img");
+ objImage.setAttribute('id','modal-image');
+ objLink.appendChild(objImage);
+
+ // create details div, a container for the caption and keyboard message
+ var objModalDetails = document.createElement("div");
+ objModalDetails.setAttribute('id','modal-details');
+ objModalDetails.className = 'modal-details';
+ objModal.appendChild(objModalDetails);
+
+ // create caption
+ var objCaption = document.createElement("div");
+ objCaption.setAttribute('id','modal-caption');
+ objCaption.className = 'modal-caption';
+ objCaption.style.display = 'none';
+ objModalDetails.appendChild(objCaption);
+
+ // create keyboard message
+/*
+ var objLoadingMsg = document.createElement("div");
+ objLoadingMsg.setAttribute('id','loadingMsg');
+ objLoadingMsg.className = 'loadingMsg';
+ objLoadingMsg.innerHTML = 'Loading...';
+ objModalDetails.appendChild(objLoadingMsg);
+*/
+ showModal('/portal/images/modal/loading.gif');
+
+ }catch(Exception){
+
+ }
+}
+
+//#######################ContentModal
+
+function alertModal(modalId,msgContainer){
+ if (modalId == null){
+ modalId = 'content-modal';
+ }
+ if (msgContainer == null) {
+ msgContainer = 'message-container';
+ }
+ initContentModal(modalId);
+ showContentModal(modalId,msgContainer);
+}
+//
+// showModal()
+// Preloads images. Pleaces new image in Modal then centers and displays.
+//
+function showContentModal(modalId,msgContainer) {
+ try{
+ var messageContainer = (msgContainer ? msgContainer : 'message-container');
+
+ // prep objects
+ var objModalContainer = document.getElementById(modalId);
+ var objOverlay = document.getElementById(modalId + '-overlay');
+ var objModal = document.getElementById(modalId + '-modal');
+ var objCaption = document.getElementById(modalId + '-modal-caption');
+ var objImage = document.getElementById(modalId + '-modal-image');
+ var objLoadingImage = document.getElementById(modalId + '-loadingImage');
+ //var objModalDetails = document.getElementById('modal-details');
+ var contentBody = document.getElementById(messageContainer);
+ var contentWidth = contentBody.style.width.substring(0,contentBody.style.width.indexOf("px"));
+ var contentHeight = contentBody.style.height.substring(0,contentBody.style.width.indexOf("px"));
+
+ var arrayPageSize = getPageSize();
+ var arrayPageScroll = getPageScroll();
+
+ // center loadingImage if it exists
+ if (objLoadingImage) {
+ objLoadingImage.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - objLoadingImage.height) / 2) + 'px');
+ objLoadingImage.style.left = (((arrayPageSize[0] - 20 - objLoadingImage.width) / 2) + 'px');
+ objLoadingImage.style.display = 'block';
+ }
+ // set height and width of Overlay to take up whole page and show
+ objOverlay.style.height = (arrayPageSize[1] + 'px');
+ objOverlay.style.width = (arrayPageSize[2] + 'px');
+ objOverlay.style.display = 'block';
+
+
+
+ // center Modal and make sure that the top and left values are not negative
+ // and the image placed outside the viewport
+ var ModalTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - contentHeight) / 2);
+ var ModalLeft = ((arrayPageSize[0] - 20 - contentWidth) / 2);
+
+ objModal.style.top = (ModalTop < 0) ? "0px" : ModalTop + "px";
+ objModal.style.left = (ModalLeft < 0) ? "0px" : ModalLeft + "px";
+
+
+ objModal.style.width = contentWidth + 'px';
+
+ //objCaption.innerHTML = document.getElementById("errorMessages").innerHTML;
+
+
+ // A small pause between the image loading and displaying is required with IE,
+ // this prevents the previous image displaying for a short burst causing flicker.
+ if (navigator.appVersion.indexOf("MSIE")!=-1){
+ pause(250);
+ }
+
+ if (objLoadingImage) {
+ objLoadingImage.style.display = 'none';
+ }
+
+ // Hide select boxes as they will 'peek' through the image in IE
+
+ selects = document.getElementsByTagName("select");
+ //had to hard-code a check to see if we are forcing this to be hidden.
+ //if so, then do not hide selectboxes; because the modal is not being shown
+ //alert(document.getElementById("content-modal").style.display == 'none');
+ var hideSelects = true;
+ try{
+ if (!document.getElementById(modalId).style.display == 'none'){
+ hideSelects = false;
+ }
+ }catch(Exception){
+ //alert(Exception);
+ }
+
+ if (hideSelects || !document.getElementById(modalId).style.display == 'none'){
+ //alert("test");
+ for (i = 0; i != selects.length; i++) {
+ selects[i].style.visibility = "hidden";
+ }
+ }
+
+ objModal.style.display = 'block';
+ objModalContainer.style.display = 'block';
+ // After image is loaded, update the overlay height as the new image might have
+ // increased the overall page height.
+ arrayPageSize = getPageSize();
+ objOverlay.style.height = (arrayPageSize[1] + 'px');
+
+ // Check for 'x' keypress
+ listenKey();
+
+ }catch(Exception){
+
+ }
+}
+
+//
+// initLoadingModal()
+//
+function initContentModal(modalId)
+{
+
+ try{
+ if (modalId == null){
+ modalId = 'content-modal';
+ }
+
+ var objBody = document.getElementById(modalId);
+ //get the first div - which is message-container
+ var contentBody = objBody.getElementsByTagName('div')[0];
+
+ var contentWidth = contentBody.style.width.substring(0,contentBody.style.width.indexOf("px"));
+ var contentHeight = contentBody.style.height.substring(0,contentBody.style.width.indexOf("px"));
+
+ var hasObjOverlay = document.getElementById(modalId + '-overlay');
+
+ if(!hasObjOverlay) { //don't create if already exist.
+ // create overlay div and hardcode some functional styles (aesthetic styles are in CSS file)
+ var objOverlay = document.createElement("div");
+ objOverlay.setAttribute('id',modalId + '-overlay');
+ objOverlay.className = 'overlay';
+
+ objOverlay.style.display = 'none';
+ objOverlay.style.position = 'absolute';
+ objOverlay.style.top = '0';
+ objOverlay.style.left = '0';
+ objOverlay.style.zIndex = '90';
+ objOverlay.style.width = '100%';
+ objOverlay.onclick = function (){hideContentModal(modalId); return false};
+
+ objBody.insertBefore(objOverlay, objBody.firstChild);
+
+ var arrayPageSize = getPageSize();
+ var arrayPageScroll = getPageScroll();
+
+ // create Modal div, same note about styles as above
+ var objModal = document.createElement("div");
+ objModal.setAttribute('id',modalId + '-modal');
+ objModal.className = 'modal';
+ objModal.style.display = 'none';
+ objModal.style.position = 'absolute';
+ objModal.style.zIndex = '100';
+ objModal.style.width = contentWidth + 'px';
+ objModal.style.height = contentHeight + 'px';
+ objModal.innerHTML = contentBody.innerHTML;
+ objBody.insertBefore(objModal, objOverlay.nextSibling);
+ }
+ }catch(Exception){
+
+ }
+}
+
+function getComponentSize(componentId){
+
+ var componentWidth;
+ var componentHeight;
+ var componentTop;
+ var componentLeft;
+
+ var component = document.getElementById(componentId);
+
+ componentWidth = component.clientWidth;
+ componentHeight = component.clientHeight;
+ componentLeft = component.offsetLeft;
+ componentTop = component.offsetTop;
+
+ return new Array(componentWidth,componentHeight,componentLeft,componentTop);
+
+}
+
+//This creates a modal window per component.
+//currently used during ajax calls only in the a4j:status tag
+function createComponentModal(componentId){
+ try{
+ var loadingModal = document.getElementById("loading-modal");
+
+ var loadingImage = "/portal/images/modal/loading.gif"
+
+ var arrayComponentSize = getComponentSize(componentId);
+ var overlayTop = (arrayComponentSize[3]);
+ var overlayLeft = (arrayComponentSize[2]);
+ var overlayHeight = (arrayComponentSize[1]);
+ var overlayWidth = (arrayComponentSize[0]);
+
+ // create overlay div and hardcode some functional styles (aesthetic styles are in CSS file)
+ var objOverlay = document.getElementById(componentId + 'overlay');
+
+ if (!objOverlay){
+ objOverlay = document.createElement("div");
+ objOverlay.setAttribute('id',componentId + 'overlay');
+ objOverlay.className = 'overlay';
+ objOverlay.style.position = 'absolute';
+ objOverlay.style.display = 'block';
+ }
+
+ objOverlay.style.height = (overlayHeight + 'px');
+ objOverlay.style.width = (overlayWidth + 'px');
+
+
+ loadingModal.insertBefore(objOverlay, loadingModal.firstChild);
+
+ // create Modal div, same note about styles as above
+ var objModal = document.getElementById(componentId + 'modal');
+
+ if (!objModal){
+ objModal = document.createElement("div");
+ objModal.setAttribute('id',componentId + 'modal');
+ objModal.className = 'modal';
+ objOverlay.appendChild(objModal);
+ }
+
+ // preload and create loader image
+ var imgPreloader = new Image();
+
+ // if loader image found, create link to hide Modal and create loadingimage
+ //imgPreloader.onload=function(){
+
+ /*var objLoadingImageLink = document.getElementById(componentId + 'ImageLink');
+
+ if (!objLoadingImageLink){
+ objLoadingImageLink.setAttribute('href','#');
+ objLoadingImageLink.onclick = function () {hideModal(); return false;}
+ objLoadingImageLink.setAttribute('id',componentId + 'ImageLink');
+ objModal.appendChild(objLoadingImageLink);
+ }*/
+
+ var objLoadingImageWidth = "100";
+ var objLoadingImage = document.getElementById(componentId + 'loading-image')
+
+ if(!objLoadingImage){
+ objLoadingImage = document.createElement("img");
+ objLoadingImage.src = loadingImage;
+ objLoadingImage.setAttribute('id',componentId + 'loading-image');
+ objLoadingImage.style.position = 'relative';
+ objLoadingImage.style.width = objLoadingImageWidth + 'px';
+ objModal.appendChild(objLoadingImage);
+ }
+
+ imgPreloader.onload=function(){}; // clear onLoad, as IE will flip out w/animated gifs
+
+ if (objLoadingImage) {
+ objLoadingImage.style.display = 'block';
+ }
+
+ var ModalTop = ((overlayHeight - 35 - imgPreloader.height) / 2);
+ var ModalLeft = ((overlayWidth - 20 - objLoadingImageWidth) / 2);
+
+ objModal.style.top = (ModalTop < 0) ? "0px" : ModalTop + "px";
+ objModal.style.left = (ModalLeft < 0) ? "0px" : ModalLeft + "px";
+ objModal.style.width = objLoadingImageWidth + 'px';
+ objModal.style.display = 'block';
+ objModal.style.position = 'relative';
+
+
+
+ if (navigator.appVersion.indexOf("MSIE")!=-1){
+ pause(250);
+ }
+
+ objOverlay.style.top = (arrayComponentSize[3] + 'px');
+ objOverlay.style.left = (arrayComponentSize[2] + 'px');
+ objOverlay.style.height = (arrayComponentSize[1] + 'px');
+ objOverlay.style.width = (arrayComponentSize[0] + 'px');
+ objOverlay.style.zIndex = 0;
+ objOverlay.style.position = 'absolute';
+
+ return false;
+ //}
+
+ imgPreloader.src = loadingImage;
+
+
+ }catch(Exception){
+
+ }
+
+}
+
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/1column/index.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/1column/index.jsp 2007-11-21 17:32:46 UTC (rev 9067)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/1column/index.jsp 2007-11-21 18:32:50 UTC (rev 9068)
@@ -16,6 +16,7 @@
<body id="body">
<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
+<%@ include file="../common/modal.jsp" %>
<div id="portal-container">
<div id="sizer">
<div id="expander">
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/3columns/index.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/3columns/index.jsp 2007-11-21 17:32:46 UTC (rev 9067)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/3columns/index.jsp 2007-11-21 18:32:50 UTC (rev 9068)
@@ -16,6 +16,7 @@
<body id="body">
<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
+<%@ include file="../common/modal.jsp" %>
<div id="portal-container">
<div id="sizer">
<div id="expander">
@@ -52,8 +53,7 @@
</table>
<hr class="cleaner"/>
</div>
- </div>
- </div>
+
</div>
<!-- TODO: Fix the auto jump in this tag -->
Added: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/common/modal.jsp 2007-11-21 18:32:50 UTC (rev 9068)
@@ -0,0 +1,8 @@
+<script src="/portal-core/js/modal.js" type="text/javascript"></script>
+<link rel="stylesheet" href="/portal-core/css/modal.css" type="text/css" />
+<div id="login-modal" style="display:none">
+ <div id="login-modal-msg" style="display:none;width:257px;height:157px">
+ <% String loginHeight = "100%"; %>
+ <iframe src="/portal/auth/?loginheight=0" frameborder="0" width="257" height="157" scrolling="no" marginheight="0" marginwidth="0" name="login-content" class="login-content"></iframe>
+ </div>
+</div>
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/index.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/index.jsp 2007-11-21 17:32:46 UTC (rev 9067)
+++ branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/layouts/generic/index.jsp 2007-11-21 18:32:50 UTC (rev 9068)
@@ -16,12 +16,13 @@
<body id="body">
<p:region regionName='AJAXScripts' regionID='AJAXScripts'/>
+<%@ include file="../common/modal.jsp" %>
<div id="portal-container">
<div id="sizer">
<div id="expander">
<div id="logoName"></div>
<table border="0" cellpadding="0" cellspacing="0" id="header-container">
- <tr>
+ <tr>
<td align="center" valign="top" id="header">
<!-- Utility controls -->
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2007-11-21 17:32:46 UTC (rev 9067)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/header/header.jsp 2007-11-21 18:32:50 UTC (rev 9068)
@@ -16,7 +16,15 @@
if (user == null)
{
%>
-<a href="<%= loginURL %>">Login</a>
+
+ <script type="text/javascript">
+ document.write('<a href=\"#\" onclick=\"alertModal(\'login-modal\',\'login-modal-msg\');return false;\">Login</a>');
+ </script>
+
+<noscript>
+ <a href="<%= loginURL %>">Login</a>
+</noscript>
+
<%
}
else
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/WEB-INF/web.xml 2007-11-21 17:32:46 UTC (rev 9067)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/WEB-INF/web.xml 2007-11-21 18:32:50 UTC (rev 9068)
@@ -108,10 +108,6 @@
<url-pattern>/login.jsp</url-pattern>
</servlet-mapping>
<servlet-mapping>
- <servlet-name>jsp</servlet-name>
- <url-pattern>/error.jsp</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/images/login_bottom.png</url-pattern>
</servlet-mapping>
@@ -215,7 +211,7 @@
<realm-name>JBoss Portal</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
- <form-error-page>/error.jsp</form-error-page>
+ <form-error-page>/login.jsp</form-error-page>
</form-login-config>
</login-config>
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/error.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/error.jsp 2007-11-21 17:32:46 UTC (rev 9067)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/error.jsp 2007-11-21 18:32:50 UTC (rev 9068)
@@ -20,99 +20,13 @@
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<!--
-| Uncomment to enable JOSSO server based SSO authentication.
-| Redirects the user to the propper login page. Configured as the login url the web.xml for this application.
--->
-
-<%
- /* response.sendRedirect(request.getContextPath() + "/josso_login/"); */
-%>
-
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <style>
- body {
- background-color: #FFFFFF;
- }
- td {
- color: #000000;
- font-family: verdana, arial, sans-serif;
- font-size: 12px;
- line-height: 130%;
- }
- </style>
</head>
-
-<body OnLoad="document.loginform.j_username.focus();">
-
-<table width="100%" height="600" cellpadding="0" cellspacing="1">
- <tr>
- <td valign="middle" align="center">
- <form method="POST" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm">
-
- <% String prefix = request.getContextPath(); %>
-
- <table cellspacing="0" cellpadding="0">
- <tr>
- <td><img src="<%= prefix %>/images/login_top_left.png"/></td>
- <td style="background-image:url('<%= prefix %>/images/login_top.png')"></td>
- <td><img src="<%= prefix %>/images/login_top_right.png"/></td>
- </tr>
- <tr>
- <td style="background-image:url('<%= prefix %>/images/login_left.png')"></td>
- <!-- REAL CONTENT CELL : begin -->
- <td style="background-color:#b4b4b4" align="center">
- <b>JBoss Portal Login</b><br/><br/>
-
- <p style="color:red"><%= request.getAttribute("org.jboss.portal.loginError") %>
- </p>
- <table>
- <tr>
- <td align="right" width="50">
- Username:
- </td>
- <td align="left">
- <input type="text" name="j_username" value=""/>
- </td>
- </tr>
- <tr>
- <td align="right" width="50">
- Password:
- </td>
- <td align="left">
- <input type="password" name="j_password" value=""/>
- </td>
- </tr>
- <tr>
- <td colspan="2" align="right">
- <input type="submit" name="login" value="Login"/>
- </td>
- </tr>
- </table>
-
- </td>
- <!-- REAL CONTENT CELL : end -->
- <td style="background-image:url('<%= prefix %>/images/login_right.png')"></td>
- </tr>
- <tr>
- <td><img src="<%= prefix %>/images/login_bottom_left.png"/></td>
- <td style="background-image:url('<%= prefix %>/images/login_bottom.png')"></td>
- <td><img src="<%= prefix %>/images/login_bottom_right.png"/></td>
- </tr>
- </table>
-
-
- </form>
-
- </td>
- </tr>
-</table>
-
+<body>
+ <!--Leaving as stub until release-->
</body>
</html>
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/login.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/login.jsp 2007-11-21 17:32:46 UTC (rev 9067)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-server-war/login.jsp 2007-11-21 18:32:50 UTC (rev 9068)
@@ -20,97 +20,47 @@
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<!--
-| Uncomment to enable JOSSO server based SSO authentication.
-| Redirects the user to the propper login page. Configured as the login url the web.xml for this application.
--->
-
-<%
- /* response.sendRedirect(request.getContextPath() + "/josso_login/"); */
-%>
-
-
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <style>
+ <style type="text/css">
body {
- background-color: #FFFFFF;
+ margin: 0;
+ padding: 0;
+ border: 0;
+ padding-top: <%=(request.getParameter("loginheight") != null ? request.getParameter("loginheight") : "300px")%>;
}
- td {
- color: #000000;
- font-family: verdana, arial, sans-serif;
- font-size: 12px;
- line-height: 130%;
- }
</style>
+ <link rel="stylesheet" href="/portal-core/css/login.css" type="text/css" />
</head>
-
<body OnLoad="document.loginform.j_username.focus();">
+<div class="error-message"
+ style="display:<%=(request.getAttribute("org.jboss.portal.loginError") != null ? "" : "none")%>;"><%=request.getAttribute("org.jboss.portal.loginError") %>
+</div>
+<div class="login-container">
-<table width="100%" height="600" cellpadding="0" cellspacing="1">
- <tr>
- <td valign="middle" align="center">
- <form method="POST" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm">
+ <div class="login-header">
+ <h2>JBoss Portal Login</h2>
+ </div>
+ <div class="login-content">
- <% String prefix = request.getContextPath(); %>
+ <form method="POST" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm"
+ target="_parent">
+ <label for="j_username">
+ <div class="form-field">Username:
+ <input type="text" name="j_username" id="j_username" value=""/></div>
+ </label>
+ <label for="j_password">
+ <div class="form-field">Password:
+ <input type="password" name="j_password" id="j_password" value=""/></div>
+ </label>
- <table cellspacing="0" cellpadding="0">
- <tr>
- <td><img src="<%= prefix %>/images/login_top_left.png"/></td>
- <td style="background-image:url('<%= prefix %>/images/login_top.png')"></td>
- <td><img src="<%= prefix %>/images/login_top_right.png"/></td>
- </tr>
- <tr>
- <td style="background-image:url('<%= prefix %>/images/login_left.png')"></td>
- <!-- REAL CONTENT CELL : begin -->
- <td style="background-color:#b4b4b4" align="center">
- <b>JBoss Portal Login</b><br/><br/>
- <table>
- <tr>
- <td align="right" width="50">
- Username:
- </td>
- <td align="left">
- <input type="text" name="j_username" value=""/>
- </td>
- </tr>
- <tr>
- <td align="right" width="50">
- Password:
- </td>
- <td align="left">
- <input type="password" name="j_password" value=""/>
- </td>
- </tr>
- <tr>
- <td colspan="2" align="right">
- <input type="submit" name="login" value="Login"/>
- </td>
- </tr>
- </table>
+ <input type="submit" name="login" value="Login" class="login-button"/>
+ </form>
- </td>
- <!-- REAL CONTENT CELL : end -->
- <td style="background-image:url('<%= prefix %>/images/login_right.png')"></td>
- </tr>
- <tr>
- <td><img src="<%= prefix %>/images/login_bottom_left.png"/></td>
- <td style="background-image:url('<%= prefix %>/images/login_bottom.png')"></td>
- <td><img src="<%= prefix %>/images/login_bottom_right.png"/></td>
- </tr>
- </table>
-
-
- </form>
-
- </td>
- </tr>
-</table>
-
+ </div>
+</div>
</body>
</html>
16 years, 7 months
JBoss Portal SVN: r9067 - in branches/JBoss_Portal_Branch_2_6/widget/src: main/org/jboss/portal/test/widget/netvibes and 9 other directories.
by portal-commits@lists.jboss.org
Author: emuckenhuber
Date: 2007-11-21 12:32:46 -0500 (Wed, 21 Nov 2007)
New Revision: 9067
Removed:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetApplicationType.java
Modified:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/GGQueryTestCase.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesProviderTestCase.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryResultTestCase.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryTestCase.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetProvider.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetQuery.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesProvider.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQuery.java
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit_content.jsp
branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
Log:
JBPORTAL-1534: only lookup uwa compatible widgets
and some minor changes
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/GGQueryTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/GGQueryTestCase.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/GGQueryTestCase.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -55,6 +55,14 @@
GGQuery q2 = new GGQuery(0, 10, "foo", "foo", new Locale("de", "at"));
assertTrue(q1.equals(q2));
}
+
+ public void test03()
+ {
+ GGQuery q1 = new GGQuery(0, "foo", "foo", new Locale("de", "at"));
+ GGQuery q2 = new GGQuery(0, 10, "foo", "foo", new Locale("de", "at"));
+ assertTrue(q1.equals(q2));
+ }
+
}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/google/PreferencesTestCase.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -154,7 +154,7 @@
}
catch (WidgetNotSupportedException e)
{
- // ok urlparam not supported for now
+ // urlparam not supported - ok for now
}
}
@@ -170,7 +170,7 @@
}
catch (WidgetNotSupportedException e)
{
- // ok urlparam not supported for now
+ // urlparam not supported - ok for now
}
}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesProviderTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesProviderTestCase.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesProviderTestCase.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -28,6 +28,8 @@
import org.jboss.portal.test.widget.support.TestQuery;
import org.jboss.portal.widget.DirectoryQueryResult;
import org.jboss.portal.widget.WidgetProvider;
+import org.jboss.portal.widget.exceptions.DirectoryResultFailure;
+import org.jboss.portal.widget.exceptions.WidgetException;
import org.jboss.portal.widget.netvibes.provider.NetvibesProvider;
/**
@@ -73,6 +75,22 @@
provider.stop();
assertEquals(0, result.resultSize());
+ if ( result instanceof DirectoryResultFailure)
+ {
+ DirectoryResultFailure r = (DirectoryResultFailure) result;
+ if ( r.getCause() instanceof WidgetException)
+ {
+ // ok
+ }
+ else
+ {
+ fail("Exception must be of type WidgetException");
+ }
+ }
+ else
+ {
+ fail("Directory lookup must fail.");
+ }
}
};
server.performInteraction();
@@ -92,6 +110,22 @@
provider.stop();
assertEquals(0, result.resultSize());
+ if ( result instanceof DirectoryResultFailure)
+ {
+ DirectoryResultFailure r = (DirectoryResultFailure) result;
+ if ( r.getCause() instanceof WidgetException)
+ {
+ // ok
+ }
+ else
+ {
+ fail("Exception must be of type WidgetException");
+ }
+ }
+ else
+ {
+ fail("Directory lookup must fail.");
+ }
}
};
server.performInteraction();
@@ -112,6 +146,22 @@
provider.stop();
assertEquals(0, result.resultSize());
+ if ( result instanceof DirectoryResultFailure)
+ {
+ DirectoryResultFailure r = (DirectoryResultFailure) result;
+ if ( r.getCause() instanceof WidgetException)
+ {
+ // ok
+ }
+ else
+ {
+ fail("Exception must be of type WidgetException");
+ }
+ }
+ else
+ {
+ fail("Directory lookup must fail.");
+ }
}
};
server.performInteraction();
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryResultTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryResultTestCase.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryResultTestCase.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -110,6 +110,8 @@
NetvibesQueryResultBuilder builder = new NetvibesQueryResultBuilder(url);
NetvibesQueryResult result = builder.build(5000);
assertNotNull(result);
+ assertEquals(24, result.resultSize());
+
}
catch(WidgetException e)
{
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryTestCase.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/test/widget/netvibes/NetvibesQueryTestCase.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -35,23 +35,30 @@
public void test01() throws Exception
{
- NetvibesQuery q = new NetvibesQuery(0, 10, "14", "all", "foo");
- assertEquals("http://eco.netvibes.com/rss.php?synd=jboss&count=10&cat=14&type=all&q=foo", q.buildQueryURL().toString());
+ NetvibesQuery q = new NetvibesQuery(0, 10, "14", "top", "foo");
+ assertEquals("http://eco.netvibes.com/rss.php?synd=jboss&type=uwa&count=10&cat=14&sort=...", q.buildQueryURL().toString());
}
public void test02() throws Exception
{
NetvibesQuery q = new NetvibesQuery(1, 11, "5", "foo", "bar");
- assertEquals("http://eco.netvibes.com/rss.php?synd=jboss&start=1&count=11&cat=5&type=fo...", q.buildQueryURL().toString());
+ assertEquals("http://eco.netvibes.com/rss.php?synd=jboss&type=uwa&start=1&count=11&cat=...", q.buildQueryURL().toString());
}
public void test03()
{
- NetvibesQuery q1 = new NetvibesQuery(0, 10, "14", "all", "foo");
- NetvibesQuery q2 = new NetvibesQuery(0, 10, "14", "all", "foo");
+ NetvibesQuery q1 = new NetvibesQuery(0, 10, "14", "latest", "foo");
+ NetvibesQuery q2 = new NetvibesQuery(0, 10, "14", "latest", "foo");
assertTrue(q1.equals(q2));
}
+
+ public void test04()
+ {
+ NetvibesQuery q1 = new NetvibesQuery(1, 10, "14", "top", "foo");
+ NetvibesQuery q2 = new NetvibesQuery(1, 10, "14", "latest", "foo");
+ assertFalse(q1.equals(q2));
+ }
}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/AbstractWidgetProvider.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -55,11 +55,11 @@
/** The scheduled executor */
protected ScheduledExecutorService scheduledExecutor;
- /** The entry expiration time in millis (default: 1 day) */
- protected long entryExpiration = TimeUnit.MILLISECONDS.convert(86400, TimeUnit.SECONDS);
+ /** The entry expiration time in millis (default: 6 hours) */
+ protected long entryExpiration = TimeUnit.MILLISECONDS.convert(21600, TimeUnit.SECONDS);
- /** The query expiration time in millis (default: 15 minutes) */
- protected long queryExpiration = TimeUnit.MILLISECONDS.convert(900, TimeUnit.SECONDS);
+ /** The query expiration time in millis (default: 1 hour) */
+ protected long queryExpiration = TimeUnit.MILLISECONDS.convert(3600, TimeUnit.SECONDS);
/** Fetch all widgets in on the directory lookup */
private boolean fetchWidgetsOnDirectoryLookup = false;
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetProvider.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetProvider.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -35,10 +35,12 @@
public void start();
public void stop();
+
public Widget getWidget(URL url) throws InterruptedException, ExecutionException;
public DirectoryQueryResult search(WidgetQuery query);
+
public void setConnectionTimeout(int connectionTimeout);
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetQuery.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetQuery.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/WidgetQuery.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -31,11 +31,9 @@
*/
public interface WidgetQuery
{
-
- /** . */
+
public boolean equals(Object foo);
- /** . */
public URL buildQueryURL() throws MalformedURLException;
}
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -133,6 +133,12 @@
Widget widget = provider.getWidget(uri);
if (widget != null)
{
+ /** breaks the portlet-titlebar if too long
+ if (widget.getTitle() != null)
+ {
+ resp.setTitle(widget.getTitle().getDefaultString() + " (Google Widget)");
+ }
+ */
writer.print(widget.render(req.getParameterMap(), req.getLocale()));
}
else
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidget.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -49,7 +49,7 @@
private final String id;
/** The default widget height */
- private final static String defaultHeight = "215";
+ private final static String defaultHeight = "250";
/** The netvibes widget info */
private final NetvibesWidgetInfo widgetInfo;
@@ -123,7 +123,7 @@
}
}
- String actualHeight = tempHeight != null ? String.valueOf(Integer.valueOf(tempHeight).intValue() + 15) : defaultHeight;
+ String actualHeight = tempHeight != null ? String.valueOf(Integer.valueOf(tempHeight).intValue() + 50) : defaultHeight;
StringBuffer output = new StringBuffer();
output.append("<iframe id=\"frame_"+ id +"\" frameborder=\"0\" width=\"100%\" height=\""+ actualHeight +"\" ");
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -91,10 +91,10 @@
params.put("cat", new String[]{catParam});
}
- String typeParam = req.getParameter("type");
- if (catParam != null)
+ String sortParam = req.getParameter("sort");
+ if (sortParam != null)
{
- params.put("type", new String[]{typeParam});
+ params.put("sort", new String[]{sortParam});
}
String currentPage = req.getParameter("currentPage");
@@ -137,6 +137,12 @@
Widget widget = provider.getWidget(uri);
if (widget != null)
{
+ /** breaks the portlet-titlebar if too long
+ if( widget.getTitle() != null)
+ {
+ resp.setTitle(widget.getTitle().getDefaultString() + " (Netvibes Widget)");
+ }
+ */
writer.print(widget.render(req.getParameterMap(), req.getLocale()));
}
else
Deleted: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetApplicationType.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetApplicationType.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/directory/NetvibesWidgetApplicationType.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -1,54 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.widget.netvibes.directory;
-
-/**
- * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-public class NetvibesWidgetApplicationType
-{
-
- private String id;
-
- private String description;
-
- public NetvibesWidgetApplicationType(String id, String description)
- {
- this.id = id;
- this.description = description;
- }
-
- public String getId()
- {
- return id;
- }
-
- public String getDescription()
- {
- return description;
- }
-
-
-}
-
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesProvider.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesProvider.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -33,7 +33,6 @@
import org.jboss.portal.widget.ExpiringFutureTask;
import org.jboss.portal.widget.Widget;
import org.jboss.portal.widget.WidgetQuery;
-import org.jboss.portal.widget.netvibes.directory.NetvibesWidgetApplicationType;
import org.jboss.portal.widget.netvibes.directory.NetvibesWidgetCategory;
/**
@@ -61,25 +60,11 @@
.add(new NetvibesWidgetCategory("15", "Sciences"))
.get());
- /** The netvibes application types */
- private static final Collection TYPES = Collections.unmodifiableList((List)CollectionBuilder.arrayList()
- .add(new NetvibesWidgetApplicationType("all", "All"))
- .add(new NetvibesWidgetApplicationType("application", "Application"))
- .add(new NetvibesWidgetApplicationType("feed", "Feed"))
- .add(new NetvibesWidgetApplicationType("podcast", "Podcast"))
- .add(new NetvibesWidgetApplicationType("event", "Event"))
- .get());
-
public Collection getCategories()
{
return CATEGORIES;
}
- public Collection getApplicationTypes()
- {
- return TYPES;
- }
-
@Override
protected void addDirectoryResult(WidgetQuery query)
{
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQuery.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQuery.java 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/netvibes/provider/NetvibesQuery.java 2007-11-21 17:32:46 UTC (rev 9067)
@@ -39,27 +39,30 @@
private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(NetvibesQuery.class);
/** . */
- private int start;
+ private final int start;
/** Zero or negative means it is not used. */
private int count = 10;
/** . */
- private String cat;
+ private final String cat;
/** . */
- private String type;
+ private final String type = "uwa";
+
+ /** .*/
+ private final String sort;
/** . */
- private String q;
+ private final String q;
/** . */
- private Locale locale;
+// private Locale locale;
/** . */
private int hashCode;
- public NetvibesQuery(int start, int num, String cat, String type, String q)
+ public NetvibesQuery(int start, int num, String cat, String sort, String q)
{
if (start < 0)
{
@@ -78,9 +81,9 @@
this.start = start;
this.count = num;
this.cat = cat;
+ this.sort = sort;
this.q = q;
- this.type = type;
- this.hashCode = start + num + (cat == null ? 0 : 1 + cat.hashCode()) + (q == null ? 0 : 1 + q.hashCode()) + (type == null ? 0 : 1 + type.hashCode());
+ this.hashCode = start + num + (cat == null ? 0 : 1 + cat.hashCode()) + (q == null ? 0 : 1 + q.hashCode()) + (sort == null ? 0 : 1 + sort.hashCode());
}
public int getStart()
@@ -116,7 +119,8 @@
(this.start == that.start) &&
(this.count == that.count) &&
(this.cat == null ? that.cat == null : this.cat.equals(that.cat)) &&
- (this.q == null ? that.q == null : this.q.equals(that.q));
+ (this.q == null ? that.q == null : this.q.equals(that.q)) &&
+ (this.sort == null ? that.sort == null : this.sort.equals(that.sort));
}
return false;
}
@@ -128,7 +132,8 @@
public URL buildQueryURL() throws MalformedURLException
{
- StringBuffer buffer = new StringBuffer("http://eco.netvibes.com/rss.php?synd=jboss");
+ // Building url - and only allow UWA compatible widgets (type=uwa)
+ StringBuffer buffer = new StringBuffer("http://eco.netvibes.com/rss.php?synd=jboss&type=" + type);
if( start > 0 )
{
buffer.append("&start=").append(start);
@@ -141,9 +146,9 @@
{
buffer.append("&cat=").append(cat);
}
- if (type != null)
+ if(sort != null)
{
- buffer.append("&type=").append(type);
+ buffer.append("&sort=").append(sort);
}
if (q != null)
{
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/jsp/edit_content.jsp 2007-11-21 17:32:46 UTC (rev 9067)
@@ -1,5 +1,4 @@
<%@page import="org.jboss.portal.widget.netvibes.directory.NetvibesWidgetCategory"%>
-<%@page import="org.jboss.portal.widget.netvibes.directory.NetvibesWidgetApplicationType"%>
<%@page import="org.jboss.portal.widget.netvibes.provider.NetvibesProvider"%>
<%@page import="org.jboss.portal.widget.netvibes.NetvibesPreferenceInfo"%>
<%@page import="org.jboss.portal.widget.netvibes.provider.NetvibesQuery"%>
@@ -58,10 +57,10 @@
}
// Type
- String type = request.getParameter("type");
- if (type == null)
+ String sort = request.getParameter("sort");
+ if (sort == null)
{
- type = "all";
+ sort = "top";
}
// Get category term
@@ -73,7 +72,7 @@
// Compute query
int queryStart = currentPage * numberOfResults;
- NetvibesQuery query = new NetvibesQuery(queryStart, numberOfResults + 1, catTerm, type, queryTerm);
+ NetvibesQuery query = new NetvibesQuery(queryStart, numberOfResults + 1, catTerm, sort, queryTerm);
DirectoryQueryResult queryResults = provider.search(query);
boolean uriPickMethod = false;
@@ -144,20 +143,6 @@
}
%>
</select>
- <select name="type" class="portlet-form-field">
- <%
- // Category dropdown
- for (Iterator i = provider.getApplicationTypes().iterator(); i.hasNext();)
- {
- NetvibesWidgetApplicationType appType = (NetvibesWidgetApplicationType)i.next();
- boolean selected = appType.getId().equals(type);
- %>
- <option value="<%= appType.getId() %>" <%= selected ? "selected=\"selected\"" : "" %>><%=appType.getDescription()%>
- </option>
- <%
- }
- %>
- </select>
<select name="numberOfResults" class="portlet-form-field">
<%
// Number of results dropdown
@@ -234,7 +219,7 @@
// Propagage search nav state
selectURL.setParameter("cat", catTerm);
selectURL.setParameter("query", queryTerm);
- selectURL.setParameter("type", type);
+ selectURL.setParameter("sort", sort);
selectURL.setParameter("currentPage", String.valueOf(currentPage));
selectURL.setParameter("numberOfResults", String.valueOf(numberOfResults));
@@ -262,7 +247,7 @@
PortletURL prevURL = renderResponse.createRenderURL();
prevURL.setParameter("cat", catTerm);
prevURL.setParameter("query", queryTerm);
- prevURL.setParameter("type", type);
+ prevURL.setParameter("sort", sort);
prevURL.setParameter("numberOfResults", String.valueOf(numberOfResults));
String prevPage = String.valueOf(currentPage - 1);
@@ -279,7 +264,7 @@
PortletURL nextURL = renderResponse.createRenderURL();
nextURL.setParameter("cat", catTerm);
nextURL.setParameter("query", queryTerm);
- nextURL.setParameter("type", type);
+ nextURL.setParameter("sort", sort);
nextURL.setParameter("numberOfResults", String.valueOf(numberOfResults));
String nextPage = String.valueOf(currentPage + 1);
@@ -381,11 +366,11 @@
break;
// PASSWORD
case NVDataType.PASSWORD: %><input type="password" name="content.param.<%= prefInfo.getName() %>" class="portlet-form-field"
- value="<%= prefValue != null ? prefValue : "" %>" maxlength="255"/><%
+ value="<%= prefValue != null ? prefValue.replace("\"", "'") : "" %>" maxlength="255"/><%
break;
// DEFAULT TEXT
default: %><input type="text" name="content.param.<%= prefInfo.getName() %>" class="portlet-form-field"
- value="<%= prefValue != null ? prefValue : "" %>" maxlength="255"/><%
+ value="<%= prefValue != null ? prefValue.replace("\"", "'") : "" %>" /><%
break;
}
%></td>
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2007-11-21 17:32:46 UTC (rev 9067)
@@ -38,14 +38,14 @@
<value>5000</value>
</init-param>
<init-param>
- <description>Time until a Widget expires and gets refreshed (in minutes). Default value is 1 day.</description>
+ <description>Time until a Widget expires and gets refreshed (in minutes). Default value is 6 hours.</description>
<name>entryExpiration</name>
- <value>1440</value>
+ <value>360</value>
</init-param>
<init-param>
- <description>Time until a query expires. Default value is 15 minutes.</description>
+ <description>Time until a query expires (in minutes). Default value is 1 hour.</description>
<name>queryExpiration</name>
- <value>15</value>
+ <value>60</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit_content.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit_content.jsp 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/jsp/edit_content.jsp 2007-11-21 17:32:46 UTC (rev 9067)
@@ -376,7 +376,7 @@
default:
%>
<td><input type="text" name="content.param.<%= prefInfo.getName() %>" class="portlet-form-field"
- value="<%= prefValue %>"/></td>
+ value="<%= prefValue.replace("\"", "'") %>"/></td>
<%
break;
} // endof switch
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2007-11-21 16:02:30 UTC (rev 9066)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2007-11-21 17:32:46 UTC (rev 9067)
@@ -38,14 +38,14 @@
<value>5000</value>
</init-param>
<init-param>
- <description>Time until a Widget expires and gets refreshed (in minutes). Default value is 1 day.</description>
+ <description>Time until a Widget expires and gets refreshed (in minutes). Default value is 6 hours.</description>
<name>entryExpiration</name>
- <value>1440</value>
+ <value>360</value>
</init-param>
<init-param>
- <description>Time until a query expires. Default value is 15 minutes.</description>
+ <description>Time until a query expires. Default value is 1 hour.</description>
<name>queryExpiration</name>
- <value>15</value>
+ <value>60</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
16 years, 7 months
JBoss Portal SVN: r9066 - in branches/JBoss_Portal_Branch_2_6/core-identity/src/resources: portal-identity-war/WEB-INF and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-11-21 11:02:30 -0500 (Wed, 21 Nov 2007)
New Revision: 9066
Removed:
branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_de.properties
Modified:
branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
Log:
- Claims identity supported languages.
- Removed dummy german translation
Deleted: branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_de.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_de.properties 2007-11-21 15:09:41 UTC (rev 9065)
+++ branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_de.properties 2007-11-21 16:02:30 UTC (rev 9066)
@@ -1,25 +0,0 @@
-################################################################################
-# JBoss, a division of Red Hat #
-# Copyright 2006, Red Hat Middleware, LLC, and individual #
-# contributors as indicated by the @authors tag. See the #
-# copyright.txt in the distribution for a full listing of #
-# individual contributors. #
-# #
-# This is free software; you can redistribute it and/or modify it #
-# under the terms of the GNU Lesser General Public License as #
-# published by the Free Software Foundation; either version 2.1 of #
-# the License, or (at your option) any later version. #
-# #
-# This software is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
-# Lesser General Public License for more details. #
-# #
-# You should have received a copy of the GNU Lesser General Public #
-# License along with this software; if not, write to the Free #
-# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA #
-# 02110-1301 USA, or see the FSF site: http://www.fsf.org. #
-################################################################################
-
-IDENTITY_WELCOME=Willkommen
-IDENTITY_VIEW_PROFILE_TITLE=Profilansicht
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2007-11-21 15:09:41 UTC (rev 9065)
+++ branches/JBoss_Portal_Branch_2_6/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2007-11-21 16:02:30 UTC (rev 9066)
@@ -42,6 +42,9 @@
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
+ <supported-locale>fr</supported-locale>
+ <supported-locale>en</supported-locale>
+ <supported-locale>it</supported-locale>
<portlet-info>
<title>User portlet</title>
<keywords>management,user</keywords>
@@ -81,6 +84,9 @@
<mime-type>text/html</mime-type>
<portlet-mode>EDIT</portlet-mode>
</supports>
+ <supported-locale>fr</supported-locale>
+ <supported-locale>en</supported-locale>
+ <supported-locale>it</supported-locale>
<portlet-info>
<title>User management portlet</title>
<keywords>management,admin</keywords>
16 years, 7 months
JBoss Portal SVN: r9065 - in branches/JBoss_Portal_Branch_2_6: cms/src/resources/test and 1 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-11-21 10:09:41 -0500 (Wed, 21 Nov 2007)
New Revision: 9065
Modified:
branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/standardidentity-config.xml
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml
Log:
update for identity libraries and configuration
Modified: branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-11-21 14:30:07 UTC (rev 9064)
+++ branches/JBoss_Portal_Branch_2_6/build/build-thirdparty.xml 2007-11-21 15:09:41 UTC (rev 9065)
@@ -51,7 +51,7 @@
<componentref name="jboss-portal/modules/web" version="trunk-SNAPSHOT"/>
<componentref name="jboss-portal/modules/test" version="1.0-SNAPSHOT"/>
<componentref name="jboss-portal/modules/portlet" version="1.0-SNAPSHOT"/>
- <componentref name="jboss-portal/modules/identity" version="1.0.0"/>
+ <componentref name="jboss-portal/modules/identity" version="1.0.1-SNAPSHOT"/>
<componentref name="antlr" version="2.7.6.ga"/>
<componentref name="apache-ant" version="1.6.5"/>
<componentref name="jackrabbit" version="1.1.1"/>
Modified: branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/standardidentity-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/standardidentity-config.xml 2007-11-21 14:30:07 UTC (rev 9064)
+++ branches/JBoss_Portal_Branch_2_6/cms/src/resources/test/standardidentity-config.xml 2007-11-21 15:09:41 UTC (rev 9065)
@@ -59,6 +59,18 @@
<name>jNDIName</name>
<value>java:/portal/LDAPConnectionContext</value>
</option>
+ <option>
+ <name>pooling</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>poolingProtocol</name>
+ <value>plain ssl</value>
+ </option>
+ <option>
+ <name>poolingTimeout</name>
+ <value>300000</value>
+ </option>
</config>
</datasource>
</datasources>
@@ -84,7 +96,7 @@
</option>
</config>
</module>
-
+
<module>
<!--type used to correctly map in IdentityContext registry-->
<type>Role</type>
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml 2007-11-21 14:30:07 UTC (rev 9064)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/conf/identity/standardidentity-config.xml 2007-11-21 15:09:41 UTC (rev 9065)
@@ -61,6 +61,18 @@
<name>jNDIName</name>
<value>java:/portal/LDAPConnectionContext</value>
</option>
+ <option>
+ <name>pooling</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>poolingProtocol</name>
+ <value>plain ssl</value>
+ </option>
+ <option>
+ <name>poolingTimeout</name>
+ <value>300000</value>
+ </option>
</config>
</datasource>
</datasources>
16 years, 7 months
JBoss Portal SVN: r9064 - modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-11-21 09:30:07 -0500 (Wed, 21 Nov 2007)
New Revision: 9064
Modified:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPConnectionContext.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModule.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserModule.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
Log:
Fix external context usage bug for LDAP connection
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPConnectionContext.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPConnectionContext.java 2007-11-21 14:05:47 UTC (rev 9063)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPConnectionContext.java 2007-11-21 14:30:07 UTC (rev 9064)
@@ -137,7 +137,7 @@
return env;
}
- public InitialLdapContext createInitialContext() throws IdentityException
+ public LdapContext createInitialContext() throws IdentityException
{
try
{
@@ -145,7 +145,7 @@
if (getExternalContextJndiName() != null)
{
InitialContext iniCtx = new InitialContext();
- return (InitialLdapContext)iniCtx.lookup(getExternalContextJndiName());
+ return (LdapContext)iniCtx.lookup(getExternalContextJndiName());
}
//if not construct our own one using provided options
else
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java 2007-11-21 14:30:07 UTC (rev 9064)
@@ -22,24 +22,23 @@
******************************************************************************/
package org.jboss.portal.identity.ldap;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.identity.IdentityConfiguration;
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.Role;
-import org.jboss.portal.identity.IdentityConfiguration;
-import org.jboss.portal.common.util.Tools;
-import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
-import javax.naming.ldap.InitialLdapContext;
+import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
-import javax.naming.directory.DirContext;
-import java.util.Set;
-import java.util.List;
-import java.util.NoSuchElementException;
+import javax.naming.ldap.LdapContext;
+import java.util.Enumeration;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.Enumeration;
import java.util.LinkedList;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
@@ -210,7 +209,7 @@
public List searchRoles(String filter, Object[] filterArgs) throws NamingException, IdentityException
{
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2007-11-21 14:30:07 UTC (rev 9064)
@@ -32,7 +32,7 @@
import javax.naming.NamingException;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
-import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
@@ -219,7 +219,7 @@
public List searchUsers(String filter, Object[] filterArgs) throws NamingException, IdentityException
{
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModule.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModule.java 2007-11-21 14:05:47 UTC (rev 9063)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModule.java 2007-11-21 14:30:07 UTC (rev 9064)
@@ -21,23 +21,22 @@
*/
package org.jboss.portal.identity.ldap;
-import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.IdentityConfiguration;
+import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.Role;
import org.jboss.portal.identity.service.RoleModuleService;
-import javax.naming.directory.Attributes;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
import javax.naming.directory.Attribute;
-import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
-import javax.naming.NamingException;
-import javax.naming.NamingEnumeration;
-import javax.naming.InitialContext;
-import javax.naming.ldap.InitialLdapContext;
-import java.util.NoSuchElementException;
+import javax.naming.ldap.LdapContext;
import java.util.List;
+import java.util.NoSuchElementException;
/**
* @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw Dawidowicz</a>
@@ -72,7 +71,7 @@
public void updateDisplayName(LDAPRoleImpl ldapr, String name) throws IdentityException
{
String attributeName = getDisplayNameAttributeID();
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -150,7 +149,7 @@
public Role findRoleByDN(String dn) throws IdentityException, IllegalArgumentException
{
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2007-11-21 14:30:07 UTC (rev 9064)
@@ -160,7 +160,7 @@
throw new IdentityException("Role name cannot be null");
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -240,7 +240,7 @@
throw new IdentityException("Cannot obtain DN of role");
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -327,7 +327,7 @@
public List searchRoles(String filter, Object[] filterArgs) throws NamingException, IdentityException
{
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-11-21 14:30:07 UTC (rev 9064)
@@ -22,30 +22,29 @@
******************************************************************************/
package org.jboss.portal.identity.ldap;
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.User;
-import org.jboss.portal.identity.Role;
+import org.jboss.portal.common.util.Tools;
import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.NoSuchUserException;
-import org.jboss.portal.identity.ldap.helper.LDAPTools;
-import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.User;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.SearchResult;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.BasicAttributes;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.DirContext;
import javax.naming.directory.ModificationItem;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.ldap.InitialLdapContext;
-import java.util.Set;
+import javax.naming.directory.SearchResult;
+import javax.naming.ldap.LdapContext;
+import java.util.Collections;
import java.util.HashSet;
-import java.util.List;
import java.util.Iterator;
import java.util.LinkedList;
-import java.util.Collections;
+import java.util.List;
+import java.util.Set;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
@@ -156,7 +155,7 @@
Set users = new HashSet();
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -253,7 +252,7 @@
"require the member field to be set). ");
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -392,7 +391,7 @@
memberName = ldapUser.getUserName();
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-11-21 14:30:07 UTC (rev 9064)
@@ -21,31 +21,29 @@
*/
package org.jboss.portal.identity.ldap;
-import org.jboss.portal.identity.ldap.helper.LDAPTools;
import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.User;
-import org.jboss.portal.identity.Role;
import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.User;
-import javax.naming.directory.SearchResult;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttributes;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.DirContext;
import javax.naming.directory.ModificationItem;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.ldap.InitialLdapContext;
-import java.util.Set;
+import javax.naming.directory.SearchResult;
+import javax.naming.ldap.LdapContext;
+import java.util.Collections;
import java.util.HashSet;
-import java.util.List;
import java.util.Iterator;
import java.util.LinkedList;
-import java.util.Collections;
-import java.util.Enumeration;
+import java.util.List;
+import java.util.Set;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
@@ -88,7 +86,7 @@
Set roles = new HashSet();
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -300,7 +298,7 @@
memberOfName = ldapRole.getName();
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -403,7 +401,7 @@
throw new IllegalArgumentException("UserMembershipModuleImpl supports only LDAPUserImpl objects");
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserModule.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserModule.java 2007-11-21 14:05:47 UTC (rev 9063)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserModule.java 2007-11-21 14:30:07 UTC (rev 9064)
@@ -21,30 +21,29 @@
*/
package org.jboss.portal.identity.ldap;
-import org.jboss.portal.identity.service.UserModuleService;
+import org.jboss.portal.identity.IdentityConfiguration;
+import org.jboss.portal.identity.IdentityContext;
import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.UserProfileModule;
import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.identity.User;
-import org.jboss.portal.identity.IdentityContext;
-import org.jboss.portal.identity.IdentityConfiguration;
+import org.jboss.portal.identity.UserProfileModule;
+import org.jboss.portal.identity.service.UserModuleService;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.Attribute;
+import javax.naming.directory.BasicAttribute;
import javax.naming.directory.BasicAttributes;
-import javax.naming.directory.BasicAttribute;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
-import javax.naming.NamingException;
-import javax.naming.NamingEnumeration;
-import javax.naming.InitialContext;
-import javax.naming.Context;
import javax.naming.ldap.InitialLdapContext;
-import java.util.NoSuchElementException;
-import java.util.Map;
+import javax.naming.ldap.LdapContext;
import java.util.Hashtable;
-import java.util.Enumeration;
import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
/**
* Abstract LDAPUserModule that should be extended to provide compabitibility across identity modules
@@ -84,7 +83,7 @@
{
String attributeName = getPasswordAttributeId();
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -117,7 +116,6 @@
public boolean validatePassword(LDAPUserImpl ldapu, String password) throws IdentityException
{
- Hashtable env =getConnectionContext().getEnvironment();
//will use user DN to bind checking the password by default
String principal = ldapu.getDn();
@@ -139,20 +137,40 @@
principal = preffix + ldapu.getUserName() + suffix;
}
- env.put(Context.SECURITY_PRINCIPAL, principal);
- env.put(Context.SECURITY_CREDENTIALS, password);
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
+
try
{
+
+ Hashtable env = ldapContext.getEnvironment();
+
+ env.put(Context.SECURITY_PRINCIPAL, principal);
+ env.put(Context.SECURITY_CREDENTIALS, password);
+
InitialContext ctx = new InitialLdapContext(env, null);
+
if (ctx != null)
{
+ ctx.close();
return true;
}
+
}
catch (NamingException e)
{
//
}
+ finally
+ {
+ try
+ {
+ ldapContext.close();
+ }
+ catch (NamingException e)
+ {
+ throw new IdentityException("Failed to close LDAP connection", e);
+ }
+ }
return false;
}
@@ -196,7 +214,7 @@
*/
public User findUserByDN(String dn) throws IdentityException, IllegalArgumentException, NoSuchUserException
{
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-11-21 14:30:07 UTC (rev 9064)
@@ -144,7 +144,7 @@
log.debug("Creating user: " + userName);
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -226,7 +226,7 @@
throw new IdentityException("Cannot obtain DN of user");
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -376,7 +376,7 @@
log.debug("Search filter: " + filter);
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2007-11-21 14:30:07 UTC (rev 9064)
@@ -21,29 +21,29 @@
*/
package org.jboss.portal.identity.ldap;
+import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.IdentityContext;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.UserModule;
import org.jboss.portal.identity.UserProfileModule;
-import org.jboss.portal.identity.IdentityContext;
import org.jboss.portal.identity.info.ProfileInfo;
import org.jboss.portal.identity.info.PropertyInfo;
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.CachedUserImpl;
-import org.jboss.portal.identity.NoSuchUserException;
-import org.jboss.portal.identity.UserModule;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.Attribute;
+import javax.naming.directory.BasicAttribute;
import javax.naming.directory.BasicAttributes;
-import javax.naming.directory.BasicAttribute;
import javax.naming.directory.DirContext;
-import javax.naming.NamingException;
import javax.naming.ldap.InitialLdapContext;
-import java.util.Set;
-import java.util.Map;
+import javax.naming.ldap.LdapContext;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
-import java.util.Collection;
-import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
/**
* @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw Dawidowicz</a>
@@ -98,7 +98,7 @@
return null;
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -202,7 +202,7 @@
return;
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -265,7 +265,7 @@
Map propertyMap = new HashMap();
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
16 years, 7 months
JBoss Portal SVN: r9063 - modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-11-21 09:05:47 -0500 (Wed, 21 Nov 2007)
New Revision: 9063
Modified:
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModule.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
Log:
Fix external context usage bug for LDAP connection
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java 2007-11-21 13:12:19 UTC (rev 9062)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPConnectionContext.java 2007-11-21 14:05:47 UTC (rev 9063)
@@ -137,7 +137,7 @@
return env;
}
- public InitialLdapContext createInitialContext() throws IdentityException
+ public LdapContext createInitialContext() throws IdentityException
{
try
{
@@ -145,7 +145,7 @@
if (getExternalContextJndiName() != null)
{
InitialContext iniCtx = new InitialContext();
- return (InitialLdapContext)iniCtx.lookup(getExternalContextJndiName());
+ return (LdapContext)iniCtx.lookup(getExternalContextJndiName());
}
//if not construct our own one using provided options
else
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java 2007-11-21 13:12:19 UTC (rev 9062)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtRoleModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
@@ -22,24 +22,23 @@
******************************************************************************/
package org.jboss.portal.identity.ldap;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.identity.IdentityConfiguration;
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.Role;
-import org.jboss.portal.identity.IdentityConfiguration;
-import org.jboss.portal.common.util.Tools;
-import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
-import javax.naming.ldap.InitialLdapContext;
+import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
-import javax.naming.directory.DirContext;
-import java.util.Set;
-import java.util.List;
-import java.util.NoSuchElementException;
+import javax.naming.ldap.LdapContext;
+import java.util.Enumeration;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.Enumeration;
import java.util.LinkedList;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Set;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
@@ -210,7 +209,7 @@
public List searchRoles(String filter, Object[] filterArgs) throws NamingException, IdentityException
{
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2007-11-21 13:12:19 UTC (rev 9062)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
@@ -32,7 +32,7 @@
import javax.naming.NamingException;
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
-import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
@@ -219,7 +219,7 @@
public List searchUsers(String filter, Object[] filterArgs) throws NamingException, IdentityException
{
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModule.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModule.java 2007-11-21 13:12:19 UTC (rev 9062)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModule.java 2007-11-21 14:05:47 UTC (rev 9063)
@@ -21,23 +21,22 @@
*/
package org.jboss.portal.identity.ldap;
-import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.IdentityConfiguration;
+import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.Role;
import org.jboss.portal.identity.service.RoleModuleService;
-import javax.naming.directory.Attributes;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
import javax.naming.directory.Attribute;
-import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
-import javax.naming.NamingException;
-import javax.naming.NamingEnumeration;
-import javax.naming.InitialContext;
-import javax.naming.ldap.InitialLdapContext;
-import java.util.NoSuchElementException;
+import javax.naming.ldap.LdapContext;
import java.util.List;
+import java.util.NoSuchElementException;
/**
* @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw Dawidowicz</a>
@@ -72,7 +71,7 @@
public void updateDisplayName(LDAPRoleImpl ldapr, String name) throws IdentityException
{
String attributeName = getDisplayNameAttributeID();
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -150,7 +149,7 @@
public Role findRoleByDN(String dn) throws IdentityException, IllegalArgumentException
{
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2007-11-21 13:12:19 UTC (rev 9062)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
@@ -160,7 +160,7 @@
throw new IdentityException("Role name cannot be null");
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -240,7 +240,7 @@
throw new IdentityException("Cannot obtain DN of role");
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -327,7 +327,7 @@
public List searchRoles(String filter, Object[] filterArgs) throws NamingException, IdentityException
{
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-11-21 13:12:19 UTC (rev 9062)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticGroupMembershipModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
@@ -22,30 +22,29 @@
******************************************************************************/
package org.jboss.portal.identity.ldap;
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.User;
-import org.jboss.portal.identity.Role;
+import org.jboss.portal.common.util.Tools;
import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.NoSuchUserException;
-import org.jboss.portal.identity.ldap.helper.LDAPTools;
-import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.User;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.SearchResult;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.BasicAttributes;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.DirContext;
import javax.naming.directory.ModificationItem;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.ldap.InitialLdapContext;
-import java.util.Set;
+import javax.naming.directory.SearchResult;
+import javax.naming.ldap.LdapContext;
+import java.util.Collections;
import java.util.HashSet;
-import java.util.List;
import java.util.Iterator;
import java.util.LinkedList;
-import java.util.Collections;
+import java.util.List;
+import java.util.Set;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
@@ -156,7 +155,7 @@
Set users = new HashSet();
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -253,7 +252,7 @@
"require the member field to be set). ");
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -392,7 +391,7 @@
memberName = ldapUser.getUserName();
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-11-21 13:12:19 UTC (rev 9062)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
@@ -21,31 +21,29 @@
*/
package org.jboss.portal.identity.ldap;
-import org.jboss.portal.identity.ldap.helper.LDAPTools;
import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.User;
-import org.jboss.portal.identity.Role;
import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.NoSuchUserException;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.User;
-import javax.naming.directory.SearchResult;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttributes;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.DirContext;
import javax.naming.directory.ModificationItem;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.ldap.InitialLdapContext;
-import java.util.Set;
+import javax.naming.directory.SearchResult;
+import javax.naming.ldap.LdapContext;
+import java.util.Collections;
import java.util.HashSet;
-import java.util.List;
import java.util.Iterator;
import java.util.LinkedList;
-import java.util.Collections;
-import java.util.Enumeration;
+import java.util.List;
+import java.util.Set;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
@@ -88,7 +86,7 @@
Set roles = new HashSet();
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -300,7 +298,7 @@
memberOfName = ldapRole.getName();
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -403,7 +401,7 @@
throw new IllegalArgumentException("UserMembershipModuleImpl supports only LDAPUserImpl objects");
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java 2007-11-21 13:12:19 UTC (rev 9062)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java 2007-11-21 14:05:47 UTC (rev 9063)
@@ -21,30 +21,29 @@
*/
package org.jboss.portal.identity.ldap;
-import org.jboss.portal.identity.service.UserModuleService;
+import org.jboss.portal.identity.IdentityConfiguration;
+import org.jboss.portal.identity.IdentityContext;
import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.UserProfileModule;
import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.identity.User;
-import org.jboss.portal.identity.IdentityContext;
-import org.jboss.portal.identity.IdentityConfiguration;
+import org.jboss.portal.identity.UserProfileModule;
+import org.jboss.portal.identity.service.UserModuleService;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.Attribute;
+import javax.naming.directory.BasicAttribute;
import javax.naming.directory.BasicAttributes;
-import javax.naming.directory.BasicAttribute;
import javax.naming.directory.DirContext;
import javax.naming.directory.SearchControls;
-import javax.naming.NamingException;
-import javax.naming.NamingEnumeration;
-import javax.naming.InitialContext;
-import javax.naming.Context;
import javax.naming.ldap.InitialLdapContext;
-import java.util.NoSuchElementException;
-import java.util.Map;
+import javax.naming.ldap.LdapContext;
import java.util.Hashtable;
-import java.util.Enumeration;
import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
/**
* Abstract LDAPUserModule that should be extended to provide compabitibility across identity modules
@@ -84,7 +83,7 @@
{
String attributeName = getPasswordAttributeId();
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -117,7 +116,6 @@
public boolean validatePassword(LDAPUserImpl ldapu, String password) throws IdentityException
{
- Hashtable env =getConnectionContext().getEnvironment();
//will use user DN to bind checking the password by default
String principal = ldapu.getDn();
@@ -139,20 +137,40 @@
principal = preffix + ldapu.getUserName() + suffix;
}
- env.put(Context.SECURITY_PRINCIPAL, principal);
- env.put(Context.SECURITY_CREDENTIALS, password);
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
+
try
{
+
+ Hashtable env = ldapContext.getEnvironment();
+
+ env.put(Context.SECURITY_PRINCIPAL, principal);
+ env.put(Context.SECURITY_CREDENTIALS, password);
+
InitialContext ctx = new InitialLdapContext(env, null);
+
if (ctx != null)
{
+ ctx.close();
return true;
}
+
}
catch (NamingException e)
{
//
}
+ finally
+ {
+ try
+ {
+ ldapContext.close();
+ }
+ catch (NamingException e)
+ {
+ throw new IdentityException("Failed to close LDAP connection", e);
+ }
+ }
return false;
}
@@ -196,7 +214,7 @@
*/
public User findUserByDN(String dn) throws IdentityException, IllegalArgumentException, NoSuchUserException
{
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-11-21 13:12:19 UTC (rev 9062)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
@@ -144,7 +144,7 @@
log.debug("Creating user: " + userName);
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -226,7 +226,7 @@
throw new IdentityException("Cannot obtain DN of user");
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -376,7 +376,7 @@
log.debug("Search filter: " + filter);
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2007-11-21 13:12:19 UTC (rev 9062)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0_0/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserProfileModuleImpl.java 2007-11-21 14:05:47 UTC (rev 9063)
@@ -21,29 +21,29 @@
*/
package org.jboss.portal.identity.ldap;
+import org.jboss.portal.identity.CachedUserImpl;
+import org.jboss.portal.identity.IdentityContext;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.UserModule;
import org.jboss.portal.identity.UserProfileModule;
-import org.jboss.portal.identity.IdentityContext;
import org.jboss.portal.identity.info.ProfileInfo;
import org.jboss.portal.identity.info.PropertyInfo;
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.CachedUserImpl;
-import org.jboss.portal.identity.NoSuchUserException;
-import org.jboss.portal.identity.UserModule;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
-import javax.naming.directory.Attribute;
+import javax.naming.directory.BasicAttribute;
import javax.naming.directory.BasicAttributes;
-import javax.naming.directory.BasicAttribute;
import javax.naming.directory.DirContext;
-import javax.naming.NamingException;
import javax.naming.ldap.InitialLdapContext;
-import java.util.Set;
-import java.util.Map;
+import javax.naming.ldap.LdapContext;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
-import java.util.Collection;
-import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
/**
* @author <a href="mailto:boleslaw dot dawidowicz at jboss.org">Boleslaw Dawidowicz</a>
@@ -98,7 +98,7 @@
return null;
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -202,7 +202,7 @@
return;
}
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
@@ -265,7 +265,7 @@
Map propertyMap = new HashMap();
- InitialLdapContext ldapContext = getConnectionContext().createInitialContext();
+ LdapContext ldapContext = getConnectionContext().createInitialContext();
try
{
16 years, 7 months
JBoss Portal SVN: r9062 - branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: emuckenhuber
Date: 2007-11-21 08:12:19 -0500 (Wed, 21 Nov 2007)
New Revision: 9062
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
Log:
disable edit window for contentType widget for now
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-11-21 12:57:02 UTC (rev 9061)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-11-21 13:12:19 UTC (rev 9062)
@@ -3,6 +3,7 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:pfc="http://www.jboss.com/portal/facelet/common"
xmlns:c="http://java.sun.com/jstl/core">
@@ -144,10 +145,18 @@
styleClass="windowStateIcon"
alt=""/>
- <h:commandLink action="#{portalobjectmgr.selectObject}">#{object.name}
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
+
+ <!-- disable edit window for content type widget until JBPORTAL-1561 is fixed -->
+ <h:outputText value="#{object.name}"
+ rendered="#{fn:startsWith(object.declaredProperties['portal.windowContentType'], 'widget/')}" />
+ <h:commandLink action="#{portalobjectmgr.selectObject}"
+ rendered="#{! fn:startsWith(object.declaredProperties['portal.windowContentType'], 'widget/')}">
+ <h:outputText value="#{object.name}" />
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
+
+
</h:column>
<h:column>
<f:facet name="header">
16 years, 7 months
JBoss Portal SVN: r9061 - branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-11-21 07:57:02 -0500 (Wed, 21 Nov 2007)
New Revision: 9061
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd/portlet-instances_2_6.dtd
Log:
JBPORTAL-1810: DTD of portlet-instances.xml is wrong for [preferences] element
Modified: branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd/portlet-instances_2_6.dtd
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd/portlet-instances_2_6.dtd 2007-11-21 11:16:16 UTC (rev 9060)
+++ branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-sar/dtd/portlet-instances_2_6.dtd 2007-11-21 12:57:02 UTC (rev 9061)
@@ -97,7 +97,7 @@
<!--
The preferences element configures the instance with a specific set of preferences.
-->
-<!ELEMENT preferences (preference)>
+<!ELEMENT preferences (preference+)>
<!--
The preference configure one preference of a set of preferences.
16 years, 7 months
JBoss Portal SVN: r9060 - in branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF: classes and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-11-21 06:16:16 -0500 (Wed, 21 Nov 2007)
New Revision: 9060
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource.properties
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource_fr.properties
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource_it.properties
Log:
JBPORTAL-1809: Preferences names are not displayed correctly
Added: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource.properties (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource.properties 2007-11-21 11:16:16 UTC (rev 9060)
@@ -0,0 +1,25 @@
+################################################################################
+# 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. #
+################################################################################
+
+javax.portlet.preference.name.RssXml=RSS feed URL
+javax.portlet.preference.name.expires=Expiration time
Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource_fr.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource_fr.properties (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource_fr.properties 2007-11-21 11:16:16 UTC (rev 9060)
@@ -0,0 +1,25 @@
+################################################################################
+# 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. #
+################################################################################
+
+javax.portlet.preference.name.RssXml=URL du flux RSS
+javax.portlet.preference.name.expires=Temps d'expiration
Property changes on: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource_fr.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource_it.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource_it.properties (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/classes/WeatherResource_it.properties 2007-11-21 11:16:16 UTC (rev 9060)
@@ -0,0 +1,25 @@
+################################################################################
+# 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. #
+################################################################################
+
+javax.portlet.preference.name.RssXml=URL per RSS
+javax.portlet.preference.name.expires=Scadenza
16 years, 7 months
JBoss Portal SVN: r9059 - in branches/JBoss_Portal_Branch_2_6: core-samples/src/resources/portal-basic-samples-war/WEB-INF and 3 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-11-21 06:11:21 -0500 (Wed, 21 Nov 2007)
New Revision: 9059
Added:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/classes/
Removed:
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic-samples-war/WEB-INF/classes/
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPreferences.xhtml
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/classes/NewsResource.properties
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/classes/NewsResource_fr.properties
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/classes/NewsResource_it.properties
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml
Log:
JBPORTAL-1809: Preferences names are not displayed correctly
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPreferences.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPreferences.xhtml 2007-11-21 10:18:37 UTC (rev 9058)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editPreferences.xhtml 2007-11-21 11:11:21 UTC (rev 9059)
@@ -33,7 +33,7 @@
</c:choose>
</td>
<td>
- <h:outputText value="#{pref.displayName}"/>
+ <h:outputText value="#{pref.displayName.value}"/>
</td>
<td>
<h:selectBooleanCheckbox disabled="true" value="#{pref.readOnly}"/>
Copied: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/classes (from rev 9058, branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic-samples-war/WEB-INF/classes)
Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/classes/NewsResource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic-samples-war/WEB-INF/classes/NewsResource.properties 2007-11-21 10:18:37 UTC (rev 9058)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/classes/NewsResource.properties 2007-11-21 11:11:21 UTC (rev 9059)
@@ -21,5 +21,5 @@
# 02110-1301 USA, or see the FSF site: http://www.fsf.org. #
################################################################################
-javax.portlet.preference.description.RssXml=RSS feed URL
-javax.portlet.preference.description.expires=Expiration time
+javax.portlet.preference.name.RssXml=RSS feed URL
+javax.portlet.preference.name.expires=Expiration time
Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/classes/NewsResource_fr.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic-samples-war/WEB-INF/classes/NewsResource_fr.properties 2007-11-21 10:18:37 UTC (rev 9058)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/classes/NewsResource_fr.properties 2007-11-21 11:11:21 UTC (rev 9059)
@@ -21,5 +21,5 @@
# 02110-1301 USA, or see the FSF site: http://www.fsf.org. #
################################################################################
-javax.portlet.preference.description.RssXml=URL du flux RSS
-javax.portlet.preference.description.expires=Temps d'expiration
+javax.portlet.preference.name.RssXml=URL du flux RSS
+javax.portlet.preference.name.expires=Temps d'expiration
Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/classes/NewsResource_it.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-basic-samples-war/WEB-INF/classes/NewsResource_it.properties 2007-11-21 10:18:37 UTC (rev 9058)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/classes/NewsResource_it.properties 2007-11-21 11:11:21 UTC (rev 9059)
@@ -21,5 +21,5 @@
# 02110-1301 USA, or see the FSF site: http://www.fsf.org. #
################################################################################
-javax.portlet.preference.description.RssXml=URL per RSS
-javax.portlet.preference.description.expires=Scadenza
+javax.portlet.preference.name.RssXml=URL per RSS
+javax.portlet.preference.name.expires=Scadenza
Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/portlet.xml 2007-11-21 10:18:37 UTC (rev 9058)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-news-samples-war/WEB-INF/portlet.xml 2007-11-21 11:11:21 UTC (rev 9059)
@@ -53,6 +53,7 @@
</supports>
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
+ <supported-locale>it</supported-locale>
<resource-bundle>NewsResource</resource-bundle>
<portlet-info>
<title>News Feeds</title>
Modified: branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml 2007-11-21 10:18:37 UTC (rev 9058)
+++ branches/JBoss_Portal_Branch_2_6/core-samples/src/resources/portal-weather-samples-war/WEB-INF/portlet.xml 2007-11-21 11:11:21 UTC (rev 9059)
@@ -51,6 +51,10 @@
<portlet-mode>EDIT</portlet-mode>
<portlet-mode>HELP</portlet-mode>
</supports>
+ <supported-locale>fr</supported-locale>
+ <supported-locale>en</supported-locale>
+ <supported-locale>it</supported-locale>
+ <resource-bundle>WeatherResource</resource-bundle>
<portlet-info>
<title>Weather Portlet</title>
<keywords>sample,news</keywords>
16 years, 7 months