diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 9dc5eeb5f6..278dc22ad7 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -1735,6 +1735,7 @@ delete_user_confirm=The User will no longer be able to access the system. Are yo remove_invited_user_confirm=The User will no longer be able to access the documents and folders in this space. Are you sure you want to remove user \"{0}\"? remove_content_user_confirm=The User will no longer be able to access this content. Are you sure you want to remove user \"{0}\"? delete_companyroot_confirm=WARNING: This folder is a special folder accessed by all Users! Please be sure that you wish to delete this folder. It may cause System Errors if you remove it. +delete_node_not_found=The item you are trying to delete can not be found, this may be because it has already been deleted. Please close this dialog and try the delete operation again. # Status Messages status_space_created=Successfully created space ''{0}''. diff --git a/source/java/org/alfresco/web/bean/forums/DeleteForumDialog.java b/source/java/org/alfresco/web/bean/forums/DeleteForumDialog.java index 22127ae70c..a9a0db8590 100644 --- a/source/java/org/alfresco/web/bean/forums/DeleteForumDialog.java +++ b/source/java/org/alfresco/web/bean/forums/DeleteForumDialog.java @@ -24,7 +24,6 @@ */ package org.alfresco.web.bean.forums; -import java.text.MessageFormat; import java.util.Map; import javax.faces.context.FacesContext; @@ -34,7 +33,6 @@ import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; import org.alfresco.web.app.AlfrescoNavigationHandler; -import org.alfresco.web.app.Application; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.spaces.DeleteSpaceDialog; @@ -108,20 +106,15 @@ public class DeleteForumDialog extends DeleteSpaceDialog } } - // ------------------------------------------------------------------------------ - // Bean Getters and Setters - /** - * Returns the confirmation to display to the user before deleting the content. + * Returns the message bundle id of the confirmation message to display to + * the user before deleting the forum. * - * @return The formatted message to display + * @return The message bundle id */ - public String getConfirmMessage() + @Override + protected String getConfirmMessageId() { - String fileConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(), - "delete_forum_confirm"); - - return MessageFormat.format(fileConfirmMsg, - new Object[] {this.browseBean.getActionSpace().getName()}); + return "delete_forum_confirm"; } } diff --git a/source/java/org/alfresco/web/bean/forums/DeleteTopicDialog.java b/source/java/org/alfresco/web/bean/forums/DeleteTopicDialog.java index ac83d4d019..6d1f917a9c 100644 --- a/source/java/org/alfresco/web/bean/forums/DeleteTopicDialog.java +++ b/source/java/org/alfresco/web/bean/forums/DeleteTopicDialog.java @@ -24,7 +24,6 @@ */ package org.alfresco.web.bean.forums; -import java.text.MessageFormat; import java.util.Map; import javax.faces.context.FacesContext; @@ -34,7 +33,6 @@ import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; import org.alfresco.web.app.AlfrescoNavigationHandler; -import org.alfresco.web.app.Application; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.spaces.DeleteSpaceDialog; @@ -94,20 +92,15 @@ public class DeleteTopicDialog extends DeleteSpaceDialog } } - // ------------------------------------------------------------------------------ - // Bean Getters and Setters - /** - * Returns the confirmation to display to the user before deleting the content. + * Returns the message bundle id of the confirmation message to display to + * the user before deleting the topic. * - * @return The formatted message to display + * @return The message bundle id */ - public String getConfirmMessage() + @Override + protected String getConfirmMessageId() { - String fileConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(), - "delete_topic_confirm"); - - return MessageFormat.format(fileConfirmMsg, - new Object[] {this.browseBean.getActionSpace().getName()}); + return "delete_topic_confirm"; } } diff --git a/source/java/org/alfresco/web/bean/spaces/DeleteSpaceDialog.java b/source/java/org/alfresco/web/bean/spaces/DeleteSpaceDialog.java index effe201522..0dc95e5e2b 100644 --- a/source/java/org/alfresco/web/bean/spaces/DeleteSpaceDialog.java +++ b/source/java/org/alfresco/web/bean/spaces/DeleteSpaceDialog.java @@ -28,7 +28,6 @@ import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; -import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; import javax.transaction.UserTransaction; @@ -43,10 +42,8 @@ import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.app.Application; import org.alfresco.web.bean.content.DeleteContentDialog; import org.alfresco.web.bean.dialog.BaseDialogBean; -import org.alfresco.web.bean.repository.MapNode; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; -import org.alfresco.web.ui.common.Utils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -205,6 +202,10 @@ public class DeleteSpaceDialog extends BaseDialogBean return false; } + protected String getConfirmMessageId() + { + return "delete_space_confirm"; + } // ------------------------------------------------------------------------------ // Bean Getters and Setters @@ -217,10 +218,18 @@ public class DeleteSpaceDialog extends BaseDialogBean public String getConfirmMessage() { String fileConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(), - "delete_space_confirm"); + getConfirmMessageId()); - return MessageFormat.format(fileConfirmMsg, - new Object[] {this.browseBean.getActionSpace().getName()}); + Node node = this.browseBean.getActionSpace(); + if (node != null) + { + return MessageFormat.format(fileConfirmMsg, new Object[] {node.getName()}); + } + else + { + return Application.getMessage(FacesContext.getCurrentInstance(), + "delete_node_not_found"); + } } /** diff --git a/source/java/org/alfresco/web/bean/wcm/DeleteWebsiteDialog.java b/source/java/org/alfresco/web/bean/wcm/DeleteWebsiteDialog.java index 7cf6b0c273..fcab9e1696 100644 --- a/source/java/org/alfresco/web/bean/wcm/DeleteWebsiteDialog.java +++ b/source/java/org/alfresco/web/bean/wcm/DeleteWebsiteDialog.java @@ -24,7 +24,6 @@ */ package org.alfresco.web.bean.wcm; -import java.text.MessageFormat; import java.util.List; import javax.faces.context.FacesContext; @@ -33,7 +32,6 @@ import org.alfresco.model.WCMAppModel; import org.alfresco.service.cmr.avm.AVMService; import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.namespace.RegexQNamePattern; -import org.alfresco.web.app.Application; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.spaces.DeleteSpaceDialog; @@ -70,52 +68,55 @@ public class DeleteWebsiteDialog extends DeleteSpaceDialog { Node websiteNode = this.browseBean.getActionSpace(); - // delete all attached website sandboxes in reverse order to the layering - String storeRoot = (String)websiteNode.getProperties().get(WCMAppModel.PROP_AVMSTORE); - - // Notifiy virtualization server about removing this website - // - // Implementation note: - // - // Because the removal of virtual webapps in the virtualization - // server is recursive, it only needs to be given the name of - // the main staging store. - // - // This notification must occur *prior* to purging content - // within the AVM because the virtualization server must list - // the avm_webapps dir in each store to discover which - // virtual webapps must be unloaded. The virtualization - // server traverses the sandbox's stores in most-to-least - // dependent order, so clients don't have to worry about - // accessing a preview layer whose main layer has been torn - // out from under it. - // - // It does not matter what webapp name we give here, so "/ROOT" - // is as sensible as anything else. It's all going away. - - String sandbox = AVMUtil.buildStagingStoreName(storeRoot); - String path = AVMUtil.buildStoreWebappPath(sandbox, "/ROOT"); - AVMUtil.removeVServerWebapp(path, true); - - - // get the list of users who have a sandbox in the website - List userInfoRefs = nodeService.getChildAssocs( - websiteNode.getNodeRef(), WCMAppModel.ASSOC_WEBUSER, RegexQNamePattern.MATCH_ALL); - for (ChildAssociationRef ref : userInfoRefs) + if (websiteNode != null) { - String username = (String)nodeService.getProperty(ref.getChildRef(), WCMAppModel.PROP_WEBUSERNAME); + // delete all attached website sandboxes in reverse order to the layering + String storeRoot = (String)websiteNode.getProperties().get(WCMAppModel.PROP_AVMSTORE); + + // Notifiy virtualization server about removing this website + // + // Implementation note: + // + // Because the removal of virtual webapps in the virtualization + // server is recursive, it only needs to be given the name of + // the main staging store. + // + // This notification must occur *prior* to purging content + // within the AVM because the virtualization server must list + // the avm_webapps dir in each store to discover which + // virtual webapps must be unloaded. The virtualization + // server traverses the sandbox's stores in most-to-least + // dependent order, so clients don't have to worry about + // accessing a preview layer whose main layer has been torn + // out from under it. + // + // It does not matter what webapp name we give here, so "/ROOT" + // is as sensible as anything else. It's all going away. + + String sandbox = AVMUtil.buildStagingStoreName(storeRoot); + String path = AVMUtil.buildStoreWebappPath(sandbox, "/ROOT"); + AVMUtil.removeVServerWebapp(path, true); + - // delete the preview store for this user - deleteStore(AVMUtil.buildUserPreviewStoreName(storeRoot, username)); + // get the list of users who have a sandbox in the website + List userInfoRefs = nodeService.getChildAssocs( + websiteNode.getNodeRef(), WCMAppModel.ASSOC_WEBUSER, RegexQNamePattern.MATCH_ALL); + for (ChildAssociationRef ref : userInfoRefs) + { + String username = (String)nodeService.getProperty(ref.getChildRef(), WCMAppModel.PROP_WEBUSERNAME); + + // delete the preview store for this user + deleteStore(AVMUtil.buildUserPreviewStoreName(storeRoot, username)); + + // delete the main store for this user + deleteStore(AVMUtil.buildUserMainStoreName(storeRoot, username)); + } - // delete the main store for this user - deleteStore(AVMUtil.buildUserMainStoreName(storeRoot, username)); + // remove the main staging and preview stores + deleteStore(AVMUtil.buildStagingPreviewStoreName(storeRoot)); + deleteStore(AVMUtil.buildStagingStoreName(storeRoot)); } - // remove the main staging and preview stores - deleteStore(AVMUtil.buildStagingPreviewStoreName(storeRoot)); - deleteStore(AVMUtil.buildStagingStoreName(storeRoot)); - // use the super implementation to delete the node itself return super.finishImpl(context, outcome); } @@ -134,21 +135,15 @@ public class DeleteWebsiteDialog extends DeleteSpaceDialog } } - - // ------------------------------------------------------------------------------ - // Bean Getters and Setters - /** - * Returns the confirmation to display to the user before deleting the content. + * Returns the message bundle id of the confirmation message to display to + * the user before deleting the website. * - * @return The formatted message to display + * @return The message bundle id */ - public String getConfirmMessage() + @Override + protected String getConfirmMessageId() { - String fileConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(), - "delete_website_confirm"); - - return MessageFormat.format(fileConfirmMsg, - new Object[] {this.browseBean.getActionSpace().getName()}); + return "delete_website_confirm"; } } diff --git a/source/web/images/filetypes/docx.gif b/source/web/images/filetypes/docx.gif new file mode 100644 index 0000000000..93143faf63 Binary files /dev/null and b/source/web/images/filetypes/docx.gif differ diff --git a/source/web/images/filetypes/docx.png b/source/web/images/filetypes/docx.png new file mode 100644 index 0000000000..7e9bfe7b57 Binary files /dev/null and b/source/web/images/filetypes/docx.png differ diff --git a/source/web/images/filetypes/pptx.gif b/source/web/images/filetypes/pptx.gif new file mode 100644 index 0000000000..adf91acbe4 Binary files /dev/null and b/source/web/images/filetypes/pptx.gif differ diff --git a/source/web/images/filetypes/pptx.png b/source/web/images/filetypes/pptx.png new file mode 100644 index 0000000000..df5799ec5f Binary files /dev/null and b/source/web/images/filetypes/pptx.png differ diff --git a/source/web/images/filetypes/xlsx.gif b/source/web/images/filetypes/xlsx.gif new file mode 100644 index 0000000000..033d9e5e96 Binary files /dev/null and b/source/web/images/filetypes/xlsx.gif differ diff --git a/source/web/images/filetypes/xlsx.png b/source/web/images/filetypes/xlsx.png new file mode 100644 index 0000000000..8a9453f004 Binary files /dev/null and b/source/web/images/filetypes/xlsx.png differ diff --git a/source/web/images/filetypes/xslx.gif b/source/web/images/filetypes/xslx.gif new file mode 100644 index 0000000000..033d9e5e96 Binary files /dev/null and b/source/web/images/filetypes/xslx.gif differ diff --git a/source/web/images/filetypes/xslx.png b/source/web/images/filetypes/xslx.png new file mode 100644 index 0000000000..8a9453f004 Binary files /dev/null and b/source/web/images/filetypes/xslx.png differ diff --git a/source/web/images/filetypes32/docx.gif b/source/web/images/filetypes32/docx.gif new file mode 100644 index 0000000000..ff90a73abb Binary files /dev/null and b/source/web/images/filetypes32/docx.gif differ diff --git a/source/web/images/filetypes32/pptx.gif b/source/web/images/filetypes32/pptx.gif new file mode 100644 index 0000000000..37cbd8b8b8 Binary files /dev/null and b/source/web/images/filetypes32/pptx.gif differ diff --git a/source/web/images/filetypes64/docx.png b/source/web/images/filetypes64/docx.png new file mode 100644 index 0000000000..c4816069bc Binary files /dev/null and b/source/web/images/filetypes64/docx.png differ diff --git a/source/web/images/filetypes64/pptx.png b/source/web/images/filetypes64/pptx.png new file mode 100644 index 0000000000..50b4c77a25 Binary files /dev/null and b/source/web/images/filetypes64/pptx.png differ