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:
@@ -2566,4 +2566,54 @@ public class AVMRepository
|
||||
fLookupCount.set(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the encoding on a node.
|
||||
* @param path
|
||||
* @param encoding
|
||||
*/
|
||||
public void setEncoding(String path, String encoding)
|
||||
{
|
||||
fLookupCount.set(1);
|
||||
try
|
||||
{
|
||||
String [] pathParts = SplitPath(path);
|
||||
AVMStore store = getAVMStoreByName(pathParts[0]);
|
||||
if (store == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Store Not Found: " + pathParts[0]);
|
||||
}
|
||||
fLookupCache.onWrite(pathParts[0]);
|
||||
store.setEncoding(pathParts[1], encoding);
|
||||
}
|
||||
finally
|
||||
{
|
||||
fLookupCount.set(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the mime type on a node.
|
||||
* @param path
|
||||
* @param encoding
|
||||
*/
|
||||
public void setMimeType(String path, String mimeType)
|
||||
{
|
||||
fLookupCount.set(1);
|
||||
try
|
||||
{
|
||||
String [] pathParts = SplitPath(path);
|
||||
AVMStore store = getAVMStoreByName(pathParts[0]);
|
||||
if (store == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Store Not Found: " + pathParts[0]);
|
||||
}
|
||||
fLookupCache.onWrite(pathParts[0]);
|
||||
store.setMimeType(pathParts[1], mimeType);
|
||||
}
|
||||
finally
|
||||
{
|
||||
fLookupCount.set(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user