@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(XmlFileModel.ROOT_TAG_NAME, "web-app").withProperty(XmlFileModel.FILE_NAME, QueryPropertyComparisonType.NOT_EQUALS, "geronimo-web.xml"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(FileModel.FILE_NAME, "ibm-ejb-jar-ext.xmi") .withProperty(XmlFileModel.ROOT_TAG_NAME, "EJBJarExtension"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(FileModel.FILE_NAME, "ibm-webservices-ext.xmi") .withProperty(XmlFileModel.ROOT_TAG_NAME, "WsExtension"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(FileModel.FILE_NAME, "ibm-ejb-jar-bnd.xmi") .withProperty(XmlFileModel.ROOT_TAG_NAME, "EJBJarBinding"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(XmlFileModel.ROOT_TAG_NAME, "jboss").withProperty(FileModel.FILE_NAME, "jboss.xml"); }
@Override public ConditionBuilder when() { return Query.fromType(FileModel.class).withProperty(FileModel.IS_DIRECTORY, false) .withProperty(FileModel.FILE_PATH, QueryPropertyComparisonType.REGEX, ".*\\.properties$"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(XmlFileModel.ROOT_TAG_NAME, "ejb-jar") .withProperty(FileModel.FILE_NAME, "jboss-ejb3.xml"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(FileModel.FILE_NAME, "ibm-webservices-bnd.xmi") .withProperty(XmlFileModel.ROOT_TAG_NAME, "WSBinding"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(XmlFileModel.ROOT_TAG_NAME, "web-app").withProperty(XmlFileModel.FILE_NAME, QueryPropertyComparisonType.NOT_EQUALS, "geronimo-web.xml"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(FileModel.FILE_NAME, "ibm-webservices-bnd.xmi") .withProperty(XmlFileModel.ROOT_TAG_NAME, "WSBinding"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(XmlFileModel.ROOT_TAG_NAME, "ejb-jar") .withProperty(FileModel.FILE_NAME, "jboss-ejb3.xml"); }
@Override public ConditionBuilder when() { return Query.fromType(FileModel.class).withProperty(FileModel.IS_DIRECTORY, false) .withProperty(FileModel.FILE_PATH, QueryPropertyComparisonType.REGEX, ".*\\.properties$"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(FileModel.FILE_NAME, "ibm-ejb-jar-bnd.xmi") .withProperty(XmlFileModel.ROOT_TAG_NAME, "EJBJarBinding"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(XmlFileModel.ROOT_TAG_NAME, "jboss").withProperty(FileModel.FILE_NAME, "jboss.xml"); }
@Override public ConditionBuilder when() { return Query.fromType(FileModel.class).withProperty(FileModel.IS_DIRECTORY, false) .withProperty(FileModel.FILE_PATH, QueryPropertyComparisonType.REGEX, ".*\\.properties$"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(FileModel.FILE_NAME, "ibm-ejb-jar-ext.xmi") .withProperty(XmlFileModel.ROOT_TAG_NAME, "EJBJarExtension"); }
@Override public ConditionBuilder when() { return Query.fromType(XmlFileModel.class).withProperty(FileModel.FILE_NAME, "ibm-webservices-ext.xmi") .withProperty(XmlFileModel.ROOT_TAG_NAME, "WsExtension"); }
@Override public Configuration getConfiguration(GraphContext context) { return ConfigurationBuilder.begin() .addRule() .when(Query.fromType(FileModel.class) .withProperty(FileModel.IS_DIRECTORY, true) ) .perform(new RecurseDirectoryAndAddFiles() ) .addRule() .when(Query.fromType(FileModel.class) .withProperty(FileModel.IS_DIRECTORY, false) .withProperty(FileModel.FILE_PATH, QueryPropertyComparisonType.REGEX, ZipUtil.getEndsWithZipRegularExpression()) ) .perform( new AddArchiveReferenceInformation() ); } // @formatter:on
@Override public Configuration getConfiguration(RuleLoaderContext ruleLoaderContext) { return ConfigurationBuilder.begin() .addRule() .when(Query.fromType(WindupConfigurationModel.class) .piped((GraphRewrite event, GraphTraversal<?, Vertex> pipeline) -> { pipeline.out(WindupConfigurationModel.INPUT_PATH); pipeline.has(FileModel.IS_DIRECTORY, true); }) ) .perform(new RecurseDirectoryAndAddFiles()) .addRule() .when(Query.fromType(FileModel.class) .withProperty(FileModel.IS_DIRECTORY, false) .withProperty(FileModel.FILE_PATH, QueryPropertyComparisonType.REGEX, ZipUtil.getEndsWithZipRegularExpression()) ) .perform( new AddArchiveReferenceInformation() ); } // @formatter:on
@Override public Configuration getConfiguration(RuleLoaderContext ruleLoaderContext) { return ConfigurationBuilder.begin() .addRule() .when(Query.fromType(WindupConfigurationModel.class) .piped((GraphRewrite event, GraphTraversal<?, Vertex> pipeline) -> { pipeline.out(WindupConfigurationModel.INPUT_PATH); pipeline.has(FileModel.IS_DIRECTORY, true); }) ) .perform(new RecurseDirectoryAndAddFiles()) .addRule() .when(Query.fromType(FileModel.class) .withProperty(FileModel.IS_DIRECTORY, false) .withProperty(FileModel.FILE_PATH, QueryPropertyComparisonType.REGEX, ZipUtil.getEndsWithZipRegularExpression()) ) .perform( new AddArchiveReferenceInformation() ); } // @formatter:on