Java Code Examples for org.alfresco.service.cmr.repository.NodeRef#getNodeRefs()
The following examples show how to use
org.alfresco.service.cmr.repository.NodeRef#getNodeRefs() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContentModelFormPersister.java From alfresco-repository with GNU Lesser General Public License v3.0 | 6 votes |
protected boolean changeAssociation(DataKeyInfo info, FieldData fieldData) { Object rawValue = fieldData.getValue(); if (rawValue instanceof String) { List<NodeRef> values = NodeRef.getNodeRefs((String)rawValue, LOGGER); if (values.isEmpty()==false) { boolean add = info.isAdd(); if (info.getFieldType() == FieldType.ASSOCIATION) { return changeAssociation(info.getQName(), values, add); } else { return changeTransientAssociation(info.getFieldName(), values, add); } } } return false; }
Example 2
Source File: TaskUpdater.java From alfresco-repository with GNU Lesser General Public License v3.0 | 5 votes |
public boolean changeAssociation(QName name, String nodeRefs, boolean isAdd) { List<NodeRef> value = NodeRef.getNodeRefs(nodeRefs, LOGGER); if (value == null) { return false; } Map<QName, List<NodeRef>> map = getAssociationMap(isAdd); if (map != null) { map.put(name, value); return true; } return false; }
Example 3
Source File: PackageManager.java From alfresco-repository with GNU Lesser General Public License v3.0 | 2 votes |
/** * Takes a comma-separated list of {@link NodeRef} ids and adds the * specified NodeRefs to the package. * * @param items String */ public void addItems(String items) { List<NodeRef> nodes = NodeRef.getNodeRefs(items); addItems(nodes); }
Example 4
Source File: PackageManager.java From alfresco-repository with GNU Lesser General Public License v3.0 | 2 votes |
/** * Takes a comma-separated list of {@link NodeRef} ids and adds the * specified NodeRefs to the package. * * @param items String */ public void removeItems(String items) { List<NodeRef> nodes = NodeRef.getNodeRefs(items); removeItems(nodes); }