|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.common.util.ProjectUtils
public class ProjectUtils
Field Summary | |
---|---|
static String |
KUALI_COMMON_GROUP_ID
Deprecated. |
static String |
KUALI_UTIL_ARTIFACT_ID
Deprecated. |
Constructor Summary | |
---|---|
ProjectUtils()
|
Method Summary | |
---|---|
static void |
clearCache()
Provide a way to clear the cache |
protected static String |
getBeanProperty(String key,
String startsWith)
|
static String |
getClassPathPrefix(Project project)
Given a project containing groupId + artifactId, convert the groupId to groupId.base, then return the classpath prefix |
static String |
getClassPathPrefix(String groupId,
String artifactId)
Given a groupId and artifactId, convert the groupId to groupId.base, then return the classpath prefix |
static String |
getClassPathPrefixFromGAV(String projectId)
Deprecated. |
static String |
getClassPathPrefixFromProjectId(String projectId)
Given groupId:artifactId, convert the groupId to groupId.base, then return the classpath prefix |
static String |
getCommonClassPathPrefix(String artifactId)
kuali-util = classpath:org/kuali/common/kuali-util |
static List<Dependency> |
getDependencies(String csv)
|
static String |
getGav(Project project)
Deprecated. |
static String |
getGav(ProjectContext context)
Deprecated. |
static String |
getGav(String groupId,
String artifactId)
Deprecated. |
static Project |
getProject(Properties properties)
Return a Project object by copying values from the properties object into a Project object. |
static Project |
getProject(String gav)
Create a skeleton Project object from the gav . |
static String |
getProjectId(Project project)
|
static String |
getProjectId(String groupId,
String artifactId)
|
static ProjectProperties |
getProjectProperties(ProjectContext context)
Deprecated. |
static String |
getPropertiesFileLocation(Project project)
|
static File |
getResourceDirectory(File directory,
Project project)
Given a groupId and artifactId, convert the groupId to groupId.base, then return a resource path relative to directory |
static File |
getResourceFile(File directory,
Project project,
String filename)
Given a groupId and artifactId, convert the groupId to groupId.base, then return a handle to a file relative to directory with the given filename |
static String |
getResourcePath(Project project)
Given groupId:artifactId, convert the groupId to groupId.base, then return a resource friendly prefix |
protected static Properties |
loadAndCache(Project project,
String projectId)
|
static Project |
loadProject(ProjectContext context)
Deprecated. |
static Project |
loadProject(String projectId)
Create a Project object from the projectId . |
static Project |
loadProject(String groupId,
String artifactId)
Create a Project object from groupId , artifactId pair. |
static List<Project> |
loadProjects(List<String> projectIds)
|
static Properties |
loadProperties(Project project)
Use the groupId and artifactId from this project to load the corresponding project.properties file and cache it in our internal Map |
static Properties |
loadProperties(String gav)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final String KUALI_COMMON_GROUP_ID
@Deprecated public static final String KUALI_UTIL_ARTIFACT_ID
Constructor Detail |
---|
public ProjectUtils()
Method Detail |
---|
public static List<Project> loadProjects(List<String> projectIds)
public static String getCommonClassPathPrefix(String artifactId)
kuali-util = classpath:org/kuali/common/kuali-util
public static String getClassPathPrefix(String groupId, String artifactId)
org.kuali.student.db:ks-impex-rice-db = classpath:org/kuali/student/ks-impex-rice-db org.kuali.common:kuali-util = classpath:org/kuali/common/kuali-util
@Deprecated public static String getClassPathPrefixFromGAV(String projectId)
org.kuali.student.db:ks-impex-rice-db = classpath:org/kuali/student/ks-impex-rice-db org.kuali.common:kuali-util = classpath:org/kuali/common/kuali-utilUse getClassPathPrefixFromProjectId() instead
public static String getClassPathPrefixFromProjectId(String projectId)
org.kuali.student.db:ks-impex-rice-db = classpath:org/kuali/student/ks-impex-rice-db org.kuali.common:kuali-util = classpath:org/kuali/common/kuali-util
public static String getClassPathPrefix(Project project)
org.kuali.student.db:ks-impex-rice-db = classpath:org/kuali/student/ks-impex-rice-db org.kuali.common:kuali-util = classpath:org/kuali/common/kuali-util
public static File getResourceDirectory(File directory, Project project)
org.kuali.student.db:ks-impex-rice-db = org/kuali/student/ks-impex-rice-db org.kuali.common:kuali-util = org/kuali/common/kuali-util /tmp/x/y/z + org.kuali.common:kuali-util = /tmp/x/y/z/org/kuali/common/kuali-util
public static File getResourceFile(File directory, Project project, String filename)
org.kuali.student.db:ks-impex-rice-db = org/kuali/student/ks-impex-rice-db org.kuali.common:kuali-util = org/kuali/common/kuali-util /tmp/x/y/z + org.kuali.common:kuali-util + foo.txt = /tmp/x/y/z/org/kuali/common/kuali-util/foo.txt
public static String getResourcePath(Project project)
org.kuali.student.db:ks-impex-rice-db = org/kuali/student/ks-impex-rice-db org.kuali.common:kuali-util = org/kuali/common/kuali-util
@Deprecated public static ProjectProperties getProjectProperties(ProjectContext context)
@Deprecated public static Project loadProject(ProjectContext context)
Project
object from the context
. This includes loading the corresponding project.properties
file from disk.
@Deprecated public static String getGav(ProjectContext context)
@Deprecated public static String getGav(Project project)
@Deprecated public static String getGav(String groupId, String artifactId)
public static String getProjectId(Project project)
public static String getProjectId(String groupId, String artifactId)
public static Project loadProject(String groupId, String artifactId)
Project
object from groupId
, artifactId
pair. This includes loading the corresponding project.properties
file
from disk.
public static Project loadProject(String projectId)
Project
object from the projectId
. This includes loading the corresponding project.properties
file from disk.
public static void clearCache()
public static Project getProject(String gav)
Project
object from the gav
. Nothing but the GAV info (groupId:artifactId:packaging:version:classifier) gets filled in. Does not
read project.properties
from disk.
public static List<Dependency> getDependencies(String csv)
public static Project getProject(Properties properties)
Project
object by copying values from the properties
object into a Project
object.
protected static String getBeanProperty(String key, String startsWith)
public static Properties loadProperties(String gav)
public static Properties loadProperties(Project project)
protected static Properties loadAndCache(Project project, String projectId)
public static String getPropertiesFileLocation(Project project)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |