List of usage examples for java.text DateFormat LONG
int LONG
To view the source code for java.text DateFormat LONG.
Click Source Link
From source file:com.espian.ticktock.AddEditActivity.java
@Override public void onLoadFinished(Loader<Cursor> loader, Cursor data) { try {//from w w w . j a v a 2 s.c o m data.moveToFirst(); Date editableDate = DateFormat.getDateInstance(DateFormat.LONG).parse(data.getString(2)); mDatePicker.init(editableDate, new Date(), mMaxDate.getTime()); mTitle.setText(data.getString(1)); mHelper.show(); } catch (Exception e) { e.printStackTrace(); Toast.makeText(this, R.string.load_date_exception, Toast.LENGTH_SHORT).show(); } }
From source file:de.aw.awlib.preferences.AWPreferencesAllgemein.java
@CallSuper @Override//ww w . j ava2 s. co m public void onCreatePreferences(Bundle bundle, String s) { mApplication = ((AWApplication) getActivity().getApplicationContext()); addPreferencesFromResource(R.xml.awlib_preferences_allgemein); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity()); for (int pkKey : mPrefs) { String key = getString(pkKey); Preference preference = findPreference(key); if (pkKey == R.string.pkCompileInfo) { java.util.Date date = new Date(BuildConfig.BuildTime); DateFormat df = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG); StringBuilder buildInfo = new StringBuilder("Compilezeit: ").append(df.format(date)); preference.setSummary(buildInfo); } else if (pkKey == R.string.pkVersionInfo) { StringBuilder versionInfo = new StringBuilder("Datenbankversion : ") .append(mApplication.theDatenbankVersion()).append(", Version: ") .append(BuildConfig.VERSION_NAME); preference.setSummary(versionInfo); } else if (pkKey == R.string.pkServerUID || pkKey == R.string.pkServerURL) { String value = prefs.getString(key, null); preference.setSummary(value); } else if (pkKey == R.string.pkSavePeriodic) { long value = prefs.getLong(DODATABASESAVE, Long.MAX_VALUE); setRegelmSicherungSummary(preference, prefs, value); } preference.setOnPreferenceClickListener(this); } }
From source file:ilearn.orb.controller.AnnotationController.java
@RequestMapping(value = "/annotation/{userid}", method = RequestMethod.GET) public ModelAndView textUserAnnotation(Locale locale, ModelMap modelMap, HttpServletRequest request, HttpSession session, @PathVariable("userid") Integer userid) { try {// w w w. j ava 2 s . c om request.setCharacterEncoding("UTF-8"); } catch (UnsupportedEncodingException e1) { e1.printStackTrace(); } txModule = new TextAnnotationModule(); ModelAndView model = new ModelAndView(); model.setViewName("annotation"); try { User[] students = null; UserProfile p = null; User selectedStudent = null; if (userid < 0) { students = HardcodedUsers.defaultStudents(); selectedStudent = selectedStudent(students, userid.intValue()); // p = HardcodedUsers.defaultProfile(selectedStudent.getId()); String json = UserServices .getDefaultProfile(HardcodedUsers.defaultProfileLanguage(selectedStudent.getId())); if (json != null) p = new Gson().fromJson(json, UserProfile.class); } else { Gson gson = new GsonBuilder().registerTypeAdapter(java.util.Date.class, new UtilDateDeserializer()) .setDateFormat(DateFormat.LONG).create(); String json = UserServices.getProfiles(Integer.parseInt(session.getAttribute("id").toString()), session.getAttribute("auth").toString()); students = gson.fromJson(json, User[].class); selectedStudent = selectedStudent(students, userid.intValue()); json = UserServices.getJsonProfile(userid, session.getAttribute("auth").toString()); if (json != null) p = new Gson().fromJson(json, UserProfile.class); } modelMap.put("profileId", userid); modelMap.put("selectedStudent", selectedStudent); modelMap.put("students", students); modelMap.put("selectedProfile", p); ClassLoader classLoader = getClass().getClassLoader(); File file = new File(classLoader .getResource("data/" + (selectedStudent.getLanguage().toLowerCase()) + ".json").getFile()); String js = LocalStorageTextFileHandler.loadFileAsString(file); Groups grps = new Gson().fromJson(js, Groups.class); modelMap.put("presents", grps); } catch (NumberFormatException e) { //e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return model; }
From source file:com.bdb.weather.display.stripchart.StripChart.java
private void createRenderer(int dataset, TimeSeriesCollection collection, NumberFormat format) { DefaultXYItemRenderer renderer = new DefaultXYItemRenderer(); renderer.setBaseShapesVisible(false); renderer.setBaseToolTipGenerator(//from w ww . j a v a 2 s. c o m new StandardXYToolTipGenerator(StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT, DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG), format)); renderer.setDefaultEntityRadius(1); plot.setRenderer(dataset, renderer); plot.setDataset(dataset, collection); }
From source file:org.sonar.plugins.openedge.foundation.OpenEdgeComponents.java
private void registerLicences(LicenceRegistrar[] licRegistrars, String permanentId) { for (LicenceRegistrar reg : licRegistrars) { LicenceRegistrar.Licence lic = new LicenceRegistrar.Licence(); reg.register(lic);//w w w. j ava 2 s. c o m if (lic.getRepositoryName().isEmpty()) { continue; } LOG.info("Found {} licence - Permanent ID '{}' - Customer '{}' - Repository '{}' - Expiration date {}", lic.getType().toString(), lic.getPermanentId(), lic.getCustomerName(), lic.getRepositoryName(), DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG) .format(new Date(lic.getExpirationDate()))); if (!lic.getPermanentId().isEmpty() && !permanentId.equals(lic.getPermanentId())) { LOG.info("Skipped licence as it doesn't match permanent ID '{}'", permanentId); continue; } // Licence with highest expiration date wins Licence existingLic = licences.get(lic.getRepositoryName()); if ((existingLic == null) || (existingLic.getExpirationDate() < lic.getExpirationDate())) { licences.put(lic.getRepositoryName(), lic); LOG.info("Installed !"); } else { LOG.info("Conflict, skipped licence"); } } for (Entry<String, Licence> entry : licences.entrySet()) { LOG.info( "Licence summary - Repository '{}' associated with {} licence permanent ID '{}' - Customer '{}' - Expiration date {}", entry.getKey(), entry.getValue().getType().toString(), entry.getValue().getPermanentId(), entry.getValue().getCustomerName(), DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG) .format(new Date(entry.getValue().getExpirationDate()))); } }
From source file:com.carser.viamais.entity.Transaction.java
public void generateReceipt(final OutputStream os, final String template) throws IOException, DocumentException { reader = new PdfReader(this.getClass().getResourceAsStream("/receipts/" + template)); stamper = new PdfStamper(reader, os); form = stamper.getAcroFields();//from w ww . jav a 2s .c o m brazilLocale = new Locale("pt", "BR"); formatter = NumberFormat.getCurrencyInstance(brazilLocale); // Customer data Customer customer = getCustomer(); form.setField("CUSTOMER_NAME", customer.getName().toUpperCase()); form.setField("CUSTOMER_CPF", StringUtil.formatCPF(customer.getCpf())); form.setField("CUSTOMER_RG", customer.getRg().toUpperCase()); // Addres data Address address = customer.getAddresses().get(0); StringBuilder addressDescription = new StringBuilder(); addressDescription.append(address.getStreet()); addressDescription.append(", " + address.getNumber()); if (address.getComplement() != null) { addressDescription.append(", " + address.getComplement()); } form.setField("CUSTOMER_ADDRESS", addressDescription.toString().toUpperCase()); form.setField("CUSTOMER_DISTRICT", address.getDistrict().toUpperCase()); form.setField("CUSTOMER_CEP", address.getCep()); form.setField("CUSTOMER_CITY", address.getCity().toUpperCase()); form.setField("CUSTOMER_STATE", address.getState().toUpperCase()); List<Phone> phones = customer.getPhones(); for (Phone phone : phones) { String phoneNumber = StringUtil.formatPhone(Long.valueOf(phone.getPrefix() + "" + phone.getNumber())); switch (phone.getType()) { case "Celular": form.setField("CUSTOMER_CELLPHONE", phoneNumber); break; case "Residencial": form.setField("CUSTOMER_PHONE", phoneNumber); break; case "Comercial": form.setField("CUSTOMER_COMPHONE", phoneNumber); break; default: break; } } // Car data Car car = getCar(); form.setField("CAR_MANUFACTURER", car.getModel().getManufacturer().getName().toUpperCase()); form.setField("CAR_MODEL", car.getModel().getName().toUpperCase()); form.setField("CAR_YEAR", car.getYearOfManufacture() + "/" + car.getYearOfModel()); form.setField("CAR_COLOR", car.getColor().toUpperCase()); form.setField("CAR_PLATE", car.getLicensePlate().toUpperCase()); form.setField("CAR_CHASSI", car.getChassi().toUpperCase()); form.setField("CAR_RENAVAM", car.getRenavam().toUpperCase()); // Transaction data form.setField("CAR_DEPOSIT", formatter.format(getDeposit()) + " (" + StringUtil.formatCurrency(getDeposit()) + ")"); DateFormat dateFormatter = DateFormat.getDateInstance(DateFormat.LONG, brazilLocale); form.setField("CAR_VALUE", formatter.format(getPrice()) + " (" + StringUtil.formatCurrency(getPrice()) + ")"); form.setField("DATE", dateFormatter.format(new Date())); DateFormat deliveryDateFormatter = DateFormat.getDateInstance(DateFormat.SHORT, brazilLocale); DateFormat deliveryTimeFormatter = DateFormat.getTimeInstance(DateFormat.SHORT, brazilLocale); if (getDeliveryDate() != null) { form.setField("DELIVERY_DATE", deliveryDateFormatter.format(getDeliveryDate()) + " " + deliveryTimeFormatter.format(getDeliveryDate())); } if (getKm() != null) { form.setField("DELIVERY_KM", getKm().toString()); } }
From source file:org.jactr.tools.async.iterative.tracker.IterativeRunTracker.java
protected void update(StatusMessage message) { _totalIterations = message.getTotalIterations(); _currentIteration = message.getIteration(); if (_startTime == 0) _startTime = message.getWhen(); // when it actually started if (message.isStop()) { long currentDuration = message.getWhen() - _startTime; /*//from ww w .j a va 2 s . co m * we set the next start time to this so that we can accurately measure * the cost of any analyses being run outside of the simulation */ _startTime = message.getWhen(); _summedDurations += currentDuration; /* * weighted average of everyone up to now and last */ _estimatedIterationDuration = _summedDurations / _currentIteration; long remainingTime = (_totalIterations - _currentIteration + 1) * _estimatedIterationDuration; _estimatedCompletionTime = remainingTime + message.getWhen(); if (LOGGER.isDebugEnabled()) LOGGER.debug("estimated duration : " + _estimatedIterationDuration + " r:" + (_totalIterations - _currentIteration) + " remainingTime : " + remainingTime + "ms eta " + DateFormat.getTimeInstance(DateFormat.LONG).format(_estimatedCompletionTime)); } }
From source file:org.irmacard.androidmanagement.CredentialDetailFragment.java
public void onViewCreated(View view, Bundle savedInstanceState) { LinearLayout list = (LinearLayout) view.findViewById(R.id.detail_attribute_list); TextView issuerName = (TextView) view.findViewById(R.id.detail_issuer_description_name); TextView issuerAddress = (TextView) view.findViewById(R.id.detail_issuer_description_address); TextView issuerEMail = (TextView) view.findViewById(R.id.detail_issuer_description_email); TextView credentialDescription = (TextView) view.findViewById(R.id.detail_credential_desc_text); TextView validityValue = (TextView) view.findViewById(R.id.detail_validity_value); TextView validityRemaining = (TextView) view.findViewById(R.id.detail_validity_remaining); ImageView issuerLogo = (ImageView) view.findViewById(R.id.detail_issuer_logo); Button deleteButton = (Button) view.findViewById(R.id.detail_delete_button); IssuerDescription issuer = credential.getCredentialDescription().getIssuerDescription(); issuerName.setText(issuer.getName()); issuerAddress.setText(issuer.getContactAddress()); issuerEMail.setText(issuer.getContactEMail()); // This is not so nice, rather used a Listview here, but it is not possible // to easily make it not scrollable and show all the items. List<AttributeDescription> attr_desc = credential.getCredentialDescription().getAttributes(); Attributes attr_vals = credential.getAttributes(); for (int position = 0; position < attr_desc.size(); position++) { View attributeView = inflater.inflate(R.layout.row_attribute, null); TextView name = (TextView) attributeView.findViewById(R.id.detail_attribute_name); TextView value = (TextView) attributeView.findViewById(R.id.detail_attribute_value); AttributeDescription desc = attr_desc.get(position); name.setText(desc.getName() + ":"); value.setText(new String(attr_vals.get(desc.getName()))); list.addView(attributeView);/* w ww . j a v a 2 s . c om*/ } // Display expiry if (credential.getAttributes().isValid()) { DateFormat sdf = SimpleDateFormat.getDateInstance(DateFormat.LONG); Date expirydate = credential.getAttributes().getExpiryDate(); validityValue.setText(sdf.format(expirydate)); int deltaDays = (int) ((expirydate.getTime() - Calendar.getInstance().getTime().getTime()) / (1000 * 60 * 60 * 24)); // FIXME: text should be from resources validityRemaining.setText(deltaDays + " days remaining"); } else { // Credential has expired validityValue.setText(R.string.credential_no_longer_valid); validityValue.setTextColor(getResources().getColor(R.color.irmared)); validityRemaining.setText(""); } credentialDescription.setText(credential.getCredentialDescription().getDescription()); // Setting logo of issuer Bitmap logo = aw.getIssuerLogo(credential.getCredentialDescription().getIssuerDescription()); if (logo != null) { issuerLogo.setImageBitmap(logo); } // On delete button clicked deleteButton.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { clickedDeleteButton(); } }); }
From source file:org.sakaiproject.evaluation.tool.reporting.PDFReportExporterIndividual.java
public void buildReport(EvalEvaluation evaluation, String[] groupIds, String evaluateeId, OutputStream outputStream, boolean useNewReportStyle) { //Make sure responseAggregator is using this messageLocator responseAggregator.setMessageLocator(messageLocator); EvalPDFReportBuilder evalPDFReportBuilder = new EvalPDFReportBuilder(outputStream); Boolean instructorViewAllResults = (boolean) evaluation.getInstructorViewAllResults(); String currentUserId = commonLogic.getCurrentUserId(); String evalOwner = evaluation.getOwner(); Boolean useBannerImage = (Boolean) evalSettings.get(EvalSettings.ENABLE_PDF_REPORT_BANNER); byte[] bannerImageBytes = null; if (useBannerImage != null && useBannerImage == true) { String bannerImageLocation = (String) evalSettings.get(EvalSettings.PDF_BANNER_IMAGE_LOCATION); if (bannerImageLocation != null) { bannerImageBytes = commonLogic.getFileContent(bannerImageLocation); }/* w w w . jav a 2 s. c o m*/ } //EvalUser user = commonLogic.getEvalUserById(commonLogic.getCurrentUserId()); DateFormat df = DateFormat.getDateInstance(DateFormat.LONG); // calculate the response rate // int responsesCount = deliveryService.countResponses(evaluation.getId(), null, true); int responsesCount = evaluationService.countResponses(null, new Long[] { evaluation.getId() }, groupIds, null); int enrollmentsCount = evaluationService.countParticipantsForEval(evaluation.getId(), groupIds); String groupNames = responseAggregator.getCommaSeparatedGroupNames(groupIds); // TODO this is so hard to read it makes me cry, it should not be written as a giant single line like this -AZ evalPDFReportBuilder.addTitlePage(evaluation.getTitle(), groupNames, messageLocator.getMessage("reporting.pdf.startdatetime", df.format(evaluation.getStartDate())), messageLocator.getMessage("reporting.pdf.enddatetime", df.format(evaluation.getDueDate())), messageLocator.getMessage("reporting.pdf.replyrate", new String[] { EvalUtils.makeResponseRateStringFromCounts(responsesCount, enrollmentsCount) }), bannerImageBytes, messageLocator.getMessage("reporting.pdf.defaultsystemname"), messageLocator.getMessage("reporting.pdf.informationTitle")); /** * set title and instructions * * Note this doesn't go far enough * commonLogic.makePlainTextFromHTML removes html tags * but it also leaves the text */ evalPDFReportBuilder.addIntroduction(evaluation.getTitle(), htmlContentParser(commonLogic.makePlainTextFromHTML(evaluation.getInstructions()))); // Reset question numbering displayNumber = 0; // 1 Make TIDL TemplateItemDataList tidl = responseAggregator.prepareTemplateItemDataStructure(evaluation.getId(), groupIds); // Loop through the major group types: Course Questions, Instructor Questions, etc. for (TemplateItemGroup tig : tidl.getTemplateItemGroups()) { if (!instructorViewAllResults // If the eval is so configured, && !commonLogic.isUserAdmin(currentUserId) // and currentUser is not an admin && !currentUserId.equals(evalOwner) // and currentUser is not the eval creator && !EvalConstants.ITEM_CATEGORY_COURSE.equals(tig.associateType) && !currentUserId.equals(commonLogic.getEvalUserById(tig.associateId).userId)) { // skip items that aren't for the current user continue; } if (!EvalConstants.ITEM_CATEGORY_COURSE.equals(tig.associateType) && !evaluateeId.equals(commonLogic.getEvalUserById(tig.associateId).userId)) { continue; } // Print the type of the next group we're doing if (EvalConstants.ITEM_CATEGORY_COURSE.equals(tig.associateType)) { evalPDFReportBuilder.addSectionHeader(messageLocator.getMessage("viewreport.itemlist.course"), false); } else if (EvalConstants.ITEM_CATEGORY_INSTRUCTOR.equals(tig.associateType)) { EvalUser user = commonLogic.getEvalUserById(tig.associateId); String instructorMsg = messageLocator.getMessage("reporting.spreadsheet.instructor", new Object[] { user.displayName }); evalPDFReportBuilder.addSectionHeader(instructorMsg, false); } else if (EvalConstants.ITEM_CATEGORY_ASSISTANT.equals(tig.associateType)) { EvalUser user = commonLogic.getEvalUserById(tig.associateId); String assistantMsg = messageLocator.getMessage("reporting.spreadsheet.ta", new Object[] { user.displayName }); evalPDFReportBuilder.addSectionHeader(assistantMsg, false); } else { evalPDFReportBuilder.addSectionHeader(messageLocator.getMessage("unknown.caps"), false); } for (HierarchyNodeGroup hng : tig.hierarchyNodeGroups) { // Render the Node title if it's enabled in the admin settings. if (hng.node != null) { // Showing the section title is system configurable via the administrate view Boolean showHierSectionTitle = (Boolean) evalSettings .get(EvalSettings.DISPLAY_HIERARCHY_HEADERS); if (showHierSectionTitle) { evalPDFReportBuilder.addSectionHeader(hng.node.title, true, 0); } } List<DataTemplateItem> dtis = hng.getDataTemplateItems(true); // include block children weightedMeansBlocks = this.getWeightedMeansBlocks(dtis); for (int i = 0; i < dtis.size(); i++) { DataTemplateItem dti = dtis.get(i); LOG.debug("Item text: " + dti.templateItem.getItem().getItemText()); if (!instructorViewAllResults // If the eval is so configured, && !commonLogic.isUserAdmin(currentUserId) // and currentUser is not an admin && !currentUserId.equals(evalOwner) // and currentUser is not the eval creator && !EvalConstants.ITEM_CATEGORY_COURSE.equals(dti.associateType) && !currentUserId.equals(commonLogic.getEvalUserById(dti.associateId).userId)) { //skip instructor items that aren't for the current user continue; } if (!EvalConstants.ITEM_CATEGORY_COURSE.equals(dti.associateType) && !evaluateeId.equals(commonLogic.getEvalUserById(dti.associateId).userId)) { continue; } renderDataTemplateItem(evalPDFReportBuilder, dti); } blockNumber = 0; weightedMeansBlocks.clear(); } } evalPDFReportBuilder.close(); }
From source file:org.sakaiproject.evaluation.tool.reporting.PDFReportExporter.java
public void buildReport(EvalEvaluation evaluation, String[] groupIds, String evaluateeId, OutputStream outputStream, boolean newReportStyle) { //Make sure responseAggregator is using this messageLocator responseAggregator.setMessageLocator(messageLocator); EvalPDFReportBuilder evalPDFReportBuilder = new EvalPDFReportBuilder(outputStream); Boolean instructorViewAllResults = (boolean) evaluation.getInstructorViewAllResults(); String currentUserId = commonLogic.getCurrentUserId(); String evalOwner = evaluation.getOwner(); boolean isCurrentUserAdmin = commonLogic.isUserAdmin(currentUserId); Boolean useBannerImage = (Boolean) evalSettings.get(EvalSettings.ENABLE_PDF_REPORT_BANNER); byte[] bannerImageBytes = null; if (useBannerImage != null && useBannerImage == true) { String bannerImageLocation = (String) evalSettings.get(EvalSettings.PDF_BANNER_IMAGE_LOCATION); if (bannerImageLocation != null) { bannerImageBytes = commonLogic.getFileContent(bannerImageLocation); }/*from w w w . j a va 2s .c o m*/ } //EvalUser user = commonLogic.getEvalUserById(commonLogic.getCurrentUserId()); DateFormat df = DateFormat.getDateInstance(DateFormat.LONG); evalPDFReportBuilder.addFooter(df.format(evaluation.getDueDate())); // calculate the response rate // int responsesCount = deliveryService.countResponses(evaluation.getId(), null, true); int responsesCount = evaluationService.countResponses(null, new Long[] { evaluation.getId() }, groupIds, null); int enrollmentsCount = evaluationService.countParticipantsForEval(evaluation.getId(), groupIds); String groupNames = responseAggregator.getCommaSeparatedGroupNames(groupIds); // Configurable system title String evalSystemTitle = messageLocator.getMessage("reporting.pdf.defaultsystemname", new Object[] { ServerConfigurationService.getString("ui.service", "Sakai") }); // Create the title page String startDate = messageLocator.getMessage("reporting.pdf.startdatetime", df.format(evaluation.getStartDate())); String endDate = messageLocator.getMessage("reporting.pdf.enddatetime", df.format(evaluation.getDueDate())); String responseInfo = messageLocator.getMessage("reporting.pdf.replyrate", new String[] { EvalUtils.makeResponseRateStringFromCounts(responsesCount, enrollmentsCount) }); String informationTitle = messageLocator.getMessage("reporting.pdf.informationTitle"); evalPDFReportBuilder.addTitlePage(evaluation.getTitle(), groupNames, startDate, endDate, responseInfo, bannerImageBytes, evalSystemTitle, informationTitle); /** * set title and instructions * * Note this doesn't go far enough * commonLogic.makePlainTextFromHTML removes html tags * but it also leaves the text */ evalPDFReportBuilder.addIntroduction(evaluation.getTitle(), htmlContentParser(commonLogic.makePlainTextFromHTML(evaluation.getInstructions()))); // Reset question numbering displayNumber = 0; // 1 Make TIDL TemplateItemDataList tidl = responseAggregator.prepareTemplateItemDataStructure(evaluation.getId(), groupIds); // Loop through the major group types: Course Questions, Instructor Questions, etc. for (TemplateItemGroup tig : tidl.getTemplateItemGroups()) { if (!instructorViewAllResults // If the eval is so configured, && !isCurrentUserAdmin // and currentUser is not an admin && !currentUserId.equals(evalOwner) // and currentUser is not the eval creator && !EvalConstants.ITEM_CATEGORY_COURSE.equals(tig.associateType) && !currentUserId.equals(commonLogic.getEvalUserById(tig.associateId).userId)) { // skip items that aren't for the current user continue; } // Print the type of the next group we're doing if (EvalConstants.ITEM_CATEGORY_COURSE.equals(tig.associateType)) { evalPDFReportBuilder.addSectionHeader(messageLocator.getMessage("viewreport.itemlist.course"), false); } else if (EvalConstants.ITEM_CATEGORY_INSTRUCTOR.equals(tig.associateType)) { EvalUser user = commonLogic.getEvalUserById(tig.associateId); String instructorMsg = messageLocator.getMessage("reporting.spreadsheet.instructor", new Object[] { user.displayName }); evalPDFReportBuilder.addSectionHeader(instructorMsg, false); } else if (EvalConstants.ITEM_CATEGORY_ASSISTANT.equals(tig.associateType)) { EvalUser user = commonLogic.getEvalUserById(tig.associateId); String assistantMsg = messageLocator.getMessage("reporting.spreadsheet.ta", new Object[] { user.displayName }); evalPDFReportBuilder.addSectionHeader(assistantMsg, false); } else { evalPDFReportBuilder.addSectionHeader(messageLocator.getMessage("unknown.caps"), false); } for (HierarchyNodeGroup hng : tig.hierarchyNodeGroups) { // Render the Node title if it's enabled in the admin settings. if (hng.node != null) { // Showing the section title is system configurable via the administrate view Boolean showHierSectionTitle = (Boolean) evalSettings .get(EvalSettings.DISPLAY_HIERARCHY_HEADERS); if (showHierSectionTitle) { evalPDFReportBuilder.addSectionHeader(hng.node.title, true, 0); } } List<DataTemplateItem> dtis = hng.getDataTemplateItems(true); // include block children weightedMeansBlocks = this.getWeightedMeansBlocks(dtis); for (int i = 0; i < dtis.size(); i++) { DataTemplateItem dti = dtis.get(i); LOG.debug("Item text: " + dti.templateItem.getItem().getItemText()); if (!instructorViewAllResults // If the eval is so configured, && !isCurrentUserAdmin // and currentUser is not an admin && !currentUserId.equals(evalOwner) // and currentUser is not the eval creator && !EvalConstants.ITEM_CATEGORY_COURSE.equals(dti.associateType) && !currentUserId.equals(commonLogic.getEvalUserById(dti.associateId).userId)) { //skip instructor items that aren't for the current user continue; } renderDataTemplateItem(evalPDFReportBuilder, dti); } blockNumber = 0; weightedMeansBlocks.clear(); } } evalPDFReportBuilder.close(); }