fix for item renaming bug #843

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerSocial@95665 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-05-14 10:54:04 +00:00
parent 1b9175a3e0
commit 373a7a21cf
5 changed files with 11 additions and 9 deletions

View File

@ -20,7 +20,7 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>

View File

@ -10,7 +10,7 @@
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslsocial</artifactId>
<version>0.9.1-SNAPSHOT</version>
<version>0.10.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Social Portal ASL Extension</name>
<description>

View File

@ -362,9 +362,10 @@ public class ApplicationNotificationsManager extends SocialPortalBridge implemen
* @throws InternalErrorException
*/
@Override
public boolean notifyItemRenaming(String userIdToNotify, String previousName, WorkspaceItem renamedItem) throws InternalErrorException {
String notifyText = "renamed " + previousName +" as " + renamedItem.getName() +" in your shared folder " + renamedItem.getParent().getName();
if (renamedItem.getParent().isShared()) {
public boolean notifyItemRenaming(String userIdToNotify, String previousName, WorkspaceItem renamedItem, WorkspaceFolder rootSharedFolder) throws InternalErrorException {
String notifyText = "renamed " + previousName +" as " + renamedItem.getName() +" in your shared folder " + renamedItem.getPath().substring(0, renamedItem.getPath().lastIndexOf('/'));
if (rootSharedFolder.isShared()) {
WorkspaceSharedFolder sharedWSFolder = (WorkspaceSharedFolder) renamedItem.getParent();
if (sharedWSFolder.isVreFolder()) {
notifyText = "renamed "+ previousName +" as " + renamedItem.getName() +" in the workspace group folder " + sharedWSFolder.getDisplayName();

View File

@ -95,10 +95,11 @@ public interface NotificationsManager {
*
* @param userIdToNotify the user you want to notify
* @param previousName the previous name of the folder
* @param renamedItem the renamed {@link WorkspaceItem}
* @param renamedItem the renamed {@link WorkspaceItem}
* @param rootSharedFolder the root shared {@link WorkspaceFolder} of the {@link WorkspaceItem}
* @return true if the notification is correctly delivered, false otherwise
*/
boolean notifyItemRenaming(String userIdToNotify, String previousName, WorkspaceItem renamedItem) throws Exception;
boolean notifyItemRenaming(String userIdToNotify, String previousName, WorkspaceItem renamedItem, WorkspaceFolder rootSharedFolder) throws Exception;
/**
*
* @param userIdToNotify the user you want to notify

View File

@ -117,9 +117,9 @@ public class FTPManager {
}
public String getBaseURL() throws Exception {
String httpBaseURL = endPoint.profile().runtime().hostedOn()+UPLOAD_FOLDER_NAME+"/";
String httpBaseURL = endPoint.profile().runtime().hostedOn();
if (httpBaseURL != null) {
return httpBaseURL;
return httpBaseURL+UPLOAD_FOLDER_NAME+"/";
}
else throw new ServiceConfigurationError("Could not find a valid FTP Server in the infrastructure");
}