Files
alfresco-community-repo/source/java/org/alfresco/web/bean/wcm/FileDetailsBean.java
Kevin Roast 1ee6e16326 . Refactored client AVM Node class to extend existing Node class - allows the use of existing PermissionEvaluators etc. for a node action
. Permission evaluators added to AVM browse screen top-level actions and file/folder actions
. Permission evaluators added to Edit Details action in File/Folder Details screens
. Each user sandbox is now only visible to the assigned user and all Content Managers
. Import Website Content action hidden unless user has appropriate Write permissions to the main staging area (Content Managers only)
. Added Titled aspect to shtml content created through the XML Templating Service.
. Remove Create Content action from sandbox screen - makes no sense here until we can create via workflow or destination folder
. Fix nasty bug in Create Form Wizard where no default extension would be specified
  - this led to the XForms generating files such as "myfile.xml" and "myfile." - the generated HTML did not have a file extension...

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4048 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2006-10-06 12:53:22 +00:00

96 lines
2.4 KiB
Java

/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.web.bean.wcm;
import java.util.List;
import org.alfresco.web.app.servlet.DownloadContentServlet;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.ui.common.Utils;
/**
* Backing bean for File Details page.
*
* @author Kevin Roast
*/
public class FileDetailsBean extends AVMDetailsBean
{
/**
* @see org.alfresco.web.bean.wcm.AVMDetailsBean#getAvmNode()
*/
@Override
public AVMNode getAvmNode()
{
return this.avmBrowseBean.getAvmActionNode();
}
/**
* @return a Node wrapper of the AVM File Node - for property sheet support
*/
public Node getDocument()
{
return new Node(getAvmNode().getNodeRef());
}
/**
* Returns the URL to the content for the current document
*
* @return Content url to the current document
*/
public String getBrowserUrl()
{
return DownloadContentServlet.generateBrowserURL(getAvmNode().getNodeRef(), getAvmNode().getName());
}
/**
* Returns the download URL to the content for the current document
*
* @return Download url to the current document
*/
public String getDownloadUrl()
{
return DownloadContentServlet.generateDownloadURL(getAvmNode().getNodeRef(), getAvmNode().getName());
}
/**
* Returns the virtualisation server URL to the content for the current document
*
* @return Preview url for the current document
*/
public String getPreviewUrl()
{
return AVMConstants.buildAVMAssetUrl(getAvmNode().getPath());
}
/**
* @return The 32x32 filetype icon for the file
*/
public String getFileType32()
{
return Utils.getFileTypeImage(getAvmNode().getName(), false);
}
/**
* @see org.alfresco.web.bean.wcm.AVMDetailsBean#getNodes()
*/
@Override
protected List<AVMNode> getNodes()
{
return (List)this.avmBrowseBean.getFiles();
}
}