Package fr.norsys.mapper.console.model

Examples of fr.norsys.mapper.console.model.Application


   * @param applications :
   *            Collection of application beans
   */
  private void modify(Application appli, Collection applications)
      throws ApplicationException {
    Application application = appli;
    for (Iterator it = applications.iterator(); it.hasNext();) {
      Application a = (Application) it.next();
      if (application.getId().equals(a.getId())) {
        if (!application.getName().equals(a.getName())) {
          try {
            fileService
                .changeFileName(a.getName() + xmlFileExt, application
                    .getName()
                    + xmlFileExt, appliDirPath);
          } catch (FileException e) {
            throw new ApplicationException(e.toString());
          }
View Full Code Here


   *            Collection of application beans
   */
  public void delete(String id, Collection applications)
      throws ApplicationException {
    for (Iterator it = applications.iterator(); it.hasNext();) {
      Application a = (Application) it.next();
      if (a.getId().equals(id)) {
        applications.remove(a);
        try {
          fileService.deleteFile(a.getName() + xmlFileExt,
              appliDirPath);
        } catch (FileException e) {
          throw new ApplicationException(e.toString());
        }
        break;
View Full Code Here

   *            Collection of application beans
   * @return Application
   */
  public Application get(String id, Collection applications)
      throws ApplicationException {
    Application appli=null;
    for (Iterator it = applications.iterator(); it.hasNext();) {
      Application a = (Application) it.next();
      if (a.getId().equals(id)) {
        appli = a;
      }
    }
    return appli;
  }
View Full Code Here

   *            application of the resource
   * @param applications :
   *            list of applications
   */
  public void deleteRes(String cur, Application application) throws ApplicationException {
    Application appl = application;
    Application a = appl;
    String currentResourceId = cur;
    Collection tempResources = new TreeSet(new ResourceNameComparator());
    for(Iterator resources = a.getResources().iterator(); resources.hasNext();){
      Resource r =(Resource)resources.next();
      if(!r.getId().equals(currentResourceId)){
        tempResources.add(r);
      }
    }
    a.setResources(tempResources);
    fr.norsys.mapper.console.utils.BeanUtils.copyFilledProperties(
            a, appl);
    appl=a;
  }
View Full Code Here

          xmlFileExt);
    } catch (FileException e) {
      log.error(e);
    }
    Collection applications = new TreeSet(new ApplicationNameComparator());
    Application a=null;
    for (Iterator i = applicationsNames.iterator(); i.hasNext();) {
      a=new Application((String) i.next());
      applications.add(a);
    }
    return applications;
  }
View Full Code Here

TOP

Related Classes of fr.norsys.mapper.console.model.Application

Copyright © 2018 www.massapicom. 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.