You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@usergrid.apache.org by "David Johnson (JIRA)" <ji...@apache.org> on 2015/04/07 15:35:12 UTC
[jira] [Updated] (USERGRID-547) Encapsulate Application create,
delete and retrieve code
[ https://issues.apache.org/jira/browse/USERGRID-547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Johnson updated USERGRID-547:
-----------------------------------
Description:
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:
{code}
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 );
}
{code}
was:
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 );
}
> 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:
> {code}
> 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 );
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)