|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RepositoryHandler
Repository Handler Interface
This interface has to be implemented by all the classes that handles the interaction between the application and the database.
| Method Summary | |
|---|---|
void |
addLicenseToArtifact(DbArtifact artifact,
String licenseId)
Add a license to an existing artifact |
void |
addModulesOrganization(String corporateGroupId,
DbOrganization dbOrganization)
Updates all module that matches the corporate GID prefix setting the Organization name |
void |
addUserRole(String user,
DbCredential.AvailableRoles role)
Add a role to the targeted user |
void |
approveLicense(DbLicense license,
Boolean approved)
Approve or reject a license |
void |
deleteArtifact(String gavc)
Delete the targeted artifact |
void |
deleteLicense(String name)
Delete the targeted license from the database |
void |
deleteModule(String moduleId)
Delete the targeted module |
void |
deleteOrganization(String organizationId)
Remove an organization |
void |
deleteProduct(String name)
Deletes a product from the database |
List<DbLicense> |
getAllLicenses()
Retrieve all licenses from the database |
List<DbOrganization> |
getAllOrganizations()
Returns all the Organizations form the database |
List<DbModule> |
getAncestors(DbArtifact artifact,
FiltersHolder filters)
Retrieve the list of the modules the use the targeted artifact |
DbArtifact |
getArtifact(String gavc)
Return the targeted artifact |
List<DbArtifact> |
getArtifacts(FiltersHolder filters)
Return a list of all the artifacts that match the filters |
List<String> |
getArtifactVersions(DbArtifact artifact)
Return the list of all the available versions of the targeted artifacts |
DbCredential |
getCredential(String userId)
Returns the credentials of a user |
List<String> |
getGavcs(FiltersHolder filters)
Return the list of all the artifacts gavcs that match the provided filters |
List<String> |
getGroupIds(FiltersHolder filters)
Return the list of all the artifacts groupIds that match the provided filters |
DbLicense |
getLicense(String name)
Retrieve the targeted license from the database |
List<String> |
getLicenseNames(FiltersHolder filters)
Return a list of all the available licenses regarding the provided filters |
DbModule |
getModule(String moduleId)
Return the targeted module |
List<String> |
getModuleNames(FiltersHolder filters)
Return the list of all the module names that match the provided filters |
DbModule |
getModuleOf(String gavc)
Return the module or the submodule that contains the gavc. |
List<DbModule> |
getModules(FiltersHolder filters)
Return a list od module regarding the filters |
List<String> |
getModuleVersions(String name,
FiltersHolder filters)
Retrieve the list of all the available versions of a module |
DbOrganization |
getOrganization(String name)
Returns an organization |
List<String> |
getOrganizationNames()
Returns all the organization names |
DbProduct |
getProduct(String name)
Returns a product regarding its name |
List<String> |
getProductNames()
Returns the list of product names |
DbModule |
getRootModuleOf(String gavc)
Return the module that contains the gavc. |
void |
promoteModule(DbModule module)
Promote the targeted module |
void |
removeLicenseFromArtifact(DbArtifact artifact,
String name)
Remove a license from an existing artifact |
void |
removeModulesOrganization(DbOrganization dbOrganization)
Updates all module reference to the organization removing the Organization field |
void |
removeModulesOrganization(String corporateGroupId,
DbOrganization dbOrganization)
Updates all module that matches the corporate GID prefix AND that reference to the organization removing the Organization field |
void |
removeUserRole(String user,
DbCredential.AvailableRoles role)
Remove a role to the targeted user |
void |
store(DbArtifact dbArtifact)
Create a new artifact or update an existing one in the database |
void |
store(DbCredential credential)
Store a new credential or update an existing one |
void |
store(DbLicense license)
Store a new license or update an existing one |
void |
store(DbModule dbModule)
Create a new module or update an existing one into the database |
void |
store(DbOrganization organization)
Stores an organization into the database |
void |
store(DbProduct dbProduct)
Stores a product in Grapes db |
void |
updateDoNotUse(DbArtifact artifact,
Boolean doNotUse)
Update "DO_NOT_USE" field of an artifact |
void |
updateDownloadUrl(DbArtifact artifact,
String downLoadUrl)
Update the download url field of an artifact |
void |
updateProvider(DbArtifact artifact,
String provider)
Update provider field of an artifact |
| Method Detail |
|---|
void store(DbCredential credential)
credential - DbCredentialDbCredential getCredential(String userId)
userId - String
void addUserRole(String user,
DbCredential.AvailableRoles role)
user - Stringrole - AvailableRoles
void removeUserRole(String user,
DbCredential.AvailableRoles role)
user - Stringrole - AvailableRolesvoid store(DbLicense license)
license - DbLicenseList<String> getLicenseNames(FiltersHolder filters)
filters - FiltersHolder
DbLicense getLicense(String name)
name - String
List<DbLicense> getAllLicenses()
void deleteLicense(String name)
name - StringList<DbArtifact> getArtifacts(FiltersHolder filters)
filters - FiltersHolder
void addLicenseToArtifact(DbArtifact artifact,
String licenseId)
artifact - DbArtifactlicenseId - String
void removeLicenseFromArtifact(DbArtifact artifact,
String name)
artifact - DbArtifactname - String
void approveLicense(DbLicense license,
Boolean approved)
license - DbLicenseapproved - Booleanvoid store(DbArtifact dbArtifact)
dbArtifact - DbArtifactList<String> getGavcs(FiltersHolder filters)
filters - FiltersHolder
List<String> getGroupIds(FiltersHolder filters)
filters - FiltersHolder
List<String> getArtifactVersions(DbArtifact artifact)
artifact - DbArtifact
DbArtifact getArtifact(String gavc)
gavc - String
void deleteArtifact(String gavc)
gavc - String
void updateDoNotUse(DbArtifact artifact,
Boolean doNotUse)
artifact - DbArtifactdoNotUse - Boolean
void updateDownloadUrl(DbArtifact artifact,
String downLoadUrl)
artifact - DbArtifactdownLoadUrl - String
void updateProvider(DbArtifact artifact,
String provider)
artifact - DbArtifactprovider - String
List<DbModule> getAncestors(DbArtifact artifact,
FiltersHolder filters)
artifact - Stringfilters - FiltersHolder
void store(DbModule dbModule)
dbModule - DbModuleList<String> getModuleNames(FiltersHolder filters)
filters - FiltersHolder
List<String> getModuleVersions(String name,
FiltersHolder filters)
name - Stringfilters - FiltersHolder
DbModule getModule(String moduleId)
moduleId - String
List<DbModule> getModules(FiltersHolder filters)
filters - FiltersHolder
void deleteModule(String moduleId)
moduleId - Stringvoid promoteModule(DbModule module)
module - StringDbModule getRootModuleOf(String gavc)
gavc - String
DbModule getModuleOf(String gavc)
gavc - String
List<String> getOrganizationNames()
DbOrganization getOrganization(String name)
name - String
void deleteOrganization(String organizationId)
organizationId - Stringvoid store(DbOrganization organization)
organization - DbOrganization
void addModulesOrganization(String corporateGroupId,
DbOrganization dbOrganization)
corporateGroupId - StringdbOrganization - DbOrganization
void removeModulesOrganization(String corporateGroupId,
DbOrganization dbOrganization)
corporateGroupId - StringdbOrganization - DbOrganizationvoid removeModulesOrganization(DbOrganization dbOrganization)
dbOrganization - DbOrganizationList<DbOrganization> getAllOrganizations()
void store(DbProduct dbProduct)
dbProduct - DbProductDbProduct getProduct(String name)
name - String
List<String> getProductNames()
void deleteProduct(String name)
name - String
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||