/** * <pre> * classpath:org/kuali/common/kuali-util/myfile.txt * </pre> */ public static String getClasspathResource(ProjectIdentifier project, String filename) { return getClasspathPrefix(project.getGroupId(), project.getArtifactId()) + "/" + filename; }
public FeatureIdentifier(String groupId, String artifactId, String featureId) { this(new ProjectIdentifier(groupId, artifactId), featureId); }
@Override public String getGroupId() { return identifier.getGroupId(); }
@Override public String getArtifactId() { return identifier.getArtifactId(); }
public ImmutableProject(ProjectIdentifier identifier, String version, Properties properties) { checkNotNull(identifier, "identifier"); checkNotBlank(version, "version"); checkNotNull(properties, "properties"); // Finish setting things up this.identifier = identifier; this.version = version; this.properties = ImmutableProperties.copyOf(properties); this.id = identifier.getIdentifier() + ":" + version; this.hashCode = identifier.hashCode(); }
public FeatureIdentifier(ProjectIdentifier project, String featureId) { // Make sure we are being configured correctly Assert.noNulls(project); Assert.noBlanks(featureId); // Finish setting things up this.project = project; this.featureId = featureId; this.identifier = project.getIdentifier() + ":" + featureId; this.hashCode = identifier.hashCode(); }
@Override public String getGroupId() { return identifier.getGroupId(); }
@Override public String getArtifactId() { return identifier.getArtifactId(); }
/** * <code>classpath:META-INF/org/kuali/util/kuali-util/[qualifier]/[filename].resources</code> where <code>[qualifier]</code>, <code>[location]</code>, and <type>[type]</type> * are optional */ public static String getClasspathResource(ProjectIdentifier project, Optional<String> qualifier, Optional<MetaInfDataLocation> location, Optional<MetaInfDataType> type, String filename) { return getClasspathResource(project.getGroupId(), project.getArtifactId(), qualifier, location, type, filename); }
@Override public String getGroupId() { return identifier.getGroupId(); }
@Override public String getArtifactId() { return identifier.getArtifactId(); }
public ImmutableProject(String groupId, String artifactId, String version, Properties properties) { this(new ProjectIdentifier(groupId, artifactId), version, properties); }
/** * <code>classpath:META-INF/org/kuali/util/kuali-util/[group].resources</code> */ public static String getClasspathResource(ProjectIdentifier project, MetaInfGroup group) { return getClasspathResource(project.getGroupId(), project.getArtifactId(), group); }
@Override public String getGroupId() { return identifier.getGroupId(); }
@Override public String getArtifactId() { return identifier.getArtifactId(); }
/** * Convert a project id into a <code>ProjectIdentifier's</code> * * Example project id: * * <pre> * org.kuali.common:kuali-util * </pre> */ public static ProjectIdentifier getIdentifier(String projectId) { // Project id can't be blank Assert.noBlanks("projectId is blank", projectId); // Split up the id String[] tokens = Str.split(projectId, ":", true); // Must always have exactly 2 tokens Assert.isTrue(tokens.length == 2, "tokens.length != 2"); // 1st token is groupId, 2nd token is artifactId String groupId = tokens[0]; String artifactId = tokens[1]; // Create a project identifier from the strings return new ProjectIdentifier(groupId, artifactId); }
/** * List of <code>classpath:META-INF/org/kuali/util/kuali-util/[qualifier]/[location]/[type]/[filename].resources</code> where <code>[qualifier]</code>, <code>[location]</code>, * and <type>[type]</type> are optional and <code>[qualifier]</code> and <code>[filename]</code> can contain an Ant-style pattern */ public static List<String> getPatternedClasspathResources(ProjectIdentifier project, Optional<String> qualifier, Optional<MetaInfDataLocation> location, Optional<MetaInfDataType> type, String filename) { return getPatternedClasspathResources(project.getGroupId(), project.getArtifactId(), qualifier, location, type, filename); }
@Bean public Location kualiDeployDefaults() { String prefix = ProjectUtils.getClasspathPrefix(DeployProjectConstants.ID.getGroupId()); String path = prefix + "/deploy/deploy.properties"; return new Location(path, kualiDeployEncoding(), true); }
/** * <code>classpath:META-INF/org/kuali/util/kuali-util/[filename].resources</code> */ public static String getClasspathResource(ProjectIdentifier project, String filename) { return getClasspathResource(project.getGroupId(), project.getArtifactId(), filename); }
/** * List of <code>classpath:META-INF/org/kuali/util/kuali-util/[filename].resources</code> where <code>[filename]</code> can contain an Ant-style pattern */ public static List<String> getPatternedClasspathResources(ProjectIdentifier project, String filename) { return getPatternedClasspathResources(project.getGroupId(), project.getArtifactId(), filename); }