org.axway.grapes.server.db
Class DataUtils

java.lang.Object
  extended by org.axway.grapes.server.db.DataUtils

public final class DataUtils
extends Object

Data Utility

Utility class that performs data transformation.

Author:
jdcoffre

Method Summary
static Artifact createArtifact(String gavc)
          Generates an artifact starting from gavc WARNING: use this method only if you have a missing reference in the database!!!
static DbArtifact createDbArtifact(String gavc)
          Generates an artifact starting from gavc WARNING: use this method only if you have a missing reference in the database!!!
static List<String> getAllArtifacts(DbModule module)
          Return a gavc list of all the artifact contained into the module (an its submodules)
static Set<Artifact> getAllArtifacts(Module module)
          Return a list of all the artifact contained into the module (an its submodules)
static List<DbDependency> getAllDbDependencies(DbModule module)
          Return a list of all the dependencies contained into the module (an its submodules)
static Set<Dependency> getAllDependencies(Module module)
          Return a list of all the dependencies contained into the module (an its submodules)
static List<DbModule> getAllSubmodules(DbModule module)
          Return the list of all the module submodules
static String getGroupId(String gavc)
          Split an artifact gavc to get the groupId
static String getModuleName(String moduleId)
          Split a module Id to get the module name
static String getModuleVersion(String moduleId)
          Split a module Id to get the module version
static void sort(List<Artifact> targets)
          Bubble sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAllArtifacts

public static List<String> getAllArtifacts(DbModule module)
Return a gavc list of all the artifact contained into the module (an its submodules)

Parameters:
module -
Returns:
List

getAllArtifacts

public static Set<Artifact> getAllArtifacts(Module module)
Return a list of all the artifact contained into the module (an its submodules)

Parameters:
module -
Returns:
Set

getAllDependencies

public static Set<Dependency> getAllDependencies(Module module)
Return a list of all the dependencies contained into the module (an its submodules)

Parameters:
module -
Returns:
Set

getAllDbDependencies

public static List<DbDependency> getAllDbDependencies(DbModule module)
Return a list of all the dependencies contained into the module (an its submodules)

Parameters:
module -
Returns:
List

getModuleName

public static String getModuleName(String moduleId)
Split a module Id to get the module name

Parameters:
moduleId -
Returns:
String

getModuleVersion

public static String getModuleVersion(String moduleId)
Split a module Id to get the module version

Parameters:
moduleId -
Returns:
String

getGroupId

public static String getGroupId(String gavc)
Split an artifact gavc to get the groupId

Parameters:
gavc -
Returns:
String

createDbArtifact

public static DbArtifact createDbArtifact(String gavc)
Generates an artifact starting from gavc WARNING: use this method only if you have a missing reference in the database!!!

Parameters:
gavc -
Returns:
DbArtifact

createArtifact

public static Artifact createArtifact(String gavc)
Generates an artifact starting from gavc WARNING: use this method only if you have a missing reference in the database!!!

Parameters:
gavc -
Returns:
DbArtifact

getAllSubmodules

public static List<DbModule> getAllSubmodules(DbModule module)
Return the list of all the module submodules

Parameters:
module -
Returns:
List

sort

public static void sort(List<Artifact> targets)
Bubble sort

Parameters:
targets -


Copyright © 2014. All Rights Reserved.