/** * Add the information from the document to the Velocity context. * * @param context the velocity context. * @param decorationModel the Doxia decoration model. * @param doc the document. * @param createDate the create date. */ private void addInfoFromDocument(VelocityContext context, DecorationModel decorationModel, Document doc, Date createDate) { context.put("authors", getAuthors(doc)); String title = ""; if (decorationModel.getName() != null) { title = decorationModel.getName(); } else if (project.getName() != null) { title = project.getName(); } if (title.length() > 0) { title += " - "; } title += getTitle(doc); context.put("title", title); context.put("headContent", getHeadContent(doc)); context.put("bodyContent", getBodyContent(doc)); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); if (createDate != null) { context.put("dateCreation", sdf.format(createDate)); } }
buf.append( getName() ); buf.append( "'" ); buf.append( "\n" );
boolean result = true; result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) ); result = result && ( getBannerLeft() == null ? that.getBannerLeft() == null : getBannerLeft().equals( that.getBannerLeft() ) ); result = result && ( getBannerRight() == null ? that.getBannerRight() == null : getBannerRight().equals( that.getBannerRight() ) );