mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.1 to HEAD
6455: OpenOffice transformer and extractor register regardless of the initial connection state. 6456: Fix for WCM-636 (Clicking OK twice while deleting web project results in exception) 6457: Updated installers and associated config 6458: AR-1669 Add getQnamePath to Javascript 6459: Fix for AWC-1456 - Word and Excel documents were being stored as octet streams rather than their correct mimetype 6460: Reverse order of reject & approve transitions, so that approve appears first in list of ui actions. 6461: Removed Process.exe (often detected as a virus) and updated config wizard. 6462: Switch to synchronous indexing for AVM by default 6463: Better support to query the state of AVM indexes 6464: Added Office 2007 document mimetypes and icons 6465: Added Office 2007 icons without the typo this time git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6736 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
@@ -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";
|
||||
}
|
||||
}
|
||||
|
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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<ChildAssociationRef> 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<ChildAssociationRef> 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";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user