Package hudson.plugins.favorite.user
Class FavoriteUserProperty
- java.lang.Object
-
- hudson.model.UserProperty
-
- hudson.plugins.favorite.user.FavoriteUserProperty
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<UserProperty>
,ReconfigurableDescribable<UserProperty>
@ExportedBean(defaultVisibility=999) public class FavoriteUserProperty extends UserProperty
Do not use directly. Instead @InjectFavorites
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static UserPropertyDescriptor
DESCRIPTOR
-
Fields inherited from class hudson.model.UserProperty
user
-
-
Constructor Summary
Constructors Constructor Description FavoriteUserProperty()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addFavorite(String job)
Set<String>
getAllFavorites()
UserPropertyDescriptor
getDescriptor()
List<String>
getFavorites()
Deprecated.boolean
hasFavorite(String job)
Checks if the user has a favorite entry for this job e.g.boolean
isJobFavorite(String job)
UserProperty
reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form)
void
removeFavorite(String job)
boolean
toggleFavorite(String job)
-
Methods inherited from class hudson.model.UserProperty
all, setUser
-
-
-
-
Field Detail
-
DESCRIPTOR
@Extension public static final UserPropertyDescriptor DESCRIPTOR
-
-
Method Detail
-
getFavorites
@Deprecated public List<String> getFavorites()
Deprecated.Use {#getAllFavorites()}- Returns:
- favorites
-
addFavorite
public void addFavorite(String job) throws IOException
- Throws:
IOException
-
removeFavorite
public void removeFavorite(String job) throws IOException
- Throws:
IOException
-
toggleFavorite
public boolean toggleFavorite(String job) throws IOException
- Throws:
IOException
-
reconfigure
public UserProperty reconfigure(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form) throws Descriptor.FormException
- Specified by:
reconfigure
in interfaceReconfigurableDescribable<UserProperty>
- Overrides:
reconfigure
in classUserProperty
- Throws:
Descriptor.FormException
-
isJobFavorite
public boolean isJobFavorite(String job)
-
hasFavorite
public boolean hasFavorite(String job)
Checks if the user has a favorite entry for this job e.g. this is true when the user has favoriteted or unfavoriteted a job but not true for when a job has not been favorited by this user- Parameters:
job
- path- Returns:
- favorite
-
getDescriptor
public UserPropertyDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<UserProperty>
- Overrides:
getDescriptor
in classUserProperty
-
-