Package org.jboss.dashboard.workspace.export.structure

Examples of org.jboss.dashboard.workspace.export.structure.CreateResult


    public CreateResult create(final XMLNode node, final boolean onStartup) {
        return create(node, Collections.EMPTY_MAP, onStartup);
    }

    public CreateResult create(final XMLNode node, final Map attributes, final boolean onStartup) {
        final CreateResult result = new CreateResult();

        HibernateTxFragment txFragment = new HibernateTxFragment() {
            protected void txFragment(Session session) throws Exception {
                if (ExportVisitor.WORKSPACE.equals(node.getObjectName())) {
                    createWorkspace(result, node, attributes, onStartup);
                } else if (ExportVisitor.RESOURCE.equals(node.getObjectName())) {
                    createResource(result, null, null, null, node, attributes, onStartup);
                } else {
                    throw new IllegalArgumentException("Invalid workspace node.");
                }
            }
        };
        try {
            txFragment.execute();
        } catch (Exception e) {
            log.error("Error:", e);
            return new CreateResult(e);
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.workspace.export.structure.CreateResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.