[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags ...
Christian Bauer
christian at hibernate.org
Sat Dec 29 21:33:28 EST 2007
User: cbauer
Date: 07/12/29 21:33:28
Added: examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags
TagsPreferences.java TagsPreferencesSupport.java
Log:
Complete overhaul of the preferences system
Revision Changes Path
1.1 date: 2007/12/30 02:33:28; author: cbauer; state: Exp;jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsPreferences.java
Index: TagsPreferences.java
===================================================================
/*
* JBoss, Home of Professional Open Source
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.seam.wiki.plugin.tags;
import org.hibernate.validator.NotNull;
import org.jboss.seam.wiki.preferences.annotations.Preferences;
import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
import org.jboss.seam.wiki.preferences.PreferenceVisibility;
/**
* @author Christian Bauer
*/
@Preferences(name = "Tags", description = "#{messages['tags.preferences.Name']}")
public class TagsPreferences {
@PreferenceProperty(
description = "#{messages['tags.preferences.LinkToCurrentDocument']}",
visibility = {PreferenceVisibility.SYSTEM, PreferenceVisibility.INSTANCE}
)
@NotNull
private Boolean linkToCurrentDocument;
public Boolean getLinkToCurrentDocument() {
return linkToCurrentDocument;
}
}
1.1 date: 2007/12/30 02:33:28; author: cbauer; state: Exp;jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/plugin/tags/TagsPreferencesSupport.java
Index: TagsPreferencesSupport.java
===================================================================
/*
* JBoss, Home of Professional Open Source
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.seam.wiki.plugin.tags;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.wiki.preferences.metamodel.PreferenceEntity;
import org.jboss.seam.wiki.preferences.metamodel.PreferencesSupport;
import java.util.Set;
import java.util.HashSet;
/**
* @author Christian Bauer
*/
@Name("tagsPreferencesSupport")
public class TagsPreferencesSupport extends PreferencesSupport {
public Set<PreferenceEntity> getPreferenceEntities() {
return new HashSet<PreferenceEntity>() {{
add( createPreferenceEntity(TagsPreferences.class) );
}};
}
}
More information about the jboss-cvs-commits
mailing list