mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added support for link nodes in the repo filesystem driver.
Includes a patch to update existing link node file extensions from .lnk to .url, as CIFS requires .url files to generate the file:// links. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4947 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -35,7 +35,9 @@ import org.alfresco.service.namespace.QName;
|
||||
public class FileInfoImpl implements FileInfo
|
||||
{
|
||||
private NodeRef nodeRef;
|
||||
private NodeRef linkNodeRef;
|
||||
private boolean isFolder;
|
||||
private boolean isLink;
|
||||
private Map<QName, Serializable> properties;
|
||||
|
||||
/**
|
||||
@@ -46,6 +48,14 @@ public class FileInfoImpl implements FileInfo
|
||||
this.nodeRef = nodeRef;
|
||||
this.isFolder = isFolder;
|
||||
this.properties = properties;
|
||||
|
||||
// Check if this is a link node
|
||||
|
||||
if ( properties.containsKey( ContentModel.PROP_LINK_DESTINATION))
|
||||
{
|
||||
isLink = true;
|
||||
linkNodeRef = (NodeRef) properties.get( ContentModel.PROP_LINK_DESTINATION);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,8 +65,15 @@ public class FileInfoImpl implements FileInfo
|
||||
sb.append("FileInfo")
|
||||
.append("[name=").append(getName())
|
||||
.append(", isFolder=").append(isFolder)
|
||||
.append(", nodeRef=").append(nodeRef)
|
||||
.append("]");
|
||||
.append(", nodeRef=").append(nodeRef);
|
||||
|
||||
if ( isLink())
|
||||
{
|
||||
sb.append(", linkref=");
|
||||
sb.append(linkNodeRef);
|
||||
}
|
||||
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -70,6 +87,16 @@ public class FileInfoImpl implements FileInfo
|
||||
return isFolder;
|
||||
}
|
||||
|
||||
public boolean isLink()
|
||||
{
|
||||
return isLink;
|
||||
}
|
||||
|
||||
public NodeRef getLinkNodeRef()
|
||||
{
|
||||
return linkNodeRef;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return (String) properties.get(ContentModel.PROP_NAME);
|
||||
|
Reference in New Issue
Block a user