Drools Workbench - JCR to UberFire VFS migration 6.0.0-SNAPSHOT

org.drools.workbench.jcr2vfsmigration.migrater.asset
Class BaseAssetMigrater

java.lang.Object
  extended by org.drools.workbench.jcr2vfsmigration.migrater.asset.BaseAssetMigrater
Direct Known Subclasses:
AttachementAssetMigrater, FactModelsMigrater, GlobalMigrater, GuidedDecisionTableMigrater, GuidedEditorMigrater, GuidedScoreCardMigrater, PlainTextAssetMigrater, PlainTextAssetWithPackagePropertyMigrater, TestScenarioMigrater

@ApplicationScoped
public class BaseAssetMigrater
extends Object


Field Summary
protected  org.drools.guvnor.server.RepositoryAssetService jcrRepositoryAssetService
           
protected static org.slf4j.Logger logger
           
protected  org.guvnor.common.services.shared.metadata.MetadataService metadataService
           
protected  MigrationPathManager migrationPathManager
           
 
Constructor Summary
BaseAssetMigrater()
           
 
Method Summary
 String getExtendedRuleFromCategoryRules(org.drools.guvnor.client.rpc.Module jcrModule, org.drools.repository.AssetItem jcrAssetItem, String ruleDelimiter)
          Retrieves form jcrModule the categoryRules and deduce the rule to extend depending of the assetItem categories retrieve the rule name between ruleDelimiter
 String getExtendExpression(org.drools.guvnor.client.rpc.Module jcrModule, org.drools.repository.AssetItem jcrAssetItem, String content)
          Constructs the extends expression, using the asset categories and the module categoryRules, and adds to the passed content.
 Map<String,Object> migrateMetaData(org.drools.guvnor.client.rpc.Module jcrModule, org.drools.repository.AssetItem jcrAssetItem)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.slf4j.Logger logger

jcrRepositoryAssetService

@Inject
protected org.drools.guvnor.server.RepositoryAssetService jcrRepositoryAssetService

migrationPathManager

@Inject
protected MigrationPathManager migrationPathManager

metadataService

@Inject
protected org.guvnor.common.services.shared.metadata.MetadataService metadataService
Constructor Detail

BaseAssetMigrater

public BaseAssetMigrater()
Method Detail

migrateMetaData

public Map<String,Object> migrateMetaData(org.drools.guvnor.client.rpc.Module jcrModule,
                                          org.drools.repository.AssetItem jcrAssetItem)

getExtendedRuleFromCategoryRules

public String getExtendedRuleFromCategoryRules(org.drools.guvnor.client.rpc.Module jcrModule,
                                               org.drools.repository.AssetItem jcrAssetItem,
                                               String ruleDelimiter)
Retrieves form jcrModule the categoryRules and deduce the rule to extend depending of the assetItem categories retrieve the rule name between ruleDelimiter

Parameters:
jcrModule - module which has the category rule defined
jcrAssetItem - asset with the categories, which can extend the rule
ruleDelimiter - The delimiter used to contruct the return value
Returns:
the rule to extend depending of the asset category and the category rules defined by package between ruleDelimiter

getExtendExpression

public String getExtendExpression(org.drools.guvnor.client.rpc.Module jcrModule,
                                  org.drools.repository.AssetItem jcrAssetItem,
                                  String content)
Constructs the extends expression, using the asset categories and the module categoryRules, and adds to the passed content. If passed content has an "extend" expression this function returns the same content with the extra extend added, If not, constructs another "extend" with the new rule and modify the content.

Parameters:
jcrModule - module with the categoryRules
jcrAssetItem - asset with the categories to decide the extend expression to add
content - string to be completed with the necessary extend
Returns:
the content passed with the extend expression if it's necessary.

Drools Workbench - JCR to UberFire VFS migration 6.0.0-SNAPSHOT

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.