@Override public ImmutableList<ArtifactRestrictions> getRestrictions() { return Lists.immutable.<ArtifactRestrictions>of(new ArtifactEnvironmentRestrictions(includes, excludes)); } };
public ImmutableList<ArtifactRestrictions> valueOf(TextMarkupDocumentSection section) { if (section == null) { return Lists.immutable.of(); } MutableList<ArtifactRestrictions> restrictions = Lists.mutable.empty(); Twin<MutableSet<String>> envRestrictions = readRestrictions(section, TextMarkupDocumentReader.INCLUDE_ENVS, TextMarkupDocumentReader.EXCLUDE_ENVS); if (envRestrictions != null) { restrictions.add(new ArtifactEnvironmentRestrictions(envRestrictions.getOne(), envRestrictions.getTwo())); } Twin<MutableSet<String>> platformRestrictions = readRestrictions(section, TextMarkupDocumentReader.INCLUDE_PLATFORMS, TextMarkupDocumentReader.EXCLUDE_PLATFORMS); if (platformRestrictions != null) { restrictions.add(new ArtifactPlatformRestrictions(platformRestrictions.getOne(), platformRestrictions.getTwo())); } return restrictions.toImmutable(); }
public ImmutableList<ArtifactRestrictions> valueOf(TextMarkupDocumentSection section) { if (section == null) { return Lists.immutable.of(); } MutableList<ArtifactRestrictions> restrictions = Lists.mutable.empty(); Twin<MutableSet<String>> envRestrictions = readRestrictions(section, TextMarkupDocumentReader.INCLUDE_ENVS, TextMarkupDocumentReader.EXCLUDE_ENVS); if (envRestrictions != null) { restrictions.add(new ArtifactEnvironmentRestrictions(envRestrictions.getOne(), envRestrictions.getTwo())); } Twin<MutableSet<String>> platformRestrictions = readRestrictions(section, TextMarkupDocumentReader.INCLUDE_PLATFORMS, TextMarkupDocumentReader.EXCLUDE_PLATFORMS); if (platformRestrictions != null) { restrictions.add(new ArtifactPlatformRestrictions(platformRestrictions.getOne(), platformRestrictions.getTwo())); } return restrictions.toImmutable(); }
, create3(tableChangeType, "schema", "MyObj", "chng5Rollback", 7, "mychan", "mychange", "myrollbackcommand", true, Lists.immutable.of( new ArtifactEnvironmentRestrictions(UnifiedSet.newSetWith("abc*"), UnifiedSet.<String>newSet()), new ArtifactPlatformRestrictions(UnifiedSet.<String>newSet(), UnifiedSet.newSetWith("HSQL")) )) , create3(tableChangeType, "schema", "MyObj", "chng5Rollback", 8, "mychan", "mychange", "myrollbackcommand", true, Lists.immutable.of( new ArtifactEnvironmentRestrictions(UnifiedSet.<String>newSet(), UnifiedSet.newSetWith("abc*")), new ArtifactPlatformRestrictions(UnifiedSet.newSetWith("DB2", "SYBASE_ASE", "HSQL"), UnifiedSet.<String>newSet()) )) ImmutableList<ArtifactRestrictions> restrictions = expected.get(i).getRestrictions() == null ? Lists.immutable.of( new ArtifactEnvironmentRestrictions(UnifiedSet.newSetWith("q1"), UnifiedSet.<String>newSet()), new ArtifactPlatformRestrictions(UnifiedSet.newSetWith("DB2", "SYBASE_ASE", "HSQL"), UnifiedSet.<String>newSet()) ) :