Examples of IApplicationMetaInfo


Examples of org.jresearch.flexess.core.model.IApplicationMetaInfo

    }
  }

  @Override
  public List<IRoleInstanceMetaInfo> getDefaultRoleInstances(String applicationId) throws LoadRoleInstanceException {
    IApplicationMetaInfo application = applicationService.getApplication(applicationId);
    return roleInstanceService.getDefaultRoleInstances(application.getModelId());
  }
View Full Code Here

Examples of org.jresearch.flexess.core.model.IApplicationMetaInfo

    // return apps;
  }

  @Override
  public void deleteApplication(String id) {
    IApplicationMetaInfo app = getApplication(id);
    if (app != null) {
      Query query = em.createNamedQuery("delete from {0} where application.id =?1)"); //$NON-NLS-1$
      query.setParameter(1, id);
      query.executeUpdate();
View Full Code Here

Examples of org.jresearch.flexess.core.model.IApplicationMetaInfo

public class App1Test extends BaseMetaTest {

  @Test
  public void testCreateApplication() throws Exception {
    IApplicationService app = getApplicationService();
    IApplicationMetaInfo am = app.getApplication("app_com.jresearchsoft.uam.admin"); //$NON-NLS-1$
    IApplicationMetaInfo am2 = app.findApplication("TestModel"); //$NON-NLS-1$
    assertNotNull(am);
    assertNotNull(am2);
    assertEquals(am.getId(), "app_com.jresearchsoft.uam.admin"); //$NON-NLS-1$
    assertEquals(am.getName(), "FlexessAdmin"); //$NON-NLS-1$
  }
View Full Code Here

Examples of org.jresearch.flexess.core.model.IApplicationMetaInfo

      modelMetaInfo.setId(model.getId());
      modelMetaInfo.setModel(modelString);
      modelService.addTransientModel(modelMetaInfo);
      // this is a new model, we need to create an application
      String newAppId = APPLICATION_PREFIX + model.getId();
      IApplicationMetaInfo application = applicationService.getApplication(newAppId);
      if (application == null) {
        application = applicationService.getApplicationImpl(modelMetaInfo);
        application.setName(model.getName());
        application.setId(newAppId);
      }
      // assign the first configured UMI as default if application hasn't
      // any others
      if (application.getUmiSettings() == null) {
        List<? extends ISettings> list = umiSettingsManager.getSettingsList();
        if (!list.isEmpty()) {
          application.setUmiSettings(list.get(0));
        }
      }
      try {
        application = applicationService.saveApplication(application);
      } catch (DataModelException e) {
View Full Code Here

Examples of org.jresearch.flexess.core.model.IApplicationMetaInfo

    return userRoleDao.getUserRoles(userId);
  }

  @Override
  public void addUserRole(String userId, String applicationId, IRoleInstanceMetaInfo rm) throws ObjectNotFoundException, DataModelException {
    IApplicationMetaInfo app = applicationService.getApplication(applicationId);
    if (app == null) {
      throw new ObjectNotFoundException("Application is not found", applicationId); //$NON-NLS-1$
    }
    addUserRole(userId, app, rm);
  }
View Full Code Here

Examples of org.jresearch.flexess.core.model.IApplicationMetaInfo

    this.applicationService = applicationService;
  }

  @Override
  public IModelMetaInfo getModelMetaInfo(String applicationId) {
    IApplicationMetaInfo application = applicationService.getApplication(applicationId);
    if (application == null) {
      return null;
    }
    return modelService.getSerializedModel(application.getModelId());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.