mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added setEncoding, setMimeType to AVMService and AVMRemote interfaces.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5678 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1472,4 +1472,42 @@ public class AVMStoreImpl implements AVMStore, Serializable
|
||||
AVMNode node = lPath.getCurrentNode();
|
||||
node.setGuid(guid);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.avm.AVMStore#setEncoding(java.lang.String, java.lang.String)
|
||||
*/
|
||||
public void setEncoding(String path, String encoding)
|
||||
{
|
||||
Lookup lPath = lookup(-1, path, true, false);
|
||||
if (lPath == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Path not found: " + path);
|
||||
}
|
||||
AVMNode node = lPath.getCurrentNode();
|
||||
if (node.getType() != AVMNodeType.PLAIN_FILE)
|
||||
{
|
||||
throw new AVMWrongTypeException("Not a File: " + path);
|
||||
}
|
||||
PlainFileNode file = (PlainFileNode)node;
|
||||
file.setEncoding(encoding);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.repo.avm.AVMStore#setMimeType(java.lang.String, java.lang.String)
|
||||
*/
|
||||
public void setMimeType(String path, String mimeType)
|
||||
{
|
||||
Lookup lPath = lookup(-1, path, true, false);
|
||||
if (lPath == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Path not found: " + path);
|
||||
}
|
||||
AVMNode node = lPath.getCurrentNode();
|
||||
if (node.getType() != AVMNodeType.PLAIN_FILE)
|
||||
{
|
||||
throw new AVMWrongTypeException("Not a File: " + path);
|
||||
}
|
||||
PlainFileNode file = (PlainFileNode)node;
|
||||
file.setMimeType(mimeType);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user