Package org.guvnor.common.services.shared.metadata.model

Examples of org.guvnor.common.services.shared.metadata.model.Metadata


            }
        }

        //Save update
        if ( isModified ) {
            final Metadata metadata = metadataService.getMetadata( context );
            projectService.save( externalImportsPath,
                                 projectImports,
                                 metadata,
                                 "Imports added during XLS conversion" );
        }
View Full Code Here


    public Map<String, Object> migrateMetaData(Module jcrModule, AssetItem jcrAssetItem) {
/*        System.out.format("    Metadata: Asset [%s] with format [%s] is being migrated... \n",
            jcrAssetItem.getName(), jcrAssetItem.getFormat());       */

        //avoid using RepositoryAssetService as it calls assets' content handler
        Metadata metadata = new Metadata();

        List<DiscussionRecord> discussions = new Discussion().fromString(jcrAssetItem.getStringProperty(Discussion.DISCUSSION_PROPERTY_KEY));

        if (discussions.size() != 0) {
            //final org.kie.commons.java.nio.file.Path nioPath = paths.convert( path );
            for (DiscussionRecord discussion : discussions) {
                metadata.addDiscussion(new org.guvnor.common.services.shared.metadata.model.DiscussionRecord(discussion.timestamp, discussion.author, discussion.note));
            }
        }

        //System.out.format("    Metadata: setDescription... \n" + jcrAssetItem.getDescription());

        metadata.setDescription(jcrAssetItem.getDescription());
        metadata.setSubject(jcrAssetItem.getSubject());
        metadata.setExternalRelation(jcrAssetItem.getExternalRelation());
        metadata.setExternalSource(jcrAssetItem.getExternalSource());
        List<CategoryItem> jcrCategories = jcrAssetItem.getCategories();
        for (CategoryItem c : jcrCategories) {
            //System.out.format("    Metadata: addCategory... \n" + c.getFullPath());
            metadata.addCategory(c.getFullPath());
        }

        Path path = migrationPathManager.generatePathForAsset(jcrModule, jcrAssetItem);
        return metadataService.setUpAttributes(path, metadata);

View Full Code Here

            }
        }

        //Save update
        if ( isModified ) {
            final Metadata metadata = metadataService.getMetadata( context );
            importsService.save( externalImportsPath,
                                 projectImports,
                                 metadata,
                                 "Imports added during XLS conversion" );
        }
View Full Code Here

    public Map<String, Object> migrateMetaData(Module jcrModule, AssetItem jcrAssetItem) {
/*        System.out.format("    Metadata: Asset [%s] with format [%s] is being migrated... \n",
            jcrAssetItem.getName(), jcrAssetItem.getFormat());       */

        //avoid using RepositoryAssetService as it calls assets' content handler
        Metadata metadata = new Metadata();

        List<DiscussionRecord> discussions = new Discussion().fromString(jcrAssetItem.getStringProperty(Discussion.DISCUSSION_PROPERTY_KEY));

        if (discussions.size() != 0) {
            //final org.kie.commons.java.nio.file.Path nioPath = paths.convert( path );
            for (DiscussionRecord discussion : discussions) {
                metadata.addDiscussion(new org.guvnor.common.services.shared.metadata.model.DiscussionRecord(discussion.timestamp, discussion.author, discussion.note));
            }
        }

        //System.out.format("    Metadata: setDescription... \n" + jcrAssetItem.getDescription());

        metadata.setDescription(jcrAssetItem.getDescription());
        metadata.setSubject(jcrAssetItem.getSubject());
        metadata.setExternalRelation(jcrAssetItem.getExternalRelation());
        metadata.setExternalSource(jcrAssetItem.getExternalSource());
        List<CategoryItem> jcrCategories = jcrAssetItem.getCategories();
        for (CategoryItem c : jcrCategories) {
            //System.out.format("    Metadata: addCategory... \n" + c.getFullPath());
            metadata.addCategory(c.getFullPath());
        }

        Path path = migrationPathManager.generatePathForAsset(jcrModule, jcrAssetItem);
        return metadataService.setUpAttributes(path, metadata);

View Full Code Here

        this.version = version;
        return this;
    }

    public Metadata build() {
        return new Metadata( path, checkinComment, lastContributor, creator,
                             lastModified, dateCreated, subject, type,
                             externalRelation, externalSource,
                             description, categories, discussion, version );
    }
View Full Code Here

            }
        }

        //Save update
        if ( isModified ) {
            final Metadata metadata = metadataService.getMetadata( context );
            projectService.save( externalImportsPath,
                                 projectImports,
                                 metadata,
                                 "Imports added during XLS conversion" );
        }
View Full Code Here

        if(discussions.size() == 0) {
            return;
        }
       
         //final org.kie.commons.java.nio.file.Path nioPath = paths.convert( path );
        Metadata metadata = new Metadata();
        for(DiscussionRecord discussion: discussions) {
            metadata.addDiscussion( new org.guvnor.common.services.shared.metadata.model.DiscussionRecord( discussion.timestamp, discussion.author, discussion.note ) );
        }

        Path path = migrationPathManager.generatePathForAsset(jcrModule, assetItemJCR);
        metadataService.setUpAttributes(path, metadata);
    }
View Full Code Here

            }
        }

        //Save update
        if ( isModified ) {
            final Metadata metadata = metadataService.getMetadata( context );
            projectService.save( externalImportsPath,
                                 projectImports,
                                 metadata,
                                 "Imports added during XLS conversion" );
        }
View Full Code Here

TOP

Related Classes of org.guvnor.common.services.shared.metadata.model.Metadata

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.