changed trace to info
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@92553 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fb95e135e1
commit
a8377863c5
|
@ -0,0 +1,166 @@
|
||||||
|
@CHARSET "UTF-8";
|
||||||
|
|
||||||
|
/*Used from suggestbox*/
|
||||||
|
ul.multivalue-panel-suggest {
|
||||||
|
list-style-type: none;
|
||||||
|
overflow: hidden;
|
||||||
|
height: auto !important;
|
||||||
|
width: 380px;
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
cursor: text;
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: Verdana;
|
||||||
|
min-height: 1px;
|
||||||
|
z-index: 999;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ul.multivalue-panel-suggest li input {
|
||||||
|
border: 0;
|
||||||
|
padding: 3px 8px;
|
||||||
|
background-color: white;
|
||||||
|
margin: 2px 0;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
li.multivalue-panel-token-ws {
|
||||||
|
overflow: hidden;
|
||||||
|
height: auto !important;
|
||||||
|
height: 1%;
|
||||||
|
margin: 3px;
|
||||||
|
padding: 1px 3px;
|
||||||
|
background-color: #E2E6F0;
|
||||||
|
border: 1px solid #9DACCC;
|
||||||
|
color: #1C2A47;
|
||||||
|
cursor: default;
|
||||||
|
font-size: 11px;
|
||||||
|
border-radius: 5px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.multivalue-panel-token-ws-notselectable {
|
||||||
|
overflow: hidden;
|
||||||
|
height: auto !important;
|
||||||
|
height: 1%;
|
||||||
|
margin: 3px;
|
||||||
|
padding: 1px 3px;
|
||||||
|
background-color: white;
|
||||||
|
border: 1px solid #9DACCC;
|
||||||
|
color: #1C2A47;
|
||||||
|
cursor: default;
|
||||||
|
font-size: 11px;
|
||||||
|
border-radius: 5px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notSelectable-ws {
|
||||||
|
background-color: #FFF !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.multivalue-panel-token-ws p {
|
||||||
|
display: inline;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.multivalue-panel-token-ws span {
|
||||||
|
color: #a6b3cf;
|
||||||
|
margin-left: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.margin-right-flex{
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.margint-top-flex{
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-right: 8px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.wizardButton {
|
||||||
|
height: 22px !important;
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #F2F2F2 url(images/white-grad.png) repeat-x scroll left top;
|
||||||
|
border-color: #BBB;
|
||||||
|
color: #464646;
|
||||||
|
font-size: 12px;
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
cursor: pointer;
|
||||||
|
cursor: hand;
|
||||||
|
margin-right: 5px;
|
||||||
|
margin-right: 3px;
|
||||||
|
padding-bottom: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wizardButton[disabled]:hover,.wizardButton[disabled]:active,.wizardButton[disabled]
|
||||||
|
{
|
||||||
|
color: #CCC;
|
||||||
|
border-color: #BBB;
|
||||||
|
cursor: default;
|
||||||
|
opacity: 1.0;
|
||||||
|
background: #F2F2F2 url(images/white-grad.png) repeat-x scroll left top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wizardButton:hover {
|
||||||
|
border-color: #222;
|
||||||
|
color: #222;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wizardButton:active {
|
||||||
|
background: #e3e8f3 url(images/white-grad.png) repeat-x scroll left top;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
table.userssuggest {
|
||||||
|
/*background-color: #DFE8F6 !important;*/
|
||||||
|
font-family: verdana,arial,sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
/*color:#333333;*/
|
||||||
|
border-width: 0px;
|
||||||
|
background-color: none;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0px;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
/*border-radius: 6px;
|
||||||
|
-webkit-border-radius: 6px;
|
||||||
|
-moz-border-radius: 6px;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
table.userssuggest td {
|
||||||
|
border-width: 0px;
|
||||||
|
border-style: solid;
|
||||||
|
/*border-color: #999999;*/
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0px;
|
||||||
|
height: 30px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.userssuggest th {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 11px;
|
||||||
|
height: 30px;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0px;
|
||||||
|
}
|
|
@ -53,25 +53,49 @@ public class GWTWorkspaceSharingBuilder {
|
||||||
|
|
||||||
if (hashTestUser == null) {
|
if (hashTestUser == null) {
|
||||||
hashTestUser = new HashMap<String, InfoContactModel>();
|
hashTestUser = new HashMap<String, InfoContactModel>();
|
||||||
hashTestUser.put("federico.defaveri", new InfoContactModel(
|
|
||||||
|
hashTestUser.put("federico.defaveri",
|
||||||
|
new InfoContactModel(
|
||||||
"federico.defaveri", "federico.defaveri",
|
"federico.defaveri", "federico.defaveri",
|
||||||
"Federico de Faveri"));
|
"Federico de Faveri"));
|
||||||
hashTestUser.put("antonio.gioia", new InfoContactModel(
|
|
||||||
|
hashTestUser.put("antonio.gioia",
|
||||||
|
new InfoContactModel(
|
||||||
"antonio.gioia", "antonio.gioia", "Antonio Gioia"));
|
"antonio.gioia", "antonio.gioia", "Antonio Gioia"));
|
||||||
hashTestUser.put("fabio.sinibaldi", new InfoContactModel(
|
|
||||||
|
hashTestUser.put("fabio.sinibaldi",
|
||||||
|
new InfoContactModel(
|
||||||
"fabio.sinibaldi", "fabio.sinibaldi", "Fabio Sinibaldi"));
|
"fabio.sinibaldi", "fabio.sinibaldi", "Fabio Sinibaldi"));
|
||||||
hashTestUser.put("pasquale.pagano", new InfoContactModel(
|
|
||||||
|
hashTestUser.put("pasquale.pagano",
|
||||||
|
new InfoContactModel(
|
||||||
"pasquale.pagano", "pasquale.pagano", "Pasquale Pagano"));
|
"pasquale.pagano", "pasquale.pagano", "Pasquale Pagano"));
|
||||||
hashTestUser.put(WsUtil.TEST_USER.toString(), new InfoContactModel(
|
|
||||||
WsUtil.TEST_USER, WsUtil.TEST_USER,
|
hashTestUser.put("francesco.mangiacrapa",
|
||||||
WsUtil.TEST_USER_FULL_NAME));
|
new InfoContactModel(
|
||||||
hashTestUser.put("francesco.mangiacrapa", new InfoContactModel(
|
|
||||||
"francesco.mangiacrapa", "francesco.mangiacrapa",
|
"francesco.mangiacrapa", "francesco.mangiacrapa",
|
||||||
"Francesco Mangiacrapa"));
|
"Francesco Mangiacrapa"));
|
||||||
hashTestUser.put("massimiliano.assante", new InfoContactModel(
|
|
||||||
|
hashTestUser.put("massimiliano.assante",
|
||||||
|
new InfoContactModel(
|
||||||
"massimiliano.assante", "massimiliano.assante",
|
"massimiliano.assante", "massimiliano.assante",
|
||||||
"Massimiliano Assante"));
|
"Massimiliano Assante"));
|
||||||
|
|
||||||
|
hashTestUser.put("leonardo.candela",
|
||||||
|
new InfoContactModel(
|
||||||
|
"leonardo.candela", "leonardo.candela",
|
||||||
|
"Leonardo Candela"));
|
||||||
|
|
||||||
|
hashTestUser.put("valentina.marioli",
|
||||||
|
new InfoContactModel(
|
||||||
|
"valentina.marioli", "valentina.marioli",
|
||||||
|
"Valentina Marioli"));
|
||||||
|
|
||||||
|
// hashTestUser.put(WsUtil.TEST_USER.toString(),
|
||||||
|
// new InfoContactModel(
|
||||||
|
// WsUtil.TEST_USER, WsUtil.TEST_USER,
|
||||||
|
// WsUtil.TEST_USER_FULL_NAME));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return hashTestUser;
|
return hashTestUser;
|
||||||
|
@ -180,8 +204,7 @@ public class GWTWorkspaceSharingBuilder {
|
||||||
throws InternalErrorException {
|
throws InternalErrorException {
|
||||||
|
|
||||||
if (user != null)
|
if (user != null)
|
||||||
return new InfoContactModel(user.getId(), user.getPortalLogin(),
|
return new InfoContactModel(user.getId(), user.getPortalLogin(), UserUtil.getUserFullName(user.getPortalLogin()));
|
||||||
UserUtil.getUserFullName(user.getPortalLogin()));
|
|
||||||
|
|
||||||
return new InfoContactModel();
|
return new InfoContactModel();
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,8 +71,6 @@ public class WorkspaceSharingServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
Workspace workspace = getWorkspace();
|
|
||||||
|
|
||||||
logger.info("Get all contacts");
|
logger.info("Get all contacts");
|
||||||
|
|
||||||
// WorkspaceItem parent = workspace.getItem(parentFileModel.getIdentifier()); //get item from workspace
|
// WorkspaceItem parent = workspace.getItem(parentFileModel.getIdentifier()); //get item from workspace
|
||||||
|
@ -89,9 +87,11 @@ public class WorkspaceSharingServiceImpl extends RemoteServiceServlet implements
|
||||||
listContactsModel.add(new InfoContactModel("antonio.gioia", "antonio.gioia", "Antonio Gioia"));
|
listContactsModel.add(new InfoContactModel("antonio.gioia", "antonio.gioia", "Antonio Gioia"));
|
||||||
listContactsModel.add(new InfoContactModel("fabio.sinibaldi", "fabio.sinibaldi", "Fabio Sinibaldi"));
|
listContactsModel.add(new InfoContactModel("fabio.sinibaldi", "fabio.sinibaldi", "Fabio Sinibaldi"));
|
||||||
listContactsModel.add(new InfoContactModel("pasquale.pagano", "pasquale.pagano", "Pasquale Pagano"));
|
listContactsModel.add(new InfoContactModel("pasquale.pagano", "pasquale.pagano", "Pasquale Pagano"));
|
||||||
listContactsModel.add(new InfoContactModel(WsUtil.TEST_USER, WsUtil.TEST_USER, WsUtil.TEST_USER_FULL_NAME));
|
// listContactsModel.add(new InfoContactModel(WsUtil.TEST_USER, WsUtil.TEST_USER, WsUtil.TEST_USER_FULL_NAME));
|
||||||
listContactsModel.add(new InfoContactModel("francesco.mangiacrapa", "francesco.mangiacrapa", "Francesco Mangiacrapa"));
|
listContactsModel.add(new InfoContactModel("francesco.mangiacrapa", "francesco.mangiacrapa", "Francesco Mangiacrapa"));
|
||||||
listContactsModel.add(new InfoContactModel("massimiliano.assante", "massimiliano.assante", "Massimiliano Assante"));
|
listContactsModel.add(new InfoContactModel("massimiliano.assante", "massimiliano.assante", "Massimiliano Assante"));
|
||||||
|
listContactsModel.add(new InfoContactModel("valentina.marioli", "valentina.marioli", "Valentina Marioli"));
|
||||||
|
listContactsModel.add(new InfoContactModel("leonardo.candela", "leonardo.candela", "Leonardo Candela"));
|
||||||
return listContactsModel;
|
return listContactsModel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,14 +70,14 @@ public class NotificationsProducer {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
logger.trace("Send notifies folder sharing is running...");
|
logger.info("Send notifies folder sharing is running...");
|
||||||
|
|
||||||
for (InfoContactModel infoContactModel : listContacts) {
|
for (InfoContactModel infoContactModel : listContacts) {
|
||||||
try{
|
try{
|
||||||
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
||||||
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
||||||
|
|
||||||
logger.trace("Sending notification new share folder "+sharedFolder.getName()+" for user "+infoContactModel.getLogin());
|
logger.info("Sending notification new share folder "+sharedFolder.getName()+" for user "+infoContactModel.getLogin());
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("Sending notification new share folder "+sharedFolder.getName()+" for user "+infoContactModel.getLogin());
|
System.out.println("Sending notification new share folder "+sharedFolder.getName()+" for user "+infoContactModel.getLogin());
|
||||||
|
@ -94,7 +94,7 @@ public class NotificationsProducer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("notifies share folder is completed");
|
logger.info("notifies share folder is completed");
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
|
|
||||||
|
@ -115,12 +115,12 @@ public class NotificationsProducer {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
logger.trace("Send notifies shared folder was renamed is running...");
|
logger.info("Send notifies shared folder was renamed is running...");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if(NotificationsUtil.checkIsRootFolderShared(folderItem.getId(), idsharedFolder)){
|
if(NotificationsUtil.checkIsRootFolderShared(folderItem.getId(), idsharedFolder)){
|
||||||
logger.trace("Notification isn't sent because the event is on root shared folder");
|
logger.info("Notification isn't sent because the event is on root shared folder");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public class NotificationsProducer {
|
||||||
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
||||||
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
||||||
|
|
||||||
logger.trace("Sending notification share folder "+itemOldName+" was renamed as " + itemNewName+ "for user "+infoContactModel.getLogin());
|
logger.info("Sending notification share folder "+itemOldName+" was renamed as " + itemNewName+ "for user "+infoContactModel.getLogin());
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("Sending notification share folder "+itemOldName+" was renamed as " + itemNewName+ "for user "+infoContactModel.getLogin());
|
System.out.println("Sending notification share folder "+itemOldName+" was renamed as " + itemNewName+ "for user "+infoContactModel.getLogin());
|
||||||
|
@ -151,7 +151,7 @@ public class NotificationsProducer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("notifies share folder was renamed is completed");
|
logger.info("notifies share folder was renamed is completed");
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
|
|
||||||
|
@ -170,14 +170,14 @@ public class NotificationsProducer {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
logger.trace("Send notifies shared item was updated is running...");
|
logger.info("Send notifies shared item was updated is running...");
|
||||||
|
|
||||||
for (InfoContactModel infoContactModel : listSharedContact) {
|
for (InfoContactModel infoContactModel : listSharedContact) {
|
||||||
try{
|
try{
|
||||||
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
||||||
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
||||||
|
|
||||||
logger.trace("Sending notification to user "+infoContactModel.getLogin() + " updated item "+item.getName());
|
logger.info("Sending notification to user "+infoContactModel.getLogin() + " updated item "+item.getName());
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("Sending notification to user "+infoContactModel.getLogin() + " updated item "+item.getName());
|
System.out.println("Sending notification to user "+infoContactModel.getLogin() + " updated item "+item.getName());
|
||||||
|
@ -195,7 +195,7 @@ public class NotificationsProducer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("notifies shared item was updated is completed");
|
logger.info("notifies shared item was updated is completed");
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ public class NotificationsProducer {
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
|
||||||
logger.trace("Sending notification to user "+contact.getLogin()+", added user "+ infoContactModel.getLogin() +" to share folder "+sharedFolder.getName());
|
logger.info("Sending notification to user "+contact.getLogin()+", added user "+ infoContactModel.getLogin() +" to share folder "+sharedFolder.getName());
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
// System.out.println("Sending notification added user "+ infoContactModel.getLogin() +" to share folder "+sharedFolder.getName() + " for user "+contact.getLogin());
|
// System.out.println("Sending notification added user "+ infoContactModel.getLogin() +" to share folder "+sharedFolder.getName() + " for user "+contact.getLogin());
|
||||||
|
@ -261,7 +261,7 @@ public class NotificationsProducer {
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
|
||||||
logger.trace("Sending notification to user "+contact.getLogin()+", added "+listLogins.size()+" users to share folder "+sharedFolder.getName());
|
logger.info("Sending notification to user "+contact.getLogin()+", added "+listLogins.size()+" users to share folder "+sharedFolder.getName());
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
// System.out.println("Sending notification added user "+ infoContactModel.getLogin() +" to share folder "+sharedFolder.getName() + " for user "+contact.getLogin());
|
// System.out.println("Sending notification added user "+ infoContactModel.getLogin() +" to share folder "+sharedFolder.getName() + " for user "+contact.getLogin());
|
||||||
|
@ -308,7 +308,7 @@ public class NotificationsProducer {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
// printContacts(listContacts);
|
// printContacts(listContacts);
|
||||||
logger.trace("Send notifies folder un share is running...");
|
logger.info("Send notifies folder un share is running...");
|
||||||
|
|
||||||
for (InfoContactModel infoContactModel : listContacts) {
|
for (InfoContactModel infoContactModel : listContacts) {
|
||||||
try{
|
try{
|
||||||
|
@ -316,7 +316,7 @@ public class NotificationsProducer {
|
||||||
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
||||||
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
||||||
|
|
||||||
logger.trace("Sending notification to user "+infoContactModel.getLogin() +" un shared folder "+unSharedFolder.getName());
|
logger.info("Sending notification to user "+infoContactModel.getLogin() +" un shared folder "+unSharedFolder.getName());
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("Sending notification to user "+infoContactModel.getLogin() +" un shared folder "+unSharedFolder.getName());
|
System.out.println("Sending notification to user "+infoContactModel.getLogin() +" un shared folder "+unSharedFolder.getName());
|
||||||
|
@ -332,7 +332,7 @@ public class NotificationsProducer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("notifies of un share notifications is completed");
|
logger.info("notifies of un share notifications is completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
}.start();
|
}.start();
|
||||||
|
@ -353,7 +353,7 @@ public class NotificationsProducer {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
// printContacts(listContacts);
|
// printContacts(listContacts);
|
||||||
logger.trace("Send notifies added item in sharedfolder is running...");
|
logger.info("Send notifies added item in sharedfolder is running...");
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("Send notifies added item in sharedfolder is running...");
|
System.out.println("Send notifies added item in sharedfolder is running...");
|
||||||
|
@ -364,7 +364,7 @@ public class NotificationsProducer {
|
||||||
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
||||||
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
||||||
|
|
||||||
logger.trace("Sending notification to user "+infoContactModel.getLogin() +" added item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
logger.info("Sending notification to user "+infoContactModel.getLogin() +" added item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("Sending notification to user "+infoContactModel.getLogin() +" added item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
System.out.println("Sending notification to user "+infoContactModel.getLogin() +" added item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
||||||
|
@ -386,7 +386,7 @@ public class NotificationsProducer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("notifies of added item in shared folder is completed");
|
logger.info("notifies of added item in shared folder is completed");
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("notifies of added item in shared folder is completed");
|
System.out.println("notifies of added item in shared folder is completed");
|
||||||
|
@ -408,7 +408,7 @@ public class NotificationsProducer {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
// printContacts(listContacts);
|
// printContacts(listContacts);
|
||||||
logger.trace("Send notifies updated item in shared folder is running...");
|
logger.info("Send notifies updated item in shared folder is running...");
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("Send notifies updated item in shared folder is running...");
|
System.out.println("Send notifies updated item in shared folder is running...");
|
||||||
|
@ -419,7 +419,7 @@ public class NotificationsProducer {
|
||||||
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
||||||
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
||||||
|
|
||||||
logger.trace("Sending notification to user "+infoContactModel.getLogin() +" updated item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
logger.info("Sending notification to user "+infoContactModel.getLogin() +" updated item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("Sending notification to user "+infoContactModel.getLogin() +" updated item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
System.out.println("Sending notification to user "+infoContactModel.getLogin() +" updated item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
||||||
|
@ -441,7 +441,7 @@ public class NotificationsProducer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("notifies of updated item in shared folder is completed");
|
logger.info("notifies of updated item in shared folder is completed");
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("notifies of updated item in shared folder is completed");
|
System.out.println("notifies of updated item in shared folder is completed");
|
||||||
|
@ -466,13 +466,13 @@ public class NotificationsProducer {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
logger.trace("Sending notification remove item in shared folder is running...");
|
logger.info("Sending notification remove item in shared folder is running...");
|
||||||
// printContacts(listContacts);
|
// printContacts(listContacts);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if(NotificationsUtil.checkIsRootFolderShared(workspaceItem.getId(), sharedFolder.getId())){
|
if(NotificationsUtil.checkIsRootFolderShared(workspaceItem.getId(), sharedFolder.getId())){
|
||||||
logger.trace("Notification isn't sent because the event is on root shared folder");
|
logger.info("Notification isn't sent because the event is on root shared folder");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ public class NotificationsProducer {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("Sending notification moved item in shared folder is running...");
|
logger.info("Sending notification moved item in shared folder is running...");
|
||||||
|
|
||||||
System.out.println("Sending notification moved item in shared folder is running...");
|
System.out.println("Sending notification moved item in shared folder is running...");
|
||||||
|
|
||||||
|
@ -491,7 +491,7 @@ public class NotificationsProducer {
|
||||||
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
||||||
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
||||||
|
|
||||||
logger.trace("Sending notification to user "+infoContactModel.getLogin() +" moved item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
logger.info("Sending notification to user "+infoContactModel.getLogin() +" moved item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("Sending notification to user "+infoContactModel.getLogin() +" moved item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
System.out.println("Sending notification to user "+infoContactModel.getLogin() +" moved item "+workspaceItem.getName()+" in shared folder "+sharedFolder.getName());
|
||||||
|
@ -511,7 +511,7 @@ public class NotificationsProducer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("notifies of moved item in shared folder is completed");
|
logger.info("notifies of moved item in shared folder is completed");
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("notifies of moved item in shared folder is completed");
|
System.out.println("notifies of moved item in shared folder is completed");
|
||||||
|
@ -536,19 +536,19 @@ public class NotificationsProducer {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
logger.trace("Sending notification remove item in shared folder is running...");
|
logger.info("Sending notification remove item in shared folder is running...");
|
||||||
// printContacts(listContacts);
|
// printContacts(listContacts);
|
||||||
|
|
||||||
if(itemName==null || itemName.isEmpty()){
|
if(itemName==null || itemName.isEmpty()){
|
||||||
logger.trace("Notification isn't sent - itemName is null or empty");
|
logger.info("Notification isn't sent - itemName is null or empty");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sharedFolder==null){
|
if(sharedFolder==null){
|
||||||
logger.trace("Notification isn't sent - sharedFolder is null");
|
logger.info("Notification isn't sent - sharedFolder is null");
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("Sending notification removed item in shared folder is running...");
|
logger.info("Sending notification removed item in shared folder is running...");
|
||||||
|
|
||||||
System.out.println("Sending notification removed item in shared folder is running...");
|
System.out.println("Sending notification removed item in shared folder is running...");
|
||||||
|
|
||||||
|
@ -558,7 +558,7 @@ public class NotificationsProducer {
|
||||||
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
//NOTIFIES ONLY THE USERS THAT ARE DIFFERENT FROM CURRENT USER
|
||||||
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
if(infoContactModel.getLogin().compareTo(userId)!=0){
|
||||||
|
|
||||||
logger.trace("Sending notification to user "+infoContactModel.getLogin() +" removed item "+itemName+" in shared folder "+sharedFolder.getName());
|
logger.info("Sending notification to user "+infoContactModel.getLogin() +" removed item "+itemName+" in shared folder "+sharedFolder.getName());
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("Sending notification to user "+infoContactModel.getLogin() +" removed item "+itemName+" in shared folder "+sharedFolder.getName());
|
System.out.println("Sending notification to user "+infoContactModel.getLogin() +" removed item "+itemName+" in shared folder "+sharedFolder.getName());
|
||||||
|
@ -581,7 +581,7 @@ public class NotificationsProducer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("notifies of moved item in shared folder is completed");
|
logger.info("notifies of moved item in shared folder is completed");
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
System.out.println("notifies of moved item in shared folder is completed");
|
System.out.println("notifies of moved item in shared folder is completed");
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class NotificationsUtil {
|
||||||
*/
|
*/
|
||||||
public static void checkSendNotifyChangedItemToShare(HttpSession httpSession, final WorkspaceItem sourceItem, final String sourceSharedId, final WorkspaceItem folderDestinationItem, boolean isOverwrite) {
|
public static void checkSendNotifyChangedItemToShare(HttpSession httpSession, final WorkspaceItem sourceItem, final String sourceSharedId, final WorkspaceItem folderDestinationItem, boolean isOverwrite) {
|
||||||
|
|
||||||
logger.trace("checkSendNotifyAddItemToShare");
|
logger.info("checkSendNotifyAddItemToShare");
|
||||||
|
|
||||||
if(folderDestinationItem!=null){
|
if(folderDestinationItem!=null){
|
||||||
|
|
||||||
|
@ -45,14 +45,14 @@ public class NotificationsUtil {
|
||||||
//if folder destination is shared folder
|
//if folder destination is shared folder
|
||||||
if(folderDestinationItem.isShared()){ //Notify Added Item To Sharing?
|
if(folderDestinationItem.isShared()){ //Notify Added Item To Sharing?
|
||||||
|
|
||||||
logger.trace("checkNotifyAddItemToShare source item: "+sourceItem.getName()+" sourceSharedId: "+sourceSharedId + " folder destination: "+folderDestinationItem.getName() + " folder destination shared folder id: "+folderDestinationItem.getIdSharedFolder());
|
logger.info("checkNotifyAddItemToShare source item: "+sourceItem.getName()+" sourceSharedId: "+sourceSharedId + " folder destination: "+folderDestinationItem.getName() + " folder destination shared folder id: "+folderDestinationItem.getIdSharedFolder());
|
||||||
|
|
||||||
//share condition is true if source shared folder is not null
|
//share condition is true if source shared folder is not null
|
||||||
boolean shareChangeCondition = sourceSharedId==null?false:true;
|
boolean shareChangeCondition = sourceSharedId==null?false:true;
|
||||||
|
|
||||||
//System.out.println("shareChangeCondition add item: "+ shareChangeCondition);
|
//System.out.println("shareChangeCondition add item: "+ shareChangeCondition);
|
||||||
|
|
||||||
logger.trace("shareChangeCondition add item: "+shareChangeCondition);
|
logger.info("shareChangeCondition add item: "+shareChangeCondition);
|
||||||
|
|
||||||
//if shareChangeCondition is true.. notifies added item to sharing
|
//if shareChangeCondition is true.. notifies added item to sharing
|
||||||
if(shareChangeCondition){
|
if(shareChangeCondition){
|
||||||
|
@ -72,12 +72,12 @@ public class NotificationsUtil {
|
||||||
np.notifyUpdatedItemToSharing(listContacts, sourceItem, (WorkspaceFolder) destinationSharedFolder);
|
np.notifyUpdatedItemToSharing(listContacts, sourceItem, (WorkspaceFolder) destinationSharedFolder);
|
||||||
|
|
||||||
|
|
||||||
logger.trace("The notifies was sent correctly");
|
logger.info("The notifies was sent correctly");
|
||||||
// np.notifyAddedItemToSharing(listContacts, (WorkspaceFolder) folderDestinationItem);
|
// np.notifyAddedItemToSharing(listContacts, (WorkspaceFolder) folderDestinationItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
logger.trace("folder destination is not shared");
|
logger.info("folder destination is not shared");
|
||||||
|
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
logger.error("An error occurred in checkSendNotifyAddItemToShare ",e);
|
logger.error("An error occurred in checkSendNotifyAddItemToShare ",e);
|
||||||
|
@ -96,7 +96,7 @@ public class NotificationsUtil {
|
||||||
*/
|
*/
|
||||||
public static List<InfoContactModel> getListUserSharedByFolderSharedId(Workspace workspace, String idSharedFolder) throws Exception {
|
public static List<InfoContactModel> getListUserSharedByFolderSharedId(Workspace workspace, String idSharedFolder) throws Exception {
|
||||||
|
|
||||||
logger.trace("getListUserSharedByFolderSharedId "+ idSharedFolder);
|
logger.info("getListUserSharedByFolderSharedId "+ idSharedFolder);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
@ -110,13 +110,13 @@ public class NotificationsUtil {
|
||||||
|
|
||||||
List<String> listPortalLogin = wsFolder.getUsers();
|
List<String> listPortalLogin = wsFolder.getUsers();
|
||||||
|
|
||||||
logger.trace("getListUserSharedByFolderSharedId return "+ listPortalLogin.size() + " user");
|
logger.info("getListUserSharedByFolderSharedId return "+ listPortalLogin.size() + " user");
|
||||||
|
|
||||||
return builder.buildGxtInfoContactsFromPortalLogins(listPortalLogin);
|
return builder.buildGxtInfoContactsFromPortalLogins(listPortalLogin);
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
logger.trace("the item with id: "+idSharedFolder+ " is not "+WorkspaceItemType.SHARED_FOLDER);
|
logger.info("the item with id: "+idSharedFolder+ " is not "+WorkspaceItemType.SHARED_FOLDER);
|
||||||
|
|
||||||
//DEBUG
|
//DEBUG
|
||||||
//System.out.println("the item with id: "+folderSharedId+ " is not "+WorkspaceItemType.SHARED_FOLDER);
|
//System.out.println("the item with id: "+folderSharedId+ " is not "+WorkspaceItemType.SHARED_FOLDER);
|
||||||
|
@ -143,13 +143,13 @@ public class NotificationsUtil {
|
||||||
public static void checkSendNotifyRemoveItemToShare(HttpSession httpSession, final boolean sourceItemIsShared, final String oldItemName, String oldItemId, final String sourceFolderSharedId) {
|
public static void checkSendNotifyRemoveItemToShare(HttpSession httpSession, final boolean sourceItemIsShared, final String oldItemName, String oldItemId, final String sourceFolderSharedId) {
|
||||||
|
|
||||||
|
|
||||||
logger.trace("checkNotifyRemoveItemToShare:");
|
logger.info("checkNotifyRemoveItemToShare:");
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
|
||||||
if(!sourceItemIsShared){
|
if(!sourceItemIsShared){
|
||||||
|
|
||||||
logger.trace("checkSendNotifyRemoveItemToShare returned, source item is not shared");
|
logger.info("checkSendNotifyRemoveItemToShare returned, source item is not shared");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,17 +159,17 @@ public class NotificationsUtil {
|
||||||
|
|
||||||
|
|
||||||
boolean isRootFolderShared = checkIsRootFolderShared(oldItemId, idSharedFolder);
|
boolean isRootFolderShared = checkIsRootFolderShared(oldItemId, idSharedFolder);
|
||||||
logger.trace("isRootFolderShared is: "+ isRootFolderShared);
|
logger.info("isRootFolderShared is: "+ isRootFolderShared);
|
||||||
|
|
||||||
if(isRootFolderShared){
|
if(isRootFolderShared){
|
||||||
logger.trace("Notification doesn't send because the event is on root shared folder");
|
logger.info("Notification doesn't send because the event is on root shared folder");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boolean isSharedFolder = isASharedFolderForId(httpSession,idSharedFolder);
|
boolean isSharedFolder = isASharedFolderForId(httpSession,idSharedFolder);
|
||||||
|
|
||||||
logger.trace("idSharedFolder is: "+ idSharedFolder +" is shared folder: "+isSharedFolder);
|
logger.info("idSharedFolder is: "+ idSharedFolder +" is shared folder: "+isSharedFolder);
|
||||||
|
|
||||||
|
|
||||||
//Notify Removed Item To Sharing?
|
//Notify Removed Item To Sharing?
|
||||||
|
@ -188,7 +188,7 @@ public class NotificationsUtil {
|
||||||
|
|
||||||
np.notifyRemovedItemToSharing(listContacts, oldItemName, (WorkspaceFolder) sourceSharedFolder);
|
np.notifyRemovedItemToSharing(listContacts, oldItemName, (WorkspaceFolder) sourceSharedFolder);
|
||||||
|
|
||||||
logger.trace("The notifies was sent correctly");
|
logger.info("The notifies was sent correctly");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ public class NotificationsUtil {
|
||||||
*/
|
*/
|
||||||
public static boolean checkIsRootFolderShared(String itemId, String rootFolderSharedId) {
|
public static boolean checkIsRootFolderShared(String itemId, String rootFolderSharedId) {
|
||||||
|
|
||||||
logger.trace("checkIsRootFolderShared between [itemid: "+itemId +", rootFolderSharedId: "+rootFolderSharedId+"]");
|
logger.info("checkIsRootFolderShared between [itemid: "+itemId +", rootFolderSharedId: "+rootFolderSharedId+"]");
|
||||||
if(itemId==null)
|
if(itemId==null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class ScopeUtilFilter {
|
||||||
|
|
||||||
if(scopes!=null && scopes.length>1){
|
if(scopes!=null && scopes.length>1){
|
||||||
scopeRoot = SCOPE_SEPARATOR+scopes[1];
|
scopeRoot = SCOPE_SEPARATOR+scopes[1];
|
||||||
logger.trace("found root "+scopeRoot);
|
logger.info("found root "+scopeRoot);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
logger.warn("root scope not found!");
|
logger.warn("root scope not found!");
|
||||||
|
@ -40,7 +40,7 @@ public class ScopeUtilFilter {
|
||||||
|
|
||||||
public List<String> convertListScopeToPortlet(List<String> listScopes){
|
public List<String> convertListScopeToPortlet(List<String> listScopes){
|
||||||
|
|
||||||
logger.trace("Scope converting...");
|
logger.info("Scope converting...");
|
||||||
|
|
||||||
List<String> scopesConverted = new ArrayList<String>();
|
List<String> scopesConverted = new ArrayList<String>();
|
||||||
scopesConverted.add(ALLSCOPE);
|
scopesConverted.add(ALLSCOPE);
|
||||||
|
@ -55,7 +55,7 @@ public class ScopeUtilFilter {
|
||||||
|
|
||||||
if(scope.compareTo(scopeRoot)==0){ //CASE SCOPE IS ROOT
|
if(scope.compareTo(scopeRoot)==0){ //CASE SCOPE IS ROOT
|
||||||
|
|
||||||
logger.trace("found scope root "+scope+" added to list without converting");
|
logger.info("found scope root "+scope+" added to list without converting");
|
||||||
|
|
||||||
hashScopesFiltered.put(scopeRoot, scopeRoot);
|
hashScopesFiltered.put(scopeRoot, scopeRoot);
|
||||||
scopesConverted.add(scopeRoot);
|
scopesConverted.add(scopeRoot);
|
||||||
|
@ -79,7 +79,7 @@ public class ScopeUtilFilter {
|
||||||
|
|
||||||
scopesConverted.add(filerString);
|
scopesConverted.add(filerString);
|
||||||
|
|
||||||
logger.trace("scope "+scope+ " is converted in: "+filerString);
|
logger.info("scope "+scope+ " is converted in: "+filerString);
|
||||||
|
|
||||||
}else{ //CASE SCOPE ROOT NOT IS FOUND
|
}else{ //CASE SCOPE ROOT NOT IS FOUND
|
||||||
logger.warn("scope "+scope + " was reject from filter");
|
logger.warn("scope "+scope + " was reject from filter");
|
||||||
|
@ -87,7 +87,7 @@ public class ScopeUtilFilter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("Scope converting was completed");
|
logger.info("Scope converting was completed");
|
||||||
|
|
||||||
return scopesConverted;
|
return scopesConverted;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,9 @@ public class UserUtil {
|
||||||
if(portalLogin==null)
|
if(portalLogin==null)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
if (portalLogin.compareTo(WsUtil.TEST_USER) != 0) { //skip test.user
|
logger.info("Get user full name for: "+portalLogin);
|
||||||
|
logger.info("Into portal: "+!WsUtil.withoutPortal);
|
||||||
|
if (portalLogin.compareTo(WsUtil.TEST_USER) != 0 && !WsUtil.withoutPortal) { //skip test.user
|
||||||
|
|
||||||
UserModel curr = null;
|
UserModel curr = null;
|
||||||
|
|
||||||
|
@ -64,11 +66,11 @@ public class UserUtil {
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
logger.trace("Return "+WsUtil.TEST_USER_FULL_NAME +" full name for: "+portalLogin);
|
logger.info("Return "+WsUtil.TEST_USER_FULL_NAME +" full name for: "+portalLogin);
|
||||||
return WsUtil.TEST_USER_FULL_NAME;
|
return WsUtil.TEST_USER_FULL_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("Return empty full name for: "+portalLogin);
|
logger.info("Return empty full name for: "+portalLogin);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,20 +118,20 @@ public class WsUtil {
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static boolean isSessionExpired(HttpSession httpSession) throws Exception {
|
public static boolean isSessionExpired(HttpSession httpSession) throws Exception {
|
||||||
logger.trace("workspace session validating...");
|
logger.info("workspace session validating...");
|
||||||
//READING USERNAME FROM ASL SESSION
|
//READING USERNAME FROM ASL SESSION
|
||||||
String userUsername = getAslSession(httpSession).getUsername();
|
String userUsername = getAslSession(httpSession).getUsername();
|
||||||
boolean isTestUser = userUsername.compareTo(WsUtil.TEST_USER)==0;
|
boolean isTestUser = userUsername.compareTo(WsUtil.TEST_USER)==0;
|
||||||
|
|
||||||
//TODO UNCOMMENT THIS FOR RELEASE
|
//TODO UNCOMMENT THIS FOR RELEASE
|
||||||
logger.trace("Is "+WsUtil.TEST_USER+" test user? "+isTestUser);
|
logger.info("Is "+WsUtil.TEST_USER+" test user? "+isTestUser);
|
||||||
|
|
||||||
if(isTestUser){
|
if(isTestUser){
|
||||||
logger.error("workspace session is expired! username is: "+WsUtil.TEST_USER);
|
logger.error("workspace session is expired! username is: "+WsUtil.TEST_USER);
|
||||||
return true; //is TEST_USER, session is expired
|
return true; //is TEST_USER, session is expired
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("workspace session is valid! current username is: "+userUsername);
|
logger.info("workspace session is valid! current username is: "+userUsername);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -141,18 +141,18 @@ public class WsUtil {
|
||||||
public static Workspace getWorkspace(final HttpSession httpSession) throws InternalErrorException, HomeNotFoundException, WorkspaceFolderNotFoundException
|
public static Workspace getWorkspace(final HttpSession httpSession) throws InternalErrorException, HomeNotFoundException, WorkspaceFolderNotFoundException
|
||||||
{
|
{
|
||||||
|
|
||||||
logger.trace("Get Workspace");
|
logger.info("Get Workspace");
|
||||||
final ASLSession session = getAslSession(httpSession);
|
final ASLSession session = getAslSession(httpSession);
|
||||||
logger.trace("ASLSession scope: "+session.getScope() + " username: "+session.getUsername());
|
logger.info("ASLSession scope: "+session.getScope() + " username: "+session.getUsername());
|
||||||
|
|
||||||
ScopeProvider.instance.set(session.getScope());
|
ScopeProvider.instance.set(session.getScope());
|
||||||
logger.trace("Scope provider instancied");
|
logger.info("Scope provider instancied");
|
||||||
|
|
||||||
Workspace workspace = HomeLibrary.getUserWorkspace(session.getUsername());
|
Workspace workspace = HomeLibrary.getUserWorkspace(session.getUsername());
|
||||||
|
|
||||||
if (session.getAttribute(WORKSPACEBUILDER_ATTRIBUTE) == null)
|
if (session.getAttribute(WORKSPACEBUILDER_ATTRIBUTE) == null)
|
||||||
{
|
{
|
||||||
logger.trace("Initializing the workspace area builder");
|
logger.info("Initializing the workspace area builder");
|
||||||
|
|
||||||
GWTWorkspaceSharingBuilder builder = new GWTWorkspaceSharingBuilder();
|
GWTWorkspaceSharingBuilder builder = new GWTWorkspaceSharingBuilder();
|
||||||
|
|
||||||
|
@ -173,8 +173,8 @@ public class WsUtil {
|
||||||
|
|
||||||
if (notifMng == null) {
|
if (notifMng == null) {
|
||||||
try{
|
try{
|
||||||
logger.trace("Create new NotificationsManager for user: "+session.getUsername());
|
logger.info("Create new NotificationsManager for user: "+session.getUsername());
|
||||||
logger.trace("New ApplicationNotificationsManager with portlet class name: "+NOTIFICATION_PORTLET_CLASS_ID);
|
logger.info("New ApplicationNotificationsManager with portlet class name: "+NOTIFICATION_PORTLET_CLASS_ID);
|
||||||
notifMng = new ApplicationNotificationsManager(session, NOTIFICATION_PORTLET_CLASS_ID);
|
notifMng = new ApplicationNotificationsManager(session, NOTIFICATION_PORTLET_CLASS_ID);
|
||||||
session.setAttribute(NOTIFICATION_MANAGER, notifMng);
|
session.setAttribute(NOTIFICATION_MANAGER, notifMng);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
@ -191,7 +191,7 @@ public class WsUtil {
|
||||||
NotificationsProducer notifProducer = (NotificationsProducer) session.getAttribute(NOTIFICATION_PRODUCER);
|
NotificationsProducer notifProducer = (NotificationsProducer) session.getAttribute(NOTIFICATION_PRODUCER);
|
||||||
|
|
||||||
if (notifProducer == null) {
|
if (notifProducer == null) {
|
||||||
logger.trace("Create new Notification Producer for user: "+session.getUsername());
|
logger.info("Create new Notification Producer for user: "+session.getUsername());
|
||||||
notifProducer = new NotificationsProducer(session);
|
notifProducer = new NotificationsProducer(session);
|
||||||
session.setAttribute(NOTIFICATION_PRODUCER, notifProducer);
|
session.setAttribute(NOTIFICATION_PRODUCER, notifProducer);
|
||||||
}
|
}
|
||||||
|
@ -213,11 +213,11 @@ public class WsUtil {
|
||||||
int slashCount = StringUtils.countMatches(currentScope, "/");
|
int slashCount = StringUtils.countMatches(currentScope, "/");
|
||||||
|
|
||||||
if(slashCount < 3){
|
if(slashCount < 3){
|
||||||
logger.trace("currentScope is not VRE");
|
logger.info("currentScope is not VRE");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.trace("currentScope is VRE");
|
logger.info("currentScope is VRE");
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,11 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
<entry-point class='org.gcube.portlets.widgets.workspacesharingwidget.client.WorkspaceSharingWidget' />
|
<entry-point
|
||||||
|
class='org.gcube.portlets.widgets.workspacesharingwidget.client.WorkspaceSharingWidget' />
|
||||||
|
|
||||||
|
<!-- Specify the application specific style sheet. -->
|
||||||
|
<stylesheet src='workspacesharingwidget.css' />
|
||||||
|
|
||||||
<!-- Specify the paths for translatable code -->
|
<!-- Specify the paths for translatable code -->
|
||||||
<source path='client' />
|
<source path='client' />
|
||||||
|
|
Loading…
Reference in New Issue