mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Refactoring to support ALF-9510, ALF-8702
ALF-8702: Solr-Repository SSL Communications (see solr/source/solr/instance/HowToSetUpSolr.txt ALF-9510: Initial checkin git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30005 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -27,6 +27,7 @@ import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.node.NodeBulkLoader;
|
||||
import org.alfresco.service.cmr.dictionary.InvalidTypeException;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
||||
@@ -36,6 +37,7 @@ import org.alfresco.service.cmr.repository.StoreExistsException;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.springframework.dao.ConcurrencyFailureException;
|
||||
|
||||
/**
|
||||
* DAO services for <b>alf_node</b> and related tables
|
||||
@@ -671,4 +673,5 @@ public interface NodeDAO extends NodeBulkLoader
|
||||
*/
|
||||
public void setNodeDefiningAclId(Long nodeId, long id);
|
||||
|
||||
public List<NodePropertyEntity> getProperties(Collection<PropertyDefinition> propertyDefs);
|
||||
}
|
||||
|
@@ -49,6 +49,7 @@ import org.alfresco.repo.domain.node.TransactionEntity;
|
||||
import org.alfresco.repo.domain.node.TransactionQueryEntity;
|
||||
import org.alfresco.repo.domain.qname.QNameDAO;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
@@ -90,6 +91,7 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
private static final String SELECT_NODES_BY_UUIDS = "alfresco.node.select_NodesByUuids";
|
||||
private static final String SELECT_NODES_BY_IDS = "alfresco.node.select_NodesByIds";
|
||||
private static final String SELECT_NODE_PROPERTIES = "alfresco.node.select_NodeProperties";
|
||||
private static final String SELECT_PROPERTIES_BY_TYPE = "alfresco.node.select_PropertiesByType";
|
||||
private static final String SELECT_NODE_ASPECTS = "alfresco.node.select_NodeAspects";
|
||||
private static final String INSERT_NODE_PROPERTY = "alfresco.node.insert.insert_NodeProperty";
|
||||
private static final String UPDATE_PRIMARY_CHILDREN_SHARED_ACL = "alfresco.node.update.update_PrimaryChildrenSharedAcl";
|
||||
@@ -1482,6 +1484,31 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl
|
||||
}
|
||||
}
|
||||
|
||||
// TODO - use a callback approach
|
||||
public List<NodePropertyEntity> getProperties(Collection<PropertyDefinition> propertyDefs)
|
||||
{
|
||||
Set<QName> qnames = new HashSet<QName>();
|
||||
for(PropertyDefinition propDef : propertyDefs)
|
||||
{
|
||||
qnames.add(propDef.getName());
|
||||
}
|
||||
|
||||
final List<NodePropertyEntity> props = new ArrayList<NodePropertyEntity>();
|
||||
|
||||
// qnames of properties that are encrypted
|
||||
Set<Long> qnameIds = qnameDAO.convertQNamesToIds(qnames, false);
|
||||
template.select(SELECT_PROPERTIES_BY_TYPE, qnameIds, new ResultHandler()
|
||||
{
|
||||
@Override
|
||||
public void handleResult(ResultContext context)
|
||||
{
|
||||
props.add((NodePropertyEntity)context.getResultObject());
|
||||
}
|
||||
});
|
||||
|
||||
return props;
|
||||
}
|
||||
|
||||
/*
|
||||
* DAO OVERRIDES
|
||||
*/
|
||||
|
Reference in New Issue
Block a user