|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axway.grapes.server.db.mongo.MongodbHandler
public class MongodbHandler
Mongodb Handler
Repository Handler designed for mongodb
| Constructor Summary | |
|---|---|
MongodbHandler(DataBaseConfig config)
|
|
| Method Summary | |
|---|---|
void |
addLicenseToArtifact(DbArtifact artifact,
String licenseId)
Add a license to an existing artifact |
void |
addModulesOrganization(String corporateGidPrefix,
DbOrganization organization)
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 user)
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 licenseId)
Remove a license from an existing artifact |
void |
removeModulesOrganization(DbOrganization organization)
Updates all module reference to the organization removing the Organization field |
void |
removeModulesOrganization(String corporateGidPrefix,
DbOrganization organization)
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 artifact)
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 module)
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MongodbHandler(DataBaseConfig config)
throws UnknownHostException
UnknownHostException| Method Detail |
|---|
public void store(DbCredential credential)
RepositoryHandler
store in interface RepositoryHandlercredential - DbCredential
public void addUserRole(String user,
DbCredential.AvailableRoles role)
RepositoryHandler
addUserRole in interface RepositoryHandleruser - Stringrole - AvailableRoles
public void removeUserRole(String user,
DbCredential.AvailableRoles role)
RepositoryHandler
removeUserRole in interface RepositoryHandleruser - Stringrole - AvailableRolespublic DbCredential getCredential(String user)
RepositoryHandler
getCredential in interface RepositoryHandleruser - String
public void store(DbLicense license)
RepositoryHandler
store in interface RepositoryHandlerlicense - DbLicensepublic List<String> getLicenseNames(FiltersHolder filters)
RepositoryHandler
getLicenseNames in interface RepositoryHandlerfilters - FiltersHolder
public List<DbLicense> getAllLicenses()
RepositoryHandler
getAllLicenses in interface RepositoryHandlerpublic DbLicense getLicense(String name)
RepositoryHandler
getLicense in interface RepositoryHandlername - String
public void deleteLicense(String name)
RepositoryHandler
deleteLicense in interface RepositoryHandlername - Stringpublic List<DbArtifact> getArtifacts(FiltersHolder filters)
RepositoryHandler
getArtifacts in interface RepositoryHandlerfilters - FiltersHolder
public void addLicenseToArtifact(DbArtifact artifact,
String licenseId)
RepositoryHandler
addLicenseToArtifact in interface RepositoryHandlerartifact - DbArtifactlicenseId - String
public void removeLicenseFromArtifact(DbArtifact artifact,
String licenseId)
RepositoryHandler
removeLicenseFromArtifact in interface RepositoryHandlerartifact - DbArtifactlicenseId - String
public void approveLicense(DbLicense license,
Boolean approved)
RepositoryHandler
approveLicense in interface RepositoryHandlerlicense - DbLicenseapproved - Booleanpublic void store(DbArtifact artifact)
RepositoryHandler
store in interface RepositoryHandlerartifact - DbArtifactpublic List<String> getGavcs(FiltersHolder filters)
RepositoryHandler
getGavcs in interface RepositoryHandlerfilters - FiltersHolder
public List<String> getGroupIds(FiltersHolder filters)
RepositoryHandler
getGroupIds in interface RepositoryHandlerfilters - FiltersHolder
public List<String> getArtifactVersions(DbArtifact artifact)
RepositoryHandler
getArtifactVersions in interface RepositoryHandlerartifact - DbArtifact
public DbArtifact getArtifact(String gavc)
RepositoryHandler
getArtifact in interface RepositoryHandlergavc - String
public void deleteArtifact(String gavc)
RepositoryHandler
deleteArtifact in interface RepositoryHandlergavc - String
public void updateDoNotUse(DbArtifact artifact,
Boolean doNotUse)
RepositoryHandler
updateDoNotUse in interface RepositoryHandlerartifact - DbArtifactdoNotUse - Boolean
public void updateDownloadUrl(DbArtifact artifact,
String downLoadUrl)
RepositoryHandler
updateDownloadUrl in interface RepositoryHandlerartifact - DbArtifactdownLoadUrl - String
public void updateProvider(DbArtifact artifact,
String provider)
RepositoryHandler
updateProvider in interface RepositoryHandlerartifact - DbArtifactprovider - String
public List<DbModule> getAncestors(DbArtifact artifact,
FiltersHolder filters)
RepositoryHandler
getAncestors in interface RepositoryHandlerartifact - Stringfilters - FiltersHolder
public void store(DbModule module)
RepositoryHandler
store in interface RepositoryHandlermodule - DbModulepublic List<String> getModuleNames(FiltersHolder filters)
RepositoryHandler
getModuleNames in interface RepositoryHandlerfilters - FiltersHolder
public List<String> getModuleVersions(String name,
FiltersHolder filters)
RepositoryHandler
getModuleVersions in interface RepositoryHandlername - Stringfilters - FiltersHolder
public DbModule getModule(String moduleId)
RepositoryHandler
getModule in interface RepositoryHandlermoduleId - String
public List<DbModule> getModules(FiltersHolder filters)
RepositoryHandler
getModules in interface RepositoryHandlerfilters - FiltersHolder
public void deleteModule(String moduleId)
RepositoryHandler
deleteModule in interface RepositoryHandlermoduleId - Stringpublic void promoteModule(DbModule module)
RepositoryHandler
promoteModule in interface RepositoryHandlermodule - Stringpublic DbModule getRootModuleOf(String gavc)
RepositoryHandler
getRootModuleOf in interface RepositoryHandlergavc - String
public DbModule getModuleOf(String gavc)
RepositoryHandler
getModuleOf in interface RepositoryHandlergavc - String
public List<String> getOrganizationNames()
RepositoryHandler
getOrganizationNames in interface RepositoryHandlerpublic DbOrganization getOrganization(String name)
RepositoryHandler
getOrganization in interface RepositoryHandlername - String
public void deleteOrganization(String organizationId)
RepositoryHandler
deleteOrganization in interface RepositoryHandlerorganizationId - Stringpublic void store(DbOrganization organization)
RepositoryHandler
store in interface RepositoryHandlerorganization - DbOrganization
public void addModulesOrganization(String corporateGidPrefix,
DbOrganization organization)
RepositoryHandler
addModulesOrganization in interface RepositoryHandlercorporateGidPrefix - Stringorganization - DbOrganization
public void removeModulesOrganization(String corporateGidPrefix,
DbOrganization organization)
RepositoryHandler
removeModulesOrganization in interface RepositoryHandlercorporateGidPrefix - Stringorganization - DbOrganizationpublic void removeModulesOrganization(DbOrganization organization)
RepositoryHandler
removeModulesOrganization in interface RepositoryHandlerorganization - DbOrganizationpublic List<DbOrganization> getAllOrganizations()
RepositoryHandler
getAllOrganizations in interface RepositoryHandlerpublic void store(DbProduct dbProduct)
RepositoryHandler
store in interface RepositoryHandlerdbProduct - DbProductpublic DbProduct getProduct(String name)
RepositoryHandler
getProduct in interface RepositoryHandlername - String
public List<String> getProductNames()
RepositoryHandler
getProductNames in interface RepositoryHandlerpublic void deleteProduct(String name)
RepositoryHandler
deleteProduct in interface RepositoryHandlername - String
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||