mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-07 18:25:23 +00:00
Merged DEV/MOB453 to HEAD
14474: MOB-453 Export multiple root nodes into a single export package (for RM) ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/DEV/MOB453:r14474 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14496 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
801eac5c2c
commit
cbcce91bd8
@ -270,50 +270,52 @@ public class ExporterComponent
|
|||||||
// Export Nodes
|
// Export Nodes
|
||||||
//
|
//
|
||||||
|
|
||||||
// determine if root repository node
|
while (context.canRetrieve())
|
||||||
NodeRef nodeRef = context.getExportOf();
|
|
||||||
if (parameters.isCrawlSelf())
|
|
||||||
{
|
{
|
||||||
// export root node of specified export location
|
// determine if root repository node
|
||||||
walkStartNamespaces(parameters, exporter);
|
NodeRef nodeRef = context.getExportOf();
|
||||||
boolean rootNode = nodeService.getRootNode(nodeRef.getStoreRef()).equals(nodeRef);
|
if (parameters.isCrawlSelf())
|
||||||
walkNode(nodeRef, parameters, exporter, rootNode);
|
|
||||||
walkEndNamespaces(parameters, exporter);
|
|
||||||
}
|
|
||||||
else if (parameters.isCrawlChildNodes())
|
|
||||||
{
|
|
||||||
// export child nodes only
|
|
||||||
List<ChildAssociationRef> childAssocs = nodeService.getChildAssocs(nodeRef);
|
|
||||||
for (ChildAssociationRef childAssoc : childAssocs)
|
|
||||||
{
|
{
|
||||||
|
// export root node of specified export location
|
||||||
walkStartNamespaces(parameters, exporter);
|
walkStartNamespaces(parameters, exporter);
|
||||||
walkNode(childAssoc.getChildRef(), parameters, exporter, false);
|
boolean rootNode = nodeService.getRootNode(nodeRef.getStoreRef()).equals(nodeRef);
|
||||||
|
walkNode(nodeRef, parameters, exporter, rootNode);
|
||||||
walkEndNamespaces(parameters, exporter);
|
walkEndNamespaces(parameters, exporter);
|
||||||
}
|
}
|
||||||
}
|
else if (parameters.isCrawlChildNodes())
|
||||||
|
{
|
||||||
|
// export child nodes only
|
||||||
|
List<ChildAssociationRef> childAssocs = nodeService.getChildAssocs(nodeRef);
|
||||||
|
for (ChildAssociationRef childAssoc : childAssocs)
|
||||||
|
{
|
||||||
|
walkStartNamespaces(parameters, exporter);
|
||||||
|
walkNode(childAssoc.getChildRef(), parameters, exporter, false);
|
||||||
|
walkEndNamespaces(parameters, exporter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Export Secondary Links between Nodes
|
// Export Secondary Links between Nodes
|
||||||
//
|
//
|
||||||
|
for (NodeRef nodeWithAssociations : nodesWithSecondaryLinks.keySet())
|
||||||
for (NodeRef nodeWithAssociations : nodesWithSecondaryLinks.keySet())
|
{
|
||||||
{
|
walkStartNamespaces(parameters, exporter);
|
||||||
walkStartNamespaces(parameters, exporter);
|
walkNodeSecondaryLinks(nodeWithAssociations, parameters, exporter);
|
||||||
walkNodeSecondaryLinks(nodeWithAssociations, parameters, exporter);
|
walkEndNamespaces(parameters, exporter);
|
||||||
walkEndNamespaces(parameters, exporter);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Export Associations between Nodes
|
// Export Associations between Nodes
|
||||||
//
|
//
|
||||||
|
for (NodeRef nodeWithAssociations : nodesWithAssociations.keySet())
|
||||||
|
{
|
||||||
|
walkStartNamespaces(parameters, exporter);
|
||||||
|
walkNodeAssociations(nodeWithAssociations, parameters, exporter);
|
||||||
|
walkEndNamespaces(parameters, exporter);
|
||||||
|
}
|
||||||
|
|
||||||
for (NodeRef nodeWithAssociations : nodesWithAssociations.keySet())
|
context.setNextValue();
|
||||||
{
|
|
||||||
walkStartNamespaces(parameters, exporter);
|
|
||||||
walkNodeAssociations(nodeWithAssociations, parameters, exporter);
|
|
||||||
walkEndNamespaces(parameters, exporter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exporter.end();
|
exporter.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -807,27 +809,28 @@ public class ExporterComponent
|
|||||||
boolean isWithin = false;
|
boolean isWithin = false;
|
||||||
|
|
||||||
// Current strategy is to determine if node is a child of the root exported node
|
// Current strategy is to determine if node is a child of the root exported node
|
||||||
NodeRef exportRoot = context.getExportOf();
|
for (NodeRef exportRoot : context.getExportList())
|
||||||
if (nodeRef.equals(exportRoot) && parameters.isCrawlSelf() == true)
|
|
||||||
{
|
{
|
||||||
// node to export is the root export node (and root is to be exported)
|
if (nodeRef.equals(exportRoot) && parameters.isCrawlSelf() == true)
|
||||||
isWithin = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// locate export root in primary parent path of node
|
|
||||||
Path nodePath = nodeService.getPath(nodeRef);
|
|
||||||
for (int i = nodePath.size() -1; i >= 0; i--)
|
|
||||||
{
|
{
|
||||||
Path.ChildAssocElement pathElement = (Path.ChildAssocElement)nodePath.get(i);
|
// node to export is the root export node (and root is to be exported)
|
||||||
if (pathElement.getRef().getChildRef().equals(exportRoot))
|
isWithin = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// locate export root in primary parent path of node
|
||||||
|
Path nodePath = nodeService.getPath(nodeRef);
|
||||||
|
for (int i = nodePath.size() -1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
isWithin = true;
|
Path.ChildAssocElement pathElement = (Path.ChildAssocElement)nodePath.get(i);
|
||||||
break;
|
if (pathElement.getRef().getChildRef().equals(exportRoot))
|
||||||
|
{
|
||||||
|
isWithin = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return isWithin;
|
return isWithin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -838,12 +841,14 @@ public class ExporterComponent
|
|||||||
*/
|
*/
|
||||||
private class ExporterContextImpl implements ExporterContext
|
private class ExporterContextImpl implements ExporterContext
|
||||||
{
|
{
|
||||||
private NodeRef exportOf;
|
private NodeRef[] exportList;
|
||||||
private NodeRef parent;
|
private NodeRef[] parentList;
|
||||||
private String exportedBy;
|
private String exportedBy;
|
||||||
private Date exportedDate;
|
private Date exportedDate;
|
||||||
private String exporterVersion;
|
private String exporterVersion;
|
||||||
|
|
||||||
|
private int index;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct
|
* Construct
|
||||||
*
|
*
|
||||||
@ -851,23 +856,49 @@ public class ExporterComponent
|
|||||||
*/
|
*/
|
||||||
public ExporterContextImpl(ExporterCrawlerParameters parameters)
|
public ExporterContextImpl(ExporterCrawlerParameters parameters)
|
||||||
{
|
{
|
||||||
|
index = 0;
|
||||||
|
|
||||||
// get current user performing export
|
// get current user performing export
|
||||||
String currentUserName = authenticationService.getCurrentUserName();
|
String currentUserName = authenticationService.getCurrentUserName();
|
||||||
exportedBy = (currentUserName == null) ? "unknown" : currentUserName;
|
exportedBy = (currentUserName == null) ? "unknown" : currentUserName;
|
||||||
|
|
||||||
// get current date
|
// get current date
|
||||||
exportedDate = new Date(System.currentTimeMillis());
|
exportedDate = new Date(System.currentTimeMillis());
|
||||||
|
|
||||||
// get export of
|
// get list of exported nodes
|
||||||
exportOf = getNodeRef(parameters.getExportFrom());
|
exportList = (parameters.getExportFrom() == null) ? null : parameters.getExportFrom().getNodeRefs();
|
||||||
|
if (exportList == null)
|
||||||
// get export parent
|
{
|
||||||
parent = getParent(exportOf, parameters.isCrawlSelf());
|
// multi-node export
|
||||||
|
exportList = new NodeRef[1];
|
||||||
|
NodeRef exportOf = getNodeRef(parameters.getExportFrom());
|
||||||
|
exportList[0] = exportOf;
|
||||||
|
}
|
||||||
|
parentList = new NodeRef[exportList.length];
|
||||||
|
for (int i = 0; i < exportList.length; i++)
|
||||||
|
{
|
||||||
|
parentList[i] = getParent(exportList[i], parameters.isCrawlSelf());
|
||||||
|
}
|
||||||
|
|
||||||
// get exporter version
|
// get exporter version
|
||||||
exporterVersion = descriptorService.getServerDescriptor().getVersion();
|
exporterVersion = descriptorService.getServerDescriptor().getVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean canRetrieve()
|
||||||
|
{
|
||||||
|
return index < exportList.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int setNextValue()
|
||||||
|
{
|
||||||
|
return ++index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void resetContext()
|
||||||
|
{
|
||||||
|
index = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.alfresco.service.cmr.view.ExporterContext#getExportedBy()
|
* @see org.alfresco.service.cmr.view.ExporterContext#getExportedBy()
|
||||||
*/
|
*/
|
||||||
@ -897,7 +928,11 @@ public class ExporterComponent
|
|||||||
*/
|
*/
|
||||||
public NodeRef getExportOf()
|
public NodeRef getExportOf()
|
||||||
{
|
{
|
||||||
return exportOf;
|
if (canRetrieve())
|
||||||
|
{
|
||||||
|
return exportList[index];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -906,9 +941,32 @@ public class ExporterComponent
|
|||||||
*/
|
*/
|
||||||
public NodeRef getExportParent()
|
public NodeRef getExportParent()
|
||||||
{
|
{
|
||||||
return parent;
|
if (canRetrieve())
|
||||||
|
{
|
||||||
|
return parentList[index];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see org.alfresco.service.cmr.view.ExporterContext#getExportList()
|
||||||
|
*/
|
||||||
|
public NodeRef[] getExportList()
|
||||||
|
{
|
||||||
|
return exportList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see org.alfresco.service.cmr.view.ExporterContext#getExportParentList()
|
||||||
|
*/
|
||||||
|
public NodeRef[] getExportParentList()
|
||||||
|
{
|
||||||
|
return parentList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Node Ref from the specified Location
|
* Get the Node Ref from the specified Location
|
||||||
*
|
*
|
||||||
|
@ -45,6 +45,7 @@ import org.alfresco.service.cmr.view.ExporterException;
|
|||||||
import org.alfresco.service.cmr.view.ReferenceType;
|
import org.alfresco.service.cmr.view.ReferenceType;
|
||||||
import org.alfresco.service.namespace.NamespaceService;
|
import org.alfresco.service.namespace.NamespaceService;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
import org.xml.sax.ContentHandler;
|
import org.xml.sax.ContentHandler;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
import org.xml.sax.helpers.AttributesImpl;
|
import org.xml.sax.helpers.AttributesImpl;
|
||||||
@ -212,10 +213,19 @@ import org.xml.sax.helpers.AttributesImpl;
|
|||||||
|
|
||||||
// export of
|
// export of
|
||||||
contentHandler.startElement(NamespaceService.REPOSITORY_VIEW_PREFIX, EXPORTOF_LOCALNAME, EXPORTOF_QNAME.toPrefixString(), EMPTY_ATTRIBUTES);
|
contentHandler.startElement(NamespaceService.REPOSITORY_VIEW_PREFIX, EXPORTOF_LOCALNAME, EXPORTOF_QNAME.toPrefixString(), EMPTY_ATTRIBUTES);
|
||||||
String path = nodeService.getPath(context.getExportOf()).toPrefixString(namespaceService);
|
NodeRef[] exportList = context.getExportList();
|
||||||
contentHandler.characters(path.toCharArray(), 0, path.length());
|
int comma = 1;
|
||||||
|
for(int i=0;i < exportList.length; i++)
|
||||||
|
{
|
||||||
|
NodeRef nodeRef = exportList[i];
|
||||||
|
String path = nodeService.getPath(nodeRef).toPrefixString(namespaceService);
|
||||||
|
if (i == exportList.length - 1)
|
||||||
|
{
|
||||||
|
comma = 0;
|
||||||
|
}
|
||||||
|
contentHandler.characters(ArrayUtils.addAll(path.toCharArray(), ",".toCharArray()), 0, path.length() + comma);
|
||||||
|
}
|
||||||
contentHandler.endElement(NamespaceService.REPOSITORY_VIEW_PREFIX, EXPORTOF_LOCALNAME, EXPORTOF_QNAME.toPrefixString());
|
contentHandler.endElement(NamespaceService.REPOSITORY_VIEW_PREFIX, EXPORTOF_LOCALNAME, EXPORTOF_QNAME.toPrefixString());
|
||||||
|
|
||||||
contentHandler.endElement(NamespaceService.REPOSITORY_VIEW_PREFIX, METADATA_LOCALNAME, METADATA_QNAME.toPrefixString());
|
contentHandler.endElement(NamespaceService.REPOSITORY_VIEW_PREFIX, METADATA_LOCALNAME, METADATA_QNAME.toPrefixString());
|
||||||
}
|
}
|
||||||
catch (SAXException e)
|
catch (SAXException e)
|
||||||
@ -545,7 +555,7 @@ import org.xml.sax.helpers.AttributesImpl;
|
|||||||
NodeRef valueNodeRef = (NodeRef)value;
|
NodeRef valueNodeRef = (NodeRef)value;
|
||||||
if (nodeRef.getStoreRef().equals(valueNodeRef.getStoreRef()))
|
if (nodeRef.getStoreRef().equals(valueNodeRef.getStoreRef()))
|
||||||
{
|
{
|
||||||
Path nodeRefPath = createPath(context.getExportOf(), nodeRef, valueNodeRef);
|
Path nodeRefPath = createPath(context.getExportParent(), nodeRef, valueNodeRef);
|
||||||
value = (nodeRefPath == null) ? null : nodeRefPath.toPrefixString(namespaceService);
|
value = (nodeRefPath == null) ? null : nodeRefPath.toPrefixString(namespaceService);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -569,12 +579,11 @@ import org.xml.sax.helpers.AttributesImpl;
|
|||||||
String strValue = (String)DefaultTypeConverter.INSTANCE.convert(String.class, value);
|
String strValue = (String)DefaultTypeConverter.INSTANCE.convert(String.class, value);
|
||||||
if (strValue != null)
|
if (strValue != null)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < strValue.length(); i++)
|
for (int i = 0; i < strValue.length(); i++)
|
||||||
{
|
{
|
||||||
char[] temp = new char[]{strValue.charAt(i)};
|
char[] temp = new char[]{strValue.charAt(i)};
|
||||||
contentHandler.characters(temp, 0, 1);
|
contentHandler.characters(temp, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// output value wrapper if property data type is any
|
// output value wrapper if property data type is any
|
||||||
@ -802,26 +811,33 @@ import org.xml.sax.helpers.AttributesImpl;
|
|||||||
if (i == rootPath.size())
|
if (i == rootPath.size())
|
||||||
{
|
{
|
||||||
// Determine if to node is relative to export tree
|
// Determine if to node is relative to export tree
|
||||||
i = 0;
|
for (NodeRef nodeRef : context.getExportParentList())
|
||||||
while (i < rootPath.size() && i < toPath.size() && rootPath.get(i).equals(toPath.get(i)))
|
|
||||||
{
|
{
|
||||||
i++;
|
int j = 0;
|
||||||
}
|
Path tryPath = createIndexedPath(nodeRef, nodeService.getPath(nodeRef));
|
||||||
if (i == rootPath.size())
|
while (j < tryPath.size() && j < toPath.size() && tryPath.get(j).equals(toPath.get(j)))
|
||||||
{
|
|
||||||
// build relative path between from and to
|
|
||||||
relativePath = new Path();
|
|
||||||
for (int p = 0; p < fromPath.size() - i; p++)
|
|
||||||
{
|
{
|
||||||
relativePath.append(new Path.ParentElement());
|
j++;
|
||||||
}
|
}
|
||||||
if (i < toPath.size())
|
if (j == tryPath.size())
|
||||||
{
|
{
|
||||||
relativePath.append(toPath.subPath(i, toPath.size() -1));
|
// build relative path between from and to
|
||||||
|
relativePath = new Path();
|
||||||
|
for (int p = 0; p < fromPath.size() - i; p++)
|
||||||
|
{
|
||||||
|
relativePath.append(new Path.ParentElement());
|
||||||
|
}
|
||||||
|
if (j < toPath.size())
|
||||||
|
{
|
||||||
|
relativePath.append(toPath.subPath(j, toPath.size() - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (relativePath == null)
|
if (relativePath == null)
|
||||||
{
|
{
|
||||||
|
@ -521,14 +521,17 @@ public class ImporterComponent
|
|||||||
public void importMetaData(Map<QName, String> properties)
|
public void importMetaData(Map<QName, String> properties)
|
||||||
{
|
{
|
||||||
// Determine if we're importing a complete repository
|
// Determine if we're importing a complete repository
|
||||||
String path = properties.get(QName.createQName(NamespaceService.REPOSITORY_VIEW_1_0_URI, "exportOf"));
|
String complexPath = properties.get(QName.createQName(NamespaceService.REPOSITORY_VIEW_1_0_URI, "exportOf"));
|
||||||
if (path != null && path.equals("/"))
|
for (String path : complexPath.split(","))
|
||||||
{
|
{
|
||||||
// Only allow complete repository import into root
|
if (path != null && path.equals("/"))
|
||||||
NodeRef storeRootRef = nodeService.getRootNode(rootRef.getStoreRef());
|
|
||||||
if (!storeRootRef.equals(rootRef))
|
|
||||||
{
|
{
|
||||||
throw new ImporterException("A complete repository package cannot be imported here");
|
// Only allow complete repository import into root
|
||||||
|
NodeRef storeRootRef = nodeService.getRootNode(rootRef.getStoreRef());
|
||||||
|
if (!storeRootRef.equals(rootRef))
|
||||||
|
{
|
||||||
|
throw new ImporterException("A complete repository package cannot be imported here");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,102 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
* As a special exception to the terms and conditions of version 2.0 of
|
||||||
|
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||||
|
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||||
|
* FLOSS exception. You should have recieved a copy of the text describing
|
||||||
|
* the FLOSS exception, and it is also available here:
|
||||||
|
* http://www.alfresco.com/legal/licensing"
|
||||||
|
*/
|
||||||
package org.alfresco.service.cmr.view;
|
package org.alfresco.service.cmr.view;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
|
||||||
|
|
||||||
public interface ExporterContext
|
public interface ExporterContext
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Gets who initiated the export
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public String getExportedBy();
|
public String getExportedBy();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets date at which export occured
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Date getExportedDate();
|
public Date getExportedDate();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets version number of exporter
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public String getExporterVersion();
|
public String getExporterVersion();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets active node for export
|
||||||
|
*
|
||||||
|
* @return NodeRef
|
||||||
|
*/
|
||||||
public NodeRef getExportOf();
|
public NodeRef getExportOf();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets parent of exporting node
|
||||||
|
*
|
||||||
|
* @return NodeRef
|
||||||
|
*/
|
||||||
public NodeRef getExportParent();
|
public NodeRef getExportParent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets list of nodes for export
|
||||||
|
*
|
||||||
|
* @return NodeRef[]
|
||||||
|
*/
|
||||||
|
public NodeRef[] getExportList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets list of parents for exporting nodes
|
||||||
|
*
|
||||||
|
* @return NodeRef[]
|
||||||
|
*/
|
||||||
|
public NodeRef[] getExportParentList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if there is active node for export
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean canRetrieve();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set next active node from list
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int setNextValue();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set first active node
|
||||||
|
*/
|
||||||
|
public void resetContext();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ public class Location
|
|||||||
{
|
{
|
||||||
private StoreRef storeRef = null;
|
private StoreRef storeRef = null;
|
||||||
private NodeRef nodeRef = null;
|
private NodeRef nodeRef = null;
|
||||||
|
private NodeRef[] nodeRefs = null;
|
||||||
private String path = null;
|
private String path = null;
|
||||||
private QName childAssocType = null;
|
private QName childAssocType = null;
|
||||||
|
|
||||||
@ -54,6 +55,19 @@ public class Location
|
|||||||
this.nodeRef = nodeRef;
|
this.nodeRef = nodeRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct
|
||||||
|
*
|
||||||
|
* @param nodeRefs
|
||||||
|
*/
|
||||||
|
public Location(NodeRef[] nodeRefs)
|
||||||
|
{
|
||||||
|
ParameterCheck.mandatory("Node Refs", nodeRefs);
|
||||||
|
this.storeRef = nodeRefs[0].getStoreRef();
|
||||||
|
this.nodeRefs = nodeRefs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct
|
* Construct
|
||||||
*
|
*
|
||||||
@ -81,6 +95,20 @@ public class Location
|
|||||||
return nodeRef;
|
return nodeRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the node refs
|
||||||
|
*/
|
||||||
|
public NodeRef[] getNodeRefs()
|
||||||
|
{
|
||||||
|
return nodeRefs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNodeRefs(NodeRef[] nodeRefs)
|
||||||
|
{
|
||||||
|
this.nodeRef = null;
|
||||||
|
this.nodeRefs = nodeRefs;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the location to the specified path
|
* Sets the location to the specified path
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user