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


Java ServerMarshalling类代码示例

本文整理汇总了Java中org.jboss.errai.marshalling.server.ServerMarshalling的典型用法代码示例。如果您正苦于以下问题:Java ServerMarshalling类的具体用法?Java ServerMarshalling怎么用?Java ServerMarshalling使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ServerMarshalling类属于org.jboss.errai.marshalling.server包,在下文中一共展示了ServerMarshalling类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: read

import org.jboss.errai.marshalling.server.ServerMarshalling; //导入依赖的package包/类
@Override
public <T> T read(final String path) {
    Path fsPath = fileSystem.getPath(path);
    try {
        if (ioService.exists(fsPath)) {
            String content = ioService.readAllString(fsPath);
            return (T) ServerMarshalling.fromJSON(content);
        }
    } catch (final Exception e) {
        throw new RuntimeException(e);
    }

    return null;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:15,代码来源:ObjectStorageImpl.java

示例2: write

import org.jboss.errai.marshalling.server.ServerMarshalling; //导入依赖的package包/类
@Override
public <T> void write(final String path,
                      final T value) {
    try {
        ioService.startBatch(fileSystem);
        Path fsPath = fileSystem.getPath(path);
        String content = ServerMarshalling.toJSON(value);
        ioService.write(fsPath,
                        content);
    } catch (final Exception e) {
        throw new RuntimeException(e);
    } finally {
        ioService.endBatch();
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:16,代码来源:ObjectStorageImpl.java

示例3: check

import org.jboss.errai.marshalling.server.ServerMarshalling; //导入依赖的package包/类
private void check(final Issue original,
                   final Issue secondOne) {

    final String json = ServerMarshalling.toJSON(original);

    final Issue newVersion = (Issue) ServerMarshalling.fromJSON(json);

    assertEquals(original.hashCode(),
                 newVersion.hashCode());
    assertNotEquals(secondOne.hashCode(),
                    newVersion.hashCode());
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:13,代码来源:MarshallingTest.java

示例4: unmarshall

import org.jboss.errai.marshalling.server.ServerMarshalling; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Graph unmarshall(final Metadata metadata,
                        final InputStream input) throws IOException {
    Graph result = (Graph) ServerMarshalling.fromJSON(input);
    return result;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:8,代码来源:ErraiDiagramMarshaller.java

示例5: unmarshallFromStunnerJSON

import org.jboss.errai.marshalling.server.ServerMarshalling; //导入依赖的package包/类
@Deprecated
public Graph unmarshallFromStunnerJSON(final Metadata metadata,
                                       final InputStream input) throws IOException {
    Graph result = (Graph) ServerMarshalling.fromJSON(input);
    return result;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:7,代码来源:DMNMarshaller.java

示例6: marshallFromStunnerToJSON

import org.jboss.errai.marshalling.server.ServerMarshalling; //导入依赖的package包/类
@Deprecated
public String marshallFromStunnerToJSON(final Diagram<Graph, Metadata> diagram) throws IOException {
    String result = ServerMarshalling.toJSON(diagram.getGraph());
    return result;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:6,代码来源:DMNMarshaller.java

示例7: marshall

import org.jboss.errai.marshalling.server.ServerMarshalling; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public String marshall(final Diagram<Graph, Metadata> diagram) throws IOException {
    String result = ServerMarshalling.toJSON(diagram.getGraph());
    return result;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:7,代码来源:ErraiDiagramMarshaller.java

示例8: unmarshall

import org.jboss.errai.marshalling.server.ServerMarshalling; //导入依赖的package包/类
@Override
public Metadata unmarshall(final InputStream input) throws IOException {
    Metadata result = (Metadata) ServerMarshalling.fromJSON(input);
    return result;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:6,代码来源:ErraiDiagramMetadataMarshaller.java

示例9: marshall

import org.jboss.errai.marshalling.server.ServerMarshalling; //导入依赖的package包/类
@Override
public String marshall(final Metadata metadata) throws IOException {
    String result = ServerMarshalling.toJSON(metadata);
    return result;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:6,代码来源:ErraiDiagramMetadataMarshaller.java


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