Exemplo n.º 1
0
 public void returnedContentTypeDialog(ReturnEvent event) {
   if (event.getReturnValue() == null) {
     return;
   }
   MultiMediaMaterialType materialType =
       (MultiMediaMaterialType) event.getReturnParameters().get(Constants.KEY_RETURN_FROM_DIALOG);
   multiMediaBean.getContentManagement().setMaterialType(materialType);
 }
Exemplo n.º 2
0
 public void returnedWorkGroupDialog(ReturnEvent event) {
   if (event.getReturnValue() == null) {
     return;
   }
   AbstractWorkGroup workGroup =
       (AbstractWorkGroup) event.getReturnParameters().get(Constants.KEY_RETURN_FROM_DIALOG);
   multiMediaBean.getContentManagement().setWorkGroup(workGroup);
 }
Exemplo n.º 3
0
 public void returnedDownloadAccessModuleDialog(ReturnEvent event) {
   if (event.getReturnValue() == null) {
     return;
   }
   AccessModule accessModule =
       (AccessModule) event.getReturnParameters().get(Constants.KEY_RETURN_FROM_DIALOG);
   multiMediaBean.getContentManagement().setDownLoadAccessModule(accessModule);
 }
  public void uploadAndReturn(ReturnEvent event) {

    if (event.getReturnValue() == null) return;

    String imageType = (String) event.getReturnValue();
    byte[] picture = (byte[]) event.getReturnParameters().get("picture");

    if (picture != null) {
      this.realPerson.setImage(picture);

      this.imageSource = JsfUtils.getVirtualImageUrl(picture, "realPic" + (counter++));
    }
  }
Exemplo n.º 5
0
  public void returned(ReturnEvent event) { // ReturnListener Method
    if (event.getReturnParameters() != null) {
      if (event.getReturnParameters().size() > 0) {
        AuthorityRowData authorityRowData =
            (AuthorityRowData) event.getReturnParameters().get(Constants.KEY_RETURN_FROM_DIALOG);
        multiMediaBean.setRelatedAuthority((AuthorityRecord) authorityRowData.getEntity());
        //						.getEntity())
        //				relatedAuthority = (AuthorityRecord) authorityRowData
        //						.getEntity();
        System.out.println(((AuthorityRecord) authorityRowData.getEntity()).getAuthority());
      }
    }

    //		initInputObjects(event);
    methodInvoker(_CONST_RETURNED_METHOD_NAME, event);
    JsfUtils.removeFromPageFlow(_CONST_FILTER_KEY);
  }
  public void returnFromSelectLibrary(ReturnEvent event) {

    JsfUtils.removeFromPageFlow(MEMBER_PROFILE_TYPE);
    AbstractWorkGroup selectedUnitLib =
        (AbstractWorkGroup)
            event.getReturnParameters().get(UserManagementConstants.SELECTED_UNIT_LIB_OBJECT_NAME);

    if (selectedUnitLib == null) return;

    this.selectedUnitOrLib = selectedUnitLib;
  }
Exemplo n.º 7
0
 public void returnFromDeleteDialog(ReturnEvent event) {
   Integer deleteConfirm = (Integer) event.getReturnValue();
   if (deleteConfirm != null && deleteConfirm == 0) {
     if (JsfUtils.resolveVariable("row") != null) {
       UserFavoriteSubjectRowData rowData =
           (UserFavoriteSubjectRowData) JsfUtils.resolveVariable("row");
       UserFavoriteSubject selectedSubject = (UserFavoriteSubject) rowData.getEntity();
       NliSdiServiceProxy.getInstance().removeUserFavoriteSubject(selectedSubject);
       subjectModel.refresh();
     }
   }
 }
