mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.2 to HEAD
7410: Node Browser changes git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8350 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,6 +27,7 @@ package org.alfresco.web.bean.admin;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -37,6 +38,8 @@ import javax.faces.model.ListDataModel;
|
|||||||
import javax.faces.model.SelectItem;
|
import javax.faces.model.SelectItem;
|
||||||
|
|
||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
|
import org.alfresco.repo.domain.PropertyValue;
|
||||||
|
import org.alfresco.service.cmr.avm.AVMService;
|
||||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||||
@@ -99,6 +102,7 @@ public class AdminNodeBrowseBean implements Serializable
|
|||||||
transient private DataModel assocs = null;
|
transient private DataModel assocs = null;
|
||||||
private Boolean inheritPermissions = null;
|
private Boolean inheritPermissions = null;
|
||||||
transient private DataModel permissions = null;
|
transient private DataModel permissions = null;
|
||||||
|
transient private DataModel avmStoreProps = null;
|
||||||
|
|
||||||
// supporting repository services
|
// supporting repository services
|
||||||
transient private NodeService nodeService;
|
transient private NodeService nodeService;
|
||||||
@@ -106,6 +110,7 @@ public class AdminNodeBrowseBean implements Serializable
|
|||||||
transient private SearchService searchService;
|
transient private SearchService searchService;
|
||||||
transient private NamespaceService namespaceService;
|
transient private NamespaceService namespaceService;
|
||||||
transient private PermissionService permissionService;
|
transient private PermissionService permissionService;
|
||||||
|
transient private AVMService avmService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param nodeService node service
|
* @param nodeService node service
|
||||||
@@ -192,6 +197,23 @@ public class AdminNodeBrowseBean implements Serializable
|
|||||||
return permissionService;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the list of repository stores
|
* Gets the list of repository stores
|
||||||
*
|
*
|
||||||
@@ -402,6 +424,41 @@ public class AdminNodeBrowseBean implements Serializable
|
|||||||
return assocs;
|
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().getActualType());
|
||||||
|
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
|
* Gets the current query language
|
||||||
*
|
*
|
||||||
@@ -472,6 +529,9 @@ public class AdminNodeBrowseBean implements Serializable
|
|||||||
StoreRef storeRef = (StoreRef)getStores().getRowData();
|
StoreRef storeRef = (StoreRef)getStores().getRowData();
|
||||||
NodeRef rootNode = getNodeService().getRootNode(storeRef);
|
NodeRef rootNode = getNodeService().getRootNode(storeRef);
|
||||||
setNodeRef(rootNode);
|
setNodeRef(rootNode);
|
||||||
|
|
||||||
|
this.avmStoreProps = null;
|
||||||
|
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1032,4 +1032,30 @@ a.sidebarButtonLink, a.sidebarButtonLink:link, a.sidebarButtonLink:visited
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nodeBrowserForm
|
||||||
|
{
|
||||||
|
border-top: 1px dotted #aaa;
|
||||||
|
padding: 8px;
|
||||||
|
margin: 4px 4px 16px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nodeBrowserTable
|
||||||
|
{
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 1px solid #aaa;
|
||||||
|
margin-top: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nodeBrowserTable th
|
||||||
|
{
|
||||||
|
background-color: #dfe6ed;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 4px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nodeBrowserTable td
|
||||||
|
{
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -23,7 +23,9 @@
|
|||||||
* http://www.alfresco.com/legal/licensing"
|
* http://www.alfresco.com/legal/licensing"
|
||||||
--%>
|
--%>
|
||||||
|
|
||||||
<h:form id="node-browser-titlebar">
|
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
||||||
|
|
||||||
|
<h:form id="node-browser-titlebar" style="margin-bottom: 8px;">
|
||||||
|
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -40,5 +42,3 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
</h:form>
|
</h:form>
|
||||||
|
|
||||||
<br>
|
|
||||||
|
@@ -40,13 +40,13 @@
|
|||||||
|
|
||||||
<%@ include file="admin-title.jsp" %>
|
<%@ include file="admin-title.jsp" %>
|
||||||
|
|
||||||
<h:form id="searchForm">
|
<h:form id="searchForm" styleClass="nodeBrowserForm">
|
||||||
|
|
||||||
<h:commandLink id="selectStores" action="#{AdminNodeBrowseBean.selectStores}">
|
<h:commandLink id="selectStores" action="#{AdminNodeBrowseBean.selectStores}">
|
||||||
<h:outputText styleClass="mainSubText" value="Stores"/>
|
<h:outputText styleClass="mainSubText" value="Stores"/>
|
||||||
</h:commandLink>
|
</h:commandLink>
|
||||||
<br>
|
<br/>
|
||||||
<br>
|
<br/>
|
||||||
|
|
||||||
<h:outputText styleClass="mainTitle" value="Search"/>
|
<h:outputText styleClass="mainTitle" value="Search"/>
|
||||||
|
|
||||||
@@ -73,10 +73,10 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<br/>
|
||||||
<h:outputText styleClass="mainTitle" value="Node Identifier"/>
|
<h:outputText styleClass="mainTitle" value="Node Identifier"/>
|
||||||
|
|
||||||
<table>
|
<table cellpadding="4" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><nobr><b>Primary Path:</b></nobr></td><td>
|
<td><nobr><b>Primary Path:</b></nobr></td><td>
|
||||||
<nobr>
|
<nobr>
|
||||||
@@ -102,10 +102,10 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br>
|
<br/>
|
||||||
<h:outputText styleClass="mainTitle" value="Properties"/>
|
<h:outputText styleClass="mainTitle" value="Properties"/>
|
||||||
|
|
||||||
<h:dataTable id="properties" border="1" value="#{AdminNodeBrowseBean.properties}" var="property">
|
<h:dataTable id="properties" border="1" value="#{AdminNodeBrowseBean.properties}" var="property" styleClass="nodeBrowserTable">
|
||||||
<h:column>
|
<h:column>
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<h:outputText value="Name"/>
|
<h:outputText value="Name"/>
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
</h:column>
|
</h:column>
|
||||||
</h:dataTable>
|
</h:dataTable>
|
||||||
|
|
||||||
<br>
|
<br/>
|
||||||
<h:outputText styleClass="mainTitle" value="Aspects"/>
|
<h:outputText styleClass="mainTitle" value="Aspects"/>
|
||||||
|
|
||||||
<h:dataTable id="aspects" value="#{AdminNodeBrowseBean.aspects}" var="aspect">
|
<h:dataTable id="aspects" value="#{AdminNodeBrowseBean.aspects}" var="aspect">
|
||||||
@@ -163,7 +163,7 @@
|
|||||||
</h:column>
|
</h:column>
|
||||||
</h:dataTable>
|
</h:dataTable>
|
||||||
|
|
||||||
<br>
|
<br/>
|
||||||
<h:outputText styleClass="mainTitle" value="Permissions"/>
|
<h:outputText styleClass="mainTitle" value="Permissions"/>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@@ -172,8 +172,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br>
|
<h:dataTable id="permissions" border="1" value="#{AdminNodeBrowseBean.permissions}" var="permission" styleClass="nodeBrowserTable">
|
||||||
<h:dataTable id="permissions" border="1" value="#{AdminNodeBrowseBean.permissions}" var="permission">
|
|
||||||
<h:column>
|
<h:column>
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<h:outputText value="Assigned Permission"/>
|
<h:outputText value="Assigned Permission"/>
|
||||||
@@ -194,10 +193,10 @@
|
|||||||
</h:column>
|
</h:column>
|
||||||
</h:dataTable>
|
</h:dataTable>
|
||||||
|
|
||||||
<br>
|
<br/>
|
||||||
<h:outputText styleClass="mainTitle" value="Children"/>
|
<h:outputText styleClass="mainTitle" value="Children"/>
|
||||||
|
|
||||||
<h:dataTable id="children" border="1" value="#{AdminNodeBrowseBean.children}" var="child">
|
<h:dataTable id="children" border="1" value="#{AdminNodeBrowseBean.children}" var="child" styleClass="nodeBrowserTable">
|
||||||
<h:column>
|
<h:column>
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<h:outputText value="Child Name"/>
|
<h:outputText value="Child Name"/>
|
||||||
@@ -232,10 +231,10 @@
|
|||||||
</h:column>
|
</h:column>
|
||||||
</h:dataTable>
|
</h:dataTable>
|
||||||
|
|
||||||
<br>
|
<br/>
|
||||||
<h:outputText styleClass="mainTitle" value="Associations"/>
|
<h:outputText styleClass="mainTitle" value="Associations"/>
|
||||||
|
|
||||||
<h:dataTable id="assocs" border="1" value="#{AdminNodeBrowseBean.assocs}" var="assoc">
|
<h:dataTable id="assocs" border="1" value="#{AdminNodeBrowseBean.assocs}" var="assoc" styleClass="nodeBrowserTable">
|
||||||
<h:column>
|
<h:column>
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<h:outputText value="To Node"/>
|
<h:outputText value="To Node"/>
|
||||||
@@ -253,10 +252,10 @@
|
|||||||
</h:column>
|
</h:column>
|
||||||
</h:dataTable>
|
</h:dataTable>
|
||||||
|
|
||||||
<br>
|
<br/>
|
||||||
<h:outputText styleClass="mainTitle" value="Parents"/>
|
<h:outputText styleClass="mainTitle" value="Parents"/>
|
||||||
|
|
||||||
<h:dataTable id="parents" border="1" value="#{AdminNodeBrowseBean.parents}" var="parent">
|
<h:dataTable id="parents" border="1" value="#{AdminNodeBrowseBean.parents}" var="parent" styleClass="nodeBrowserTable">
|
||||||
<h:column>
|
<h:column>
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<h:outputText value="Child Name"/>
|
<h:outputText value="Child Name"/>
|
||||||
@@ -285,6 +284,34 @@
|
|||||||
</h:column>
|
</h:column>
|
||||||
</h:dataTable>
|
</h:dataTable>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<h:panelGroup id="storePropsPanel" rendered="#{AdminNodeBrowseBean.inAVMStore}">
|
||||||
|
|
||||||
|
<h:outputText styleClass="mainTitle" value="AVM Store Properties"/>
|
||||||
|
|
||||||
|
<h:dataTable id="storeProperties" border="1" value="#{AdminNodeBrowseBean.AVMStoreProperties}" var="storeProp"
|
||||||
|
styleClass="nodeBrowserTable">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputText value="Name"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputText value="#{storeProp.name}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputText value="Value"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputText value="#{storeProp.value}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputText value="Type"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputText value="#{storeProp.type}"/>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
</h:panelGroup>
|
||||||
|
|
||||||
</h:form>
|
</h:form>
|
||||||
|
|
||||||
</f:view>
|
</f:view>
|
||||||
|
@@ -40,23 +40,17 @@
|
|||||||
|
|
||||||
<%@ include file="admin-title.jsp" %>
|
<%@ include file="admin-title.jsp" %>
|
||||||
|
|
||||||
<h:form id="searchForm">
|
<h:form id="searchForm" styleClass="nodeBrowserForm">
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<h:commandLink action="#{AdminNodeBrowseBean.selectStores}">
|
<h:commandLink action="#{AdminNodeBrowseBean.selectStores}">
|
||||||
<h:outputText value="Stores"/>
|
<h:outputText styleClass="mainSubText" value="Stores"/>
|
||||||
</h:commandLink>
|
</h:commandLink>
|
||||||
</td>
|
<span class="mainSubText"> | </span>
|
||||||
<td> | </td>
|
|
||||||
<td>
|
|
||||||
<h:commandLink action="nodeBrowser">
|
<h:commandLink action="nodeBrowser">
|
||||||
<h:outputText value="Node Browser"/>
|
<h:outputText styleClass="mainSubText" value="Node Browser"/>
|
||||||
</h:commandLink>
|
</h:commandLink>
|
||||||
</td>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br>
|
<br/>
|
||||||
|
<br/>
|
||||||
<h:outputText styleClass="mainTitle" value="Search"/>
|
<h:outputText styleClass="mainTitle" value="Search"/>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
@@ -68,10 +62,10 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br>
|
<br/>
|
||||||
<span class="mainTitle">Results (<h:outputText value="#{AdminNodeBrowseBean.searchResults.length}"/> rows)</span>
|
<span class="mainTitle">Results (<h:outputText value="#{AdminNodeBrowseBean.searchResults.length}"/> rows)</span>
|
||||||
|
|
||||||
<h:dataTable id="searchResults" border="1" value="#{AdminNodeBrowseBean.searchResults.rows}" var="row">
|
<h:dataTable id="searchResults" border="1" value="#{AdminNodeBrowseBean.searchResults.rows}" var="row" styleClass="nodeBrowserTable">
|
||||||
<h:column>
|
<h:column>
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<h:outputText value="Name"/>
|
<h:outputText value="Name"/>
|
||||||
|
@@ -40,17 +40,17 @@
|
|||||||
|
|
||||||
<%@ include file="admin-title.jsp" %>
|
<%@ include file="admin-title.jsp" %>
|
||||||
|
|
||||||
<h:form id="searchForm">
|
<h:form id="searchForm" styleClass="nodeBrowserForm">
|
||||||
<h:commandLink action="#{AdminNodeBrowseBean.selectStores}">
|
<h:commandLink action="#{AdminNodeBrowseBean.selectStores}">
|
||||||
<h:outputText styleClass="mainSubText" value="Refresh view"/>
|
<h:outputText styleClass="mainSubText" value="Refresh view"/>
|
||||||
</h:commandLink>
|
</h:commandLink>
|
||||||
|
|
||||||
<br>
|
<br/>
|
||||||
<br>
|
<br/>
|
||||||
<h:outputText styleClass="mainTitle" value="Stores"/>
|
<h:outputText styleClass="mainTitle" value="Stores"/>
|
||||||
<br>
|
<br/>
|
||||||
|
|
||||||
<h:dataTable id="stores" border="1" value="#{AdminNodeBrowseBean.stores}" var="store">
|
<h:dataTable id="stores" border="1" value="#{AdminNodeBrowseBean.stores}" var="store" styleClass="nodeBrowserTable">
|
||||||
<h:column>
|
<h:column>
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<h:outputText value="Reference"/>
|
<h:outputText value="Reference"/>
|
||||||
|
Reference in New Issue
Block a user