public class ApplicationRegistryServiceImpl extends Object implements ApplicationRegistryService, org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
static String |
PRODUCER_CATEGORY_NAME_SUFFIX |
REMOTE_DISPLAY_NAME_SUFFIX| Constructor and Description |
|---|
ApplicationRegistryServiceImpl(org.exoplatform.commons.chromattic.ChromatticManager manager,
POMSessionManager mopManager,
UserACL userACL) |
| Modifier and Type | Method and Description |
|---|---|
List<Application> |
getAllApplications()
Return list of all Application in database (unsorted)
If there are not any Application in database, return an empty list |
Application |
getApplication(String id)
Return Application with id provided
|
Application |
getApplication(String category,
String name)
Return Application in specific category and have name provided in param
If it can't be found, return null |
List<ApplicationCategory> |
getApplicationCategories()
Return list of all current application categories (unsorted, all Application in all ApplicationType)
|
List<ApplicationCategory> |
getApplicationCategories(Comparator<ApplicationCategory> sortComparator)
Return list of all current application categories (sorted, all applications in all types)
|
List<ApplicationCategory> |
getApplicationCategories(Comparator<ApplicationCategory> sortComparator,
String accessUser,
ApplicationType<?>... appTypes) |
List<ApplicationCategory> |
getApplicationCategories(String accessUser,
ApplicationType<?>... appTypes)
Return list of ApplicationCatgory (and applications in each category)
|
ApplicationCategory |
getApplicationCategory(String name)
Return ApplicationCategory with name provided
if not found, return null |
List<Application> |
getApplications(ApplicationCategory category,
ApplicationType<?>... appTypes)
Return list of applications (unsorted) in specific category and have specific type
|
List<Application> |
getApplications(ApplicationCategory category,
Comparator<Application> sortComparator,
ApplicationType<?>... appTypes)
Return list of applications (sorted) in specific category and have specific type
|
ContentRegistry |
getContentRegistry() |
void |
importAllPortlets()
Get all deployed portlet, add to portlet's ApplicationCategory
If ApplicationCategory currently doesn't exist, it'll be created If Application've already existed, it'll be ignored |
void |
importExoGadgets()
Get all Gadget, add to eXoGadgets application category
When first added, it's access permission will be Everyone If ApplicationCategory currently doesn't exist, it'll be created Gadget that has been imported will be ignored |
void |
initListener(org.exoplatform.container.component.ComponentPlugin com) |
void |
remove(Application app)
Remove an Application from database
If it can't be found, it will be ignored (no exception) |
void |
remove(ApplicationCategory category)
Remove application category (and all application in it) from database
If it doesn't exist, it will be ignored |
void |
save(ApplicationCategory category)
Save an ApplicationCategory to database
If it doesn't exist, a new one will be created, if not, it will be updated |
void |
save(ApplicationCategory category,
Application application)
Save Application in an ApplicationCategory
If ApplicationCategory or Application don't exist, they'll be created If Application has been already existed, it will be updated |
void |
start() |
void |
stop() |
void |
update(Application application)
Update an Application
It must be existed in database, if not, this will throw an IllegalStateException |
public static final String PRODUCER_CATEGORY_NAME_SUFFIX
public ApplicationRegistryServiceImpl(org.exoplatform.commons.chromattic.ChromatticManager manager,
POMSessionManager mopManager,
UserACL userACL)
public ContentRegistry getContentRegistry()
public void initListener(org.exoplatform.container.component.ComponentPlugin com)
initListener in interface ApplicationRegistryServicepublic List<ApplicationCategory> getApplicationCategories(Comparator<ApplicationCategory> sortComparator, String accessUser, ApplicationType<?>... appTypes)
public List<ApplicationCategory> getApplicationCategories(String accessUser, ApplicationType<?>... appTypes) throws Exception
ApplicationRegistryServicegetApplicationCategories in interface ApplicationRegistryServiceappTypes - - array of ApplicationType, used to filter applications in each application categoryExceptionpublic List<ApplicationCategory> getApplicationCategories() throws Exception
ApplicationRegistryServicegetApplicationCategories in interface ApplicationRegistryServiceExceptionpublic List<ApplicationCategory> getApplicationCategories(Comparator<ApplicationCategory> sortComparator) throws Exception
ApplicationRegistryServicegetApplicationCategories in interface ApplicationRegistryServicesortComparator - - Comparator used to sort the returned listExceptionpublic ApplicationCategory getApplicationCategory(String name)
ApplicationRegistryServicegetApplicationCategory in interface ApplicationRegistryServicename - - ApplicationCategory's namepublic void save(ApplicationCategory category)
ApplicationRegistryServicesave in interface ApplicationRegistryServicecategory - - ApplicationCategory object that will be savedpublic void remove(ApplicationCategory category)
ApplicationRegistryServiceremove in interface ApplicationRegistryServicecategory - - ApplicationCategory object that will be removedpublic List<Application> getApplications(ApplicationCategory category, ApplicationType<?>... appTypes) throws Exception
ApplicationRegistryServicegetApplications in interface ApplicationRegistryServicecategory - - ApplicationCategory that you want to list applicationsappTypes - - array of application typeExceptionpublic List<Application> getApplications(ApplicationCategory category, Comparator<Application> sortComparator, ApplicationType<?>... appTypes)
ApplicationRegistryServicegetApplications in interface ApplicationRegistryServicecategory - - ApplicationCategory that you want to list applicationssortComparator - - comparator used to sort application listappTypes - - array of application typepublic List<Application> getAllApplications() throws Exception
ApplicationRegistryServicegetAllApplications in interface ApplicationRegistryServiceExceptionpublic Application getApplication(String id) throws Exception
ApplicationRegistryServicegetApplication in interface ApplicationRegistryServiceid - - must be valid applicationId (catgoryname/applicationName), if not, this will throw exceptionExceptionpublic Application getApplication(String category, String name)
ApplicationRegistryServicegetApplication in interface ApplicationRegistryServicecategory - - name of application categoryname - - name of applicationpublic void save(ApplicationCategory category, Application application)
ApplicationRegistryServicesave in interface ApplicationRegistryServicecategory - - ApplicationCategory that your application'll be saved toapplication - - Application that will be savedpublic void update(Application application)
ApplicationRegistryServiceupdate in interface ApplicationRegistryServiceapplication - - Application that you want to updatepublic void remove(Application app)
ApplicationRegistryServiceremove in interface ApplicationRegistryServiceapp - - Application that you want to remove, must not be nullpublic void importExoGadgets()
throws Exception
ApplicationRegistryServiceimportExoGadgets in interface ApplicationRegistryServiceExceptionpublic void importAllPortlets()
throws Exception
ApplicationRegistryServiceimportAllPortlets in interface ApplicationRegistryServiceExceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.StartableCopyright © 2017 JBoss by Red Hat. All Rights Reserved.