Exemplo n.º 8
0
 public void returnFromDeleteNewItemDialog(ReturnEvent event) {
   Integer deleteConfirm = (Integer) event.getReturnValue();
   if (deleteConfirm != null && deleteConfirm == 0) {
     NewsWebUtil.getInstance()
         .deleteDigitalFromNewItems(
             (BibliographicRecord)
                 NliUnimarcStorageServiceProxy.getInstance()
                     .findById(
                         BibliographicRecord.class,
                         (Long) JsfUtils.getFromPageFlow(Constants.RECORD_ID)),
             (VirtualContentManagement) contentManagementRowData.getEntity());
   }
 }
Exemplo n.º 9
0
 public void returnDeleteHighVersionDialogValue(ReturnEvent event) {
   Integer deleteConfirm = (Integer) event.getReturnValue();
   if (deleteConfirm == 0) {
     try {
       addMultiMediaBean.setLargeThumbFileName("");
       multiMedia.setLargeThumbnail(null);
       multiMedia.setLargeThumbSystemic(true);
     } catch (Exception e) {
       e.printStackTrace();
       ErrorReportingUtils.getInstance().reportError(e);
     }
   }
 }
Exemplo n.º 10
0
 public void returnDeleteFulltextArchiveDialogValue(ReturnEvent event) {
   Integer deleteConfirm = (Integer) event.getReturnValue();
   if (deleteConfirm == 0) {
     try {
       addMultiMediaBean.setFulltextFileName("");
       multiMedia.setFulltextFile(null);
       multiMedia.setFulltextFileSystemic(true);
     } catch (Exception e) {
       e.printStackTrace();
       ErrorReportingUtils.getInstance().reportError(e);
     }
   }
 }
Exemplo n.º 11
0
 public void returnFullTextDialogValue(ReturnEvent event) {
   Integer confirm = (Integer) event.getReturnValue();
   if (confirm == 0) {
     try {
       multiMediaBean.getContentManagement().setFullText(true);
       NliMultiMediaServiceProxy.getInstance()
           .updateVirtualContentManagement(multiMediaBean.getContentManagement(), null, false);
       contentManagementRowData.setFullText(true);
     } catch (Exception e) {
       e.printStackTrace();
       ErrorReportingUtils.getInstance().reportError(e);
     }
   }
 }
Exemplo n.º 12
0
  @SuppressWarnings("unchecked")
  public void returnOptions(ReturnEvent event) {
    Object value = event.getReturnValue();
    StringBuffer buffer = new StringBuffer();
    int addedPrice = 0;
    if (value instanceof List) {
      for (CarOption option : (List<CarOption>) value) {
        addedPrice = addedPrice + option.getPrice();
        if (buffer.length() != 0) buffer.append(", ");
        buffer.append(option.getName());
      }
    }

    _options.setValue(buffer.toString());

    Integer price = (Integer) _price.getValue();
    _price.setValue(new Integer(price.intValue() + addedPrice));
  }
Exemplo n.º 13
0
 public void returnDeleteDialogValue(ReturnEvent event) {
   Integer deleteConfirm = (Integer) event.getReturnValue();
   if (deleteConfirm == 0) {
     try {
       MultiMedia multiMedia =
           CMSUtil.getMultiMedia(multiMediaBean.getContentManagement(), false, false, false);
       NliMultiMediaServiceProxy.getInstance()
           .removeContent(
               multiMediaBean.getContentManagement().getArchiveId(),
               multiMediaBean.getContentManagement().getId(),
               multiMedia.getId(),
               1,
               multiMedia.getFileContent().getFileFormate());
     } catch (Exception e) {
       e.printStackTrace();
       ErrorReportingUtils.getInstance().reportError(e);
     }
   }
 }
 /** Give subclasses a chance to override the ReturnEvent. */
 protected void queueReturnEvent(FacesContext context, UIComponent component, ReturnEvent event) {
   event.queue();
 }
Exemplo n.º 15
0
  public void returnFromLocation(ReturnEvent event) {

    Location location = (Location) event.getReturnParameters().get("location");
    //  this.address.setLocation(location);
    JsfUtils.storeOnPageFlow("selectedLocation", location);
  }