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); } } }
public boolean isHasTextType() { if (multiMediaBean.getContentManagement().getDocId() != null) { hasTextType = false; } else { hasTextType = true; } return hasTextType; }
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); }
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); }
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 ViewDocumentInfoBean() { multiMediaBean = MultiMediaBean.getInstance(); addMultiMediaBean = AddMultiMediaBean.getInstance(); contentManagementRowData = (MultiMediaContentRowData) JsfUtils.getFromPageFlow(CMSConstants.VIRTUAL_CONTENT_MANAGEMENT); biblioMaterialType = (String) JsfUtils.getFromPageFlow(Constants.BIBLIO_MATERIAL_TYPE); multiMediaBean.setContentManagement( (VirtualContentManagement) getContentManagementRowData().getEntity()); addMultiMediaBean.setMultiMedia(getMultiMedia()); if (multiMedia.getLargeThumbnail() != null) addMultiMediaBean.setLargeThumbFileName(multiMedia.getLargeThumbnail().getFileName()); if (multiMedia.getSmallThumbnail() != null) addMultiMediaBean.setSmallThumbFileName(multiMedia.getSmallThumbnail().getFileName()); if (multiMedia.getLowQualityFile() != null) addMultiMediaBean.setLowQualityFileName(multiMedia.getLowQualityFile().getFileName()); if (multiMedia.getFulltextFile() != null) addMultiMediaBean.setFulltextFileName(multiMedia.getFulltextFile().getFileName()); selectedContentType = contentManagementRowData.getFileFormat(); if (contentManagementRowData.getRecordType() == MultiMediaConstants.TEMP_BIBLIO_RECORD) isBiblioRecord = false; if (contentManagementRowData.getDigitalVerNum() == null) contentManagementRowData.setDigitalVerNum((Float) 1f); ResultPage resultPage = NliMultiMediaServiceProxy.getInstance() .findBiblioRecordIdByVCMId( contentManagementRowData.getRecordType(), contentManagementRowData.getContentManagement().getId(), true, 0, 20, new GridFilter()); if (resultPage != null) { if (!resultPage.getResult().isEmpty()) { complementaryRecordId = (Long) resultPage.getResult().get(0); complementryInfo = false; JsfUtils.storeOnPageFlow(CMSConstants.KEY_COMPLEMENTARY_INFO, false); } } JsfUtils.storeOnPageFlow(CMSConstants.KEY_COMPLEMENTARY_INFO, true); }
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); } } }
public String doConfirm() { try { NliMultiMediaServiceProxy.getInstance() .updateVirtualContentManagement(multiMediaBean.getContentManagement(), multiMedia, false); Long recordId = (Long) JsfUtils.getFromPageFlow(Constants.RECORD_ID); if (recordId != null) { updateDigitalResourceIndexes( multiMediaBean.getContentManagement(), recordId, true, DigitalresourcesSchema.UPDATE_INDEX); } return goBack(); } catch (Exception e) { e.printStackTrace(); ErrorReportingUtils.getInstance().reportError(e); return ""; } }
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 String addToGallery() { int fileType = NewsWebUtil.findVcmType(multiMediaBean.getContentManagement()); String fileName = contentManagementRowData.getFileName(); if ((fileType == MultiMediaConstants.AUDIO_TYPE || fileType == MultiMediaConstants.VIDEO_TYPE) && !MultimediaWebUtil.isPlayable(fileType, fileName)) { JsfUtils.ShowMessageDialog("gallery.content.format.is.not.valid.message", 420, 150); return null; } else { JsfUtils.storeOnSession(Constants.GALLERY_TYPE, String.valueOf(fileType)); JsfUtils.storeOnSession(Constants.GALLERY_VCM, contentManagementRowData.getEntity()); String manipulateMode = (String) this.getManipulateMode().getValue(); if (manipulateMode.equalsIgnoreCase(Constants.EDIT_MOD)) JsfUtils.storeOnPageFlow( Constants.CMS_CREATE_DESCRIPTION_PATH, Constants.CMS_GO_EDIT_MATERIAL); else JsfUtils.storeOnPageFlow( Constants.CMS_CREATE_DESCRIPTION_PATH, Constants.CMS_GO_DISPAY_MATERIAL); return Constants.GALLERY_VIEW_ADD_TO; } }
public boolean isHasOtherFormatType() { hasOtherFormatType = multiMediaBean.getContentManagement().getOtherFormatId() != null; return hasOtherFormatType; }
public boolean isAudioOrVideo() { return (multiMediaBean.getContentManagement().getAudioId() != null || multiMediaBean.getContentManagement().getVideoId() != null); }
public String getFileUrl() { fileUrl = CMSUtil.showDownloadedFile( null, multiMediaBean.getContentManagement(), MultiMediaConstants.LARGE_THUMBNAIL); return fileUrl; }
public void goDeleteFullTextVersion(ActionEvent event) { multiMediaBean.getContentManagement().setFullText(false); contentManagementRowData.setFullText(false); }
public void goDeletePrintableVersion(ActionEvent event) { multiMediaBean.getContentManagement().setOriginal(true); contentManagementRowData.setOriginal(true); }