FeedTeasersPreferences.java :  » JBoss » jboss-seam-2.2.0 » org » jboss » seam » wiki » plugin » feed » Java Open Source

Java Open Source » JBoss » jboss seam 2.2.0 
jboss seam 2.2.0 » org » jboss » seam » wiki » plugin » feed » FeedTeasersPreferences.java
package org.jboss.seam.wiki.plugin.feed;

import org.hibernate.validator.NotNull;
import org.hibernate.validator.Range;
import org.hibernate.validator.Length;
import org.jboss.seam.wiki.preferences.annotations.Preferences;
import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
import org.jboss.seam.wiki.preferences.PreferenceVisibility;

import java.io.Serializable;

@Preferences(
    name = "FeedTeasers",
    description = "#{messages['feed.teasers.preferences.description']}",
    mappedTo = "feed.teasers"
)
public class FeedTeasersPreferences implements Serializable {

    @PreferenceProperty(
        description = "#{messages['feed.teasers.preferences.property.Title']}",
        visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
        editorIncludeName = "AdaptiveTextInput"
    )
    @Length(min = 0, max = 255)
    @NotNull
    private String title;

    @PreferenceProperty(
        description = "#{messages['feed.teasers.preferences.property.feed']}",
        visibility = {PreferenceVisibility.INSTANCE},
        editorIncludeName = "SelectOne",
        templateComponentName = "feedTeasersFeedPreferenceValueTemplate"
    )
    private Long feed;

    @PreferenceProperty(
        description = "#{messages['feed.teasers.preferences.property.numberOfTeasers']}",
        visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
        editorIncludeName = "NumberRange"
    )
    @Range(min = 3l, max = 25l)
    @NotNull
    private Long numberOfTeasers;

    @PreferenceProperty(
        description = "#{messages['feed.teasers.preferences.property.truncateDescription']}",
        visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE},
        editorIncludeName = "NumberRange"
    )
    @Range(min = 10l, max = 5000l)
    @NotNull
    private Long truncateDescription;

    @PreferenceProperty(
        description = "#{messages['feed.teasers.preferences.property.showAuthor']}",
        visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE}
    )
    @NotNull
    private Boolean showAuthor;

    public String getTitle() {
        return title;
    }

    public Long getFeed() {
        return feed;
    }

    public Long getNumberOfTeasers() {
        return numberOfTeasers;
    }

    public Long getTruncateDescription() {
        return truncateDescription;
    }

    public Boolean getShowAuthor() {
        return showAuthor;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.