Merge from HEAD into WCM-DEV2. Also fixes build breakage in

jndi-client and catalina-virtual that I introduced earlier. 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3393 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-07-24 18:27:41 +00:00
parent ca9496d090
commit f6355ea108
171 changed files with 11880 additions and 3450 deletions

View File

@@ -95,6 +95,24 @@ public class CreateSpaceWizard extends BaseWizardBean
this.saveAsTemplate = false;
}
public String next()
{
// if the user has chosen to create the space from an existing
// space or from a template we need to find it's type to show
// the current set of icons.
if (this.createFrom.equals("existing") && this.existingSpaceId != null)
{
this.spaceType = this.nodeService.getType(this.existingSpaceId).toString();
}
else if (this.createFrom.equals("template") && this.templateSpaceId != null)
{
NodeRef templateNode = new NodeRef(Repository.getStoreRef(), this.templateSpaceId);
this.spaceType = this.nodeService.getType(templateNode).toString();
}
return null;
}
@Override
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
@@ -611,6 +629,7 @@ public class CreateSpaceWizard extends BaseWizardBean
// which the user can change during the advanced space wizard
List<UIListItem> icons = null;
List<String> iconNames = new ArrayList<String>(8);
QName type = QName.createQName(this.spaceType);
String typePrefixForm = type.toPrefixString(this.namespaceService);
@@ -648,6 +667,7 @@ public class CreateSpaceWizard extends BaseWizardBean
item.setValue(iconName);
item.getAttributes().put("image", iconPath);
icons.add(item);
iconNames.add(iconName);
}
}
}
@@ -660,9 +680,17 @@ public class CreateSpaceWizard extends BaseWizardBean
this.icon = DEFAULT_SPACE_ICON_NAME;
UIListItem item = new UIListItem();
item.setValue("space-icon-default");
item.setValue(DEFAULT_SPACE_ICON_NAME);
item.getAttributes().put("image", "/images/icons/space-icon-default.gif");
icons.add(item);
iconNames.add(DEFAULT_SPACE_ICON_NAME);
}
// make sure the current value for the icon is valid for the
// current list of icons about to be displayed
if (iconNames.contains(this.icon) == false)
{
this.icon = iconNames.get(0);
}
return icons;

View File

@@ -0,0 +1,100 @@
package org.alfresco.web.bean.spaces;
import java.text.MessageFormat;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
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.Node;
import org.alfresco.web.ui.common.Utils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Bean implementation for the "Delete Space" dialog
*
* @author gavinc
*/
public class DeleteSpaceDialog extends BaseDialogBean
{
private static final Log logger = LogFactory.getLog(DeleteContentDialog.class);
// ------------------------------------------------------------------------------
// Dialog implementation
@Override
protected String finishImpl(FacesContext context, String outcome)
throws Exception
{
// get the space to delete
Node node = this.browseBean.getActionSpace();
if (node != null)
{
if (logger.isDebugEnabled())
logger.debug("Trying to delete space: " + node.getId());
this.nodeService.deleteNode(node.getNodeRef());
}
else
{
logger.warn("WARNING: delete called without a current Space!");
}
return outcome;
}
@Override
protected String doPostCommitProcessing(FacesContext context, String outcome)
{
Node node = this.browseBean.getActionSpace();
// remove this node from the breadcrumb if required
this.browseBean.removeSpaceFromBreadcrumb(node);
// add a message to inform the user that the delete was OK
String statusMsg = MessageFormat.format(
Application.getMessage(FacesContext.getCurrentInstance(), "status_space_deleted"),
new Object[]{node.getName()});
Utils.addStatusMessage(FacesMessage.SEVERITY_INFO, statusMsg);
// clear action context
this.browseBean.setActionSpace(null);
// setting the outcome will show the browse view again
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME +
AlfrescoNavigationHandler.OUTCOME_SEPARATOR + "browse";
}
@Override
protected String getErrorMessageId()
{
return "error_delete_space";
}
@Override
public boolean getFinishButtonDisabled()
{
return false;
}
// ------------------------------------------------------------------------------
// Bean Getters and Setters
/**
* Returns the confirmation to display to the user before deleting the content.
*
* @return The formatted message to display
*/
public String getConfirmMessage()
{
String fileConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(),
"delete_space_confirm");
return MessageFormat.format(fileConfirmMsg,
new Object[] {this.browseBean.getActionSpace().getName()});
}
}