本文整理汇总了Java中org.alfresco.repo.transfer.manifest.TransferManifestHeader类的典型用法代码示例。如果您正苦于以下问题:Java TransferManifestHeader类的具体用法?Java TransferManifestHeader怎么用?Java TransferManifestHeader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TransferManifestHeader类属于org.alfresco.repo.transfer.manifest包,在下文中一共展示了TransferManifestHeader类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processTransferManifiestHeader
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
public final void processTransferManifiestHeader(TransferManifestHeader header)
{
TransferProgressMonitor progressMonitor = receiver.getProgressMonitor();
TransferProgress progress = progressMonitor.getProgress(transferId);
int newEndPos = progress.getEndPosition() + header.getNodeCount();
progressMonitor.updateProgress(transferId, progress.getCurrentPosition(), newEndPos);
targetEndProgress = newEndPos;
currProgress = progress.getCurrentPosition();
try
{
processHeader(header);
}
catch (Throwable ex)
{
handleException(null, ex);
}
}
示例2: createSnapshot
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
private String createSnapshot(List<TransferManifestNode> nodes, String repoID) throws Exception
{
XMLTransferManifestWriter manifestWriter = new XMLTransferManifestWriter();
StringWriter output = new StringWriter();
manifestWriter.startTransferManifest(output);
TransferManifestHeader header = new TransferManifestHeader();
header.setCreatedDate(new Date());
header.setNodeCount(nodes.size());
header.setRepositoryId(repoID);
manifestWriter.writeTransferManifestHeader(header);
for (TransferManifestNode node : nodes)
{
manifestWriter.writeTransferManifestNode(node);
}
manifestWriter.endTransferManifest();
return output.toString();
}
示例3: createSnapshot
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
private String createSnapshot(List<TransferManifestNode> nodes, boolean isSync) throws Exception
{
XMLTransferManifestWriter manifestWriter = new XMLTransferManifestWriter();
StringWriter output = new StringWriter();
manifestWriter.startTransferManifest(output);
TransferManifestHeader header = new TransferManifestHeader();
header.setCreatedDate(new Date());
header.setNodeCount(nodes.size());
header.setRepositoryId("repo 1");
header.setSync(isSync);
manifestWriter.writeTransferManifestHeader(header);
for (TransferManifestNode node : nodes)
{
manifestWriter.writeTransferManifestNode(node);
}
manifestWriter.endTransferManifest();
return output.toString();
}
示例4: processHeader
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
protected void processHeader(TransferManifestHeader header)
{
isSync = header.isSync();
log.debug("isSync :" + isSync);
manifestRepositoryId = header.getRepositoryId();
log.debug("fromRepositoryId:" + manifestRepositoryId);
}
示例5: serialize
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public void serialize(Collection<NodeSnapshot> snapshots, OutputStream output) throws Exception
{
try
{
TransferManifestHeader header = new TransferManifestHeader();
header.setCreatedDate(new Date());
header.setNodeCount(snapshots.size());
header.setReadOnly(false);
header.setSync(false);
Writer writer = new OutputStreamWriter(output, "UTF-8");
XMLTransferManifestWriter transferManifestWriter = new XMLTransferManifestWriter();
transferManifestWriter.startTransferManifest(writer);
transferManifestWriter.writeTransferManifestHeader(header);
// Iterate over NodesToPublish and Serialize.
for (NodeSnapshot snapshot: snapshots)
{
if (snapshot instanceof NodeSnapshotTransferImpl)
{
NodeSnapshotTransferImpl snapshotImpl = (NodeSnapshotTransferImpl)snapshot;
transferManifestWriter.writeTransferManifestNode(snapshotImpl.getTransferNode());
}
}
transferManifestWriter.endTransferManifest();
writer.flush();
}
catch (Exception e)
{
throw new AlfrescoRuntimeException("Failed to serialize node snapshots.", e);
}
}
示例6: processHeader
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
protected void processHeader(TransferManifestHeader header)
{
//NOOP
}
示例7: processHeader
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
protected void processHeader(TransferManifestHeader header)
{
// squirrel away the header for later use
this.header = header;
}
示例8: processHeader
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
protected void processHeader(TransferManifestHeader header)
{
// T.B.D
}
示例9: processHeader
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
protected void processHeader(TransferManifestHeader header)
{
}
开发者ID:Alfresco,项目名称:alfresco-file-transfer-receiver,代码行数:4,代码来源:FileTransferReceiverRequisiteManifestProcessor.java
示例10: processHeader
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
@Override
protected void processHeader(TransferManifestHeader header)
{
this.isSync = header.isSync();
}
示例11: processTransferManifiestHeader
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
public void processTransferManifiestHeader(TransferManifestHeader header)
{
//NOOP
}
示例12: processHeader
import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
protected abstract void processHeader(TransferManifestHeader header);