. "Paste As Link" and link object support in the web-client:

. Filetype icons for PSD (Photoshop) file-format
. Import, Export and Manage Space Users actions added to Forums details page
. Manage Space Users action added to Forum and Topic details pages
. Removed some obsolete JSF navigation outcomes from dialogs/faces-config
. Approx 10% performance improvement when showing large search results pages

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2582 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-03-27 15:46:20 +00:00
parent 9be6273144
commit 8187b27ecf
41 changed files with 1578 additions and 199 deletions

View File

@@ -155,7 +155,19 @@ public class SpaceDetailsBean
*/
public String getWebdavUrl()
{
return Utils.generateURL(FacesContext.getCurrentInstance(), getSpace(), URLMode.WEBDAV);
Node space = getLinkResolvedSpace();
return Utils.generateURL(FacesContext.getCurrentInstance(), space, URLMode.WEBDAV);
}
/**
* Returns the CIFS path for the current space
*
* @return The CIFS path
*/
public String getCifsPath()
{
Node space = getLinkResolvedSpace();
return Utils.generateURL(FacesContext.getCurrentInstance(), space, URLMode.CIFS);
}
/**
@@ -169,13 +181,19 @@ public class SpaceDetailsBean
}
/**
* Returns the CIFS path for the current space
* Resolve the actual space Node from any Link object that may be proxying it
*
* @return The CIFS path
* @return current space Node or space Node resolved from any Link object
*/
public String getCifsPath()
private Node getLinkResolvedSpace()
{
return Utils.generateURL(FacesContext.getCurrentInstance(), getSpace(), URLMode.CIFS);
Node space = getSpace();
if (ContentModel.TYPE_FOLDERLINK.equals(space.getType()))
{
NodeRef destRef = (NodeRef)space.getProperties().get(ContentModel.PROP_LINK_DESTINATION);
space = new Node(destRef);
}
return space;
}
/**
@@ -312,20 +330,22 @@ public class SpaceDetailsBean
*/
public void takeOwnership(ActionEvent event)
{
FacesContext fc = FacesContext.getCurrentInstance();
UserTransaction tx = null;
try
{
tx = Repository.getUserTransaction(FacesContext.getCurrentInstance());
tx = Repository.getUserTransaction(fc);
tx.begin();
this.ownableService.takeOwnership(getSpace().getNodeRef());
FacesContext context = FacesContext.getCurrentInstance();
String msg = Application.getMessage(context, MSG_SUCCESS_OWNERSHIP);
String msg = Application.getMessage(fc, MSG_SUCCESS_OWNERSHIP);
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg);
context.addMessage("space-details:space-props", facesMsg);
String formId = Utils.getParentForm(fc, event.getComponent()).getClientId(fc);
fc.addMessage(formId + ":space-props", facesMsg);
// commit the transaction
tx.commit();
}
@@ -334,7 +354,7 @@ public class SpaceDetailsBean
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e);
fc, Repository.ERROR_GENERIC), e.getMessage()), e);
}
}