Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

78414: Merged EOL (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      75784: ACE-2149: EOL AVM / WCM
       - Get 'web-client' project to compile
       - For further work, all bits that required commenting or changing were tagged with '// WCM'
         i.e. a search for 'WCM' will highlight all the code changes made
       - TODO: Visit jsp files and other config to do a proper job


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82546 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Erik Winlof
2014-09-03 12:08:20 +00:00
parent 5cf4251421
commit 34d911b025
35 changed files with 1176 additions and 3862 deletions

View File

@@ -22,7 +22,6 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -33,9 +32,7 @@ import javax.faces.model.ListDataModel;
import javax.faces.model.SelectItem;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
@@ -114,7 +111,8 @@ public class AdminNodeBrowseBean implements Serializable
transient private SearchService searchService;
transient private NamespaceService namespaceService;
transient private PermissionService permissionService;
transient private AVMService avmService;
// // WCM
// transient private AVMService avmService;
/**
* @param transactionService transaction service
@@ -218,23 +216,24 @@ public class AdminNodeBrowseBean implements Serializable
return permissionService;
}
/**
* @param avmService AVM service
*/
public void setAVMService(AVMService avmService)
{
this.avmService = avmService;
}
private AVMService getAVMService()
{
if (avmService == null)
{
avmService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getAVMService();
}
return avmService;
}
// // WCM
// /**
// * @param avmService AVM service
// */
// public void setAVMService(AVMService avmService)
// {
// this.avmService = avmService;
// }
//
// private AVMService getAVMService()
// {
// if (avmService == null)
// {
// avmService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getAVMService();
// }
// return avmService;
// }
//
/**
* Gets the list of repository stores
*
@@ -425,17 +424,18 @@ public class AdminNodeBrowseBean implements Serializable
{
if (permissionMasks == null)
{
if (nodeRef.getStoreRef().getProtocol().equals(StoreRef.PROTOCOL_AVM))
{
List<AccessPermission> nodePermissions = new ArrayList<AccessPermission>(getPermissionService().getAllSetPermissions(nodeRef.getStoreRef()));
permissionMasks = new ListDataModel(nodePermissions);
}
else
{
// // WCM
// if (nodeRef.getStoreRef().getProtocol().equals(StoreRef.PROTOCOL_AVM))
// {
// List<AccessPermission> nodePermissions = new ArrayList<AccessPermission>(getPermissionService().getAllSetPermissions(nodeRef.getStoreRef()));
// permissionMasks = new ListDataModel(nodePermissions);
// }
// else
// {
List<NoStoreMask> noReadPermissions = new ArrayList<NoStoreMask>(1);
noReadPermissions.add(new NoStoreMask());
permissionMasks = new ListDataModel(noReadPermissions);
}
// }
}
return permissionMasks;
}
@@ -476,41 +476,43 @@ public class AdminNodeBrowseBean implements Serializable
}
return assocs;
}
public boolean getInAVMStore()
{
return nodeRef.getStoreRef().getProtocol().equals(StoreRef.PROTOCOL_AVM);
}
public DataModel getAVMStoreProperties()
{
if (avmStoreProps == null)
{
// work out the store name from current nodeRef
String store = nodeRef.getStoreRef().getIdentifier();
Map<QName, PropertyValue> props = getAVMService().getStoreProperties(store);
List<Map<String, String>> storeProperties = new ArrayList<Map<String, String>>();
for (Map.Entry<QName, PropertyValue> property : props.entrySet())
{
Map<String, String> map = new HashMap<String, String>(2);
map.put("name", property.getKey().toString());
map.put("type", property.getValue().getActualTypeString());
String val = property.getValue().getStringValue();
if (val == null)
{
val = "null";
}
map.put("value", val);
storeProperties.add(map);
}
avmStoreProps = new ListDataModel(storeProperties);
}
return avmStoreProps;
}
//
// // WCM
// public boolean getInAVMStore()
// {
// return nodeRef.getStoreRef().getProtocol().equals(StoreRef.PROTOCOL_AVM);
// }
//
// // WCM
// public DataModel getAVMStoreProperties()
// {
// if (avmStoreProps == null)
// {
// // work out the store name from current nodeRef
// String store = nodeRef.getStoreRef().getIdentifier();
// Map<QName, PropertyValue> props = getAVMService().getStoreProperties(store);
// List<Map<String, String>> storeProperties = new ArrayList<Map<String, String>>();
//
// for (Map.Entry<QName, PropertyValue> property : props.entrySet())
// {
// Map<String, String> map = new HashMap<String, String>(2);
// map.put("name", property.getKey().toString());
// map.put("type", property.getValue().getActualTypeString());
// String val = property.getValue().getStringValue();
// if (val == null)
// {
// val = "null";
// }
// map.put("value", val);
//
// storeProperties.add(map);
// }
//
// avmStoreProps = new ListDataModel(storeProperties);
// }
//
// return avmStoreProps;
// }
/**
* Gets the current query language