David Johnson created USERGRID-547: -------------------------------------- Summary: Encapsulate Application create, delete and retrieve code Key: USERGRID-547 URL: https://issues.apache.org/jira/browse/USERGRID-547 Project: Usergrid Issue Type: Story Components: Stack Affects Versions: 2.0 Reporter: Todd Nine Assignee: David Johnson Fix For: 2.0
Currently the code for creating, deleting, restoring and retrieving applications (and application_info entities) is spread across two modules (core and services) and across several classes ManagementServiceImpl and CpEntityManagerFactoryImpl. This is confusing and problematic. Introduce a new interface that encapsulate's this logic, perhaps something like this: public interface OrganizationApplicationManager { // application creation public Entity createApplication( CpEntityManagerFactory emf, String orgName, String appName) throws Exception; // application access public ApplicationScope getApplication( String orgAppName ); public Observable<ApplicationScope> getAllApplications(); public Observable<ApplicationScope> getOrganizationApplications( String orgName ); // application delete and restore public Observable<ApplicationScope> getDeletedApplications(); public void deleteApplication( String orgAppName ); public void deleteApplication( Id applicationId ); public void restoreApplication( String orgAppName ); public void restoreApplication( Id applicationId ); } -- This message was sent by Atlassian JIRA (v6.3.4#6332)