Package io.meeds.appcenter.storage
Class ApplicationCenterStorage
java.lang.Object
io.meeds.appcenter.storage.ApplicationCenterStorage
Storage service to access / load and save applications. This service will be
used , as well, to convert from JPA entity to DTO.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddApplicationToUserFavorite(long applicationId, String username) longlongcountFavorites(String username) createApplication(Application application) voiddeleteApplication(long applicationId) voiddeleteApplicationFavorite(Long applicationId, String username) getApplication(long applicationId) getApplicationImageInputStream(long fileId) getApplicationImageLastUpdated(long fileId) getApplications(String keyword) getApplicationsByBadge(String badgeName, List<String> urls) Retrieves the applications a badge is bound to, either explicitly through their stored badge name, or implicitly through a url the plugin declares.getMandatoryAndFavoriteApplications(String username, org.springframework.data.domain.Pageable pageable) booleanisFavoriteApplication(Long applicationId, String username) voidupdateApplication(Application application) voidupdateFavoriteApplicationOrder(long applicationId, String username, Long order)
-
Field Details
-
NAME_SPACE
- See Also:
-
DEFAULT_LAST_MODIFIED
-
-
Constructor Details
-
ApplicationCenterStorage
public ApplicationCenterStorage()
-
-
Method Details
-
createApplication
-
updateApplication
@CacheEvict(cacheNames="app-center.application", key="#p0.getId()") public void updateApplication(Application application) -
deleteApplication
@CacheEvict(cacheNames="app-center.application", key="#p0") public void deleteApplication(long applicationId) throws ApplicationNotFoundException - Throws:
ApplicationNotFoundException
-
getApplication
-
getApplicationsByBadge
Retrieves the applications a badge is bound to, either explicitly through their stored badge name, or implicitly through a url the plugin declares.- Parameters:
badgeName- the badge identifierurls- the drawer and/or portlet names declared by the plugin, possibly empty- Returns:
- the bound applications, never null
-
findSystemApplicationByUrl
-
addApplicationToUserFavorite
public FavoriteApplicationEntity addApplicationToUserFavorite(long applicationId, String username) throws ApplicationNotFoundException - Throws:
ApplicationNotFoundException
-
updateFavoriteApplicationOrder
public void updateFavoriteApplicationOrder(long applicationId, String username, Long order) throws ApplicationNotFoundException - Throws:
ApplicationNotFoundException
-
deleteApplicationFavorite
-
getSystemApplications
-
isFavoriteApplication
-
countFavorites
-
getApplicationImageLastUpdated
-
getApplicationImageInputStream
-
getApplications
-
countApplications
public long countApplications() -
getMandatoryAndFavoriteApplications
public List<UserApplication> getMandatoryAndFavoriteApplications(String username, org.springframework.data.domain.Pageable pageable)
-