Package org.pac4j.core.profile

Examples of org.pac4j.core.profile.FormattedDate


    @Override
    public FormattedDate read(final ByteBuffer buffer) {
        final Long time = this.longSerializer.readObject(buffer, Long.class);
        final String format = this.stringSerializer.readObject(buffer, String.class);
        final Locale locale = this.localeSerializer.readObject(buffer, Locale.class);
        return new FormattedDate(new Date(time), format, locale);
    }
View Full Code Here


    public void testNotAString() {
        assertNull(this.converter.convert(1));
    }
   
    public void testDate() {
        final FormattedDate d = this.converter.convert(DATE);
        assertEquals(DATE, d.toString());
    }
View Full Code Here

   
    @Override
    public FormattedDate convert(final Object attribute) {
        final Object result = super.convert(attribute);
        if (result != null && result instanceof Date) {
            return new FormattedDate((Date) result, this.format, this.locale);
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.pac4j.core.profile.FormattedDate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.