/** * Method toString. * * @return String */ public java.lang.String toString() { StringBuilder buf = new StringBuilder( 128 ); buf.append( "position = '" ); buf.append( getPosition() ); buf.append( "'" ); buf.append( "\n" ); buf.append( "format = '" ); buf.append( getFormat() ); buf.append( "'" ); return buf.toString(); } //-- java.lang.String toString()
/** * Method equals. * * @param other * @return boolean */ public boolean equals( Object other ) { if ( this == other ) { return true; } if ( !( other instanceof PublishDate ) ) { return false; } PublishDate that = (PublishDate) other; boolean result = true; result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) ); result = result && ( getFormat() == null ? that.getFormat() == null : getFormat().equals( that.getFormat() ) ); return result; } //-- boolean equals( Object )
/** * Method writePublishDate. * * @param publishDate * @param serializer * @param tagName * @throws java.io.IOException */ private void writePublishDate( PublishDate publishDate, String tagName, XmlSerializer serializer ) throws java.io.IOException { serializer.startTag( NAMESPACE, tagName ); if ( ( publishDate.getPosition() != null ) && !publishDate.getPosition().equals( "left" ) ) { serializer.attribute( NAMESPACE, "position", publishDate.getPosition() ); } if ( ( publishDate.getFormat() != null ) && !publishDate.getFormat().equals( "yyyy-MM-dd" ) ) { serializer.attribute( NAMESPACE, "format", publishDate.getFormat() ); } serializer.endTag( NAMESPACE, tagName ); } //-- void writePublishDate( PublishDate, String, XmlSerializer )
DateFormat dateFormat = new SimpleDateFormat( publishDate.getFormat(), locale ); context.put( "dateFormat", dateFormat );
String dateFormat = siteRenderingContext.getDecoration().getPublishDate().getFormat();