当前位置: 首页>>代码示例>>Java>>正文


Java TransferManifestHeader类代码示例

本文整理汇总了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);
    }
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:18,代码来源:AbstractManifestProcessorBase.java

示例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();

}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:20,代码来源:RepoTransferReceiverImplTest.java

示例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();

}
 
开发者ID:Alfresco,项目名称:alfresco-file-transfer-receiver,代码行数:21,代码来源:FileTransferReceiverTest.java

示例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);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:9,代码来源:RepoTertiaryManifestProcessorImpl.java

示例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);
    }
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:37,代码来源:StandardNodeSnapshotSerializer.java

示例6: processHeader

import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
protected void processHeader(TransferManifestHeader header)
{
    //NOOP
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:5,代码来源:RepoSecondaryManifestProcessorImpl.java

示例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;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:6,代码来源:RepoPrimaryManifestProcessorImpl.java

示例8: processHeader

import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
protected void processHeader(TransferManifestHeader header)
{
    // T.B.D
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:5,代码来源:RepoRequisiteManifestProcessorImpl.java

示例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();
}
 
开发者ID:Alfresco,项目名称:alfresco-file-transfer-receiver,代码行数:6,代码来源:ManifestProcessorImpl.java

示例11: processTransferManifiestHeader

import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
/**
 * {@inheritDoc}
  */
public void processTransferManifiestHeader(TransferManifestHeader header)
{
    //NOOP
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:8,代码来源:StandardNodeSnapshotSerializer.java

示例12: processHeader

import org.alfresco.repo.transfer.manifest.TransferManifestHeader; //导入依赖的package包/类
protected abstract void processHeader(TransferManifestHeader header); 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:2,代码来源:AbstractManifestProcessorBase.java


注:本文中的org.alfresco.repo.transfer.manifest.TransferManifestHeader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。