Class ContentMappings
- java.lang.Object
-
- hudson.model.ManagementLink
-
- com.cloudbees.jenkins.support.filter.ContentMappings
-
- All Implemented Interfaces:
ExtensionPoint
,Action
,ModelObject
,Saveable
,Iterable<ContentMapping>
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class ContentMappings extends ManagementLink implements Saveable, Iterable<ContentMapping>
Holds all anonymized content mappings and provides a management view to see those mappings.- Since:
- TODO
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.model.ManagementLink
ManagementLink.Category
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.ManagementLink
LIST
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
clear()
void
forEach(Consumer<? super ContentMapping> action)
static ContentMappings
get()
ManagementLink.Category
getCategory()
String
getDescription()
String
getDisplayName()
String
getIconFileName()
ContentMapping
getMappingOrCreate(String original, Function<String,ContentMapping> generator)
Looks up or creates a new ContentMapping for the given original string and a ContentMapping generator.Map<String,String>
getMappings()
Set<String>
getStopWords()
String
getUrlName()
Iterator<ContentMapping>
iterator()
static ContentMappings
newInstance()
Constructs a new ContentMappings using an existing config file or default settings if not found.void
reload()
void
save()
Spliterator<ContentMapping>
spliterator()
-
Methods inherited from class hudson.model.ManagementLink
all, getCategoryName, getRequiredPermission, getRequiresConfirmation, getRequiresPOST
-
-
-
-
Method Detail
-
get
public static ContentMappings get()
- Returns:
- the singleton instance
-
newInstance
@Extension public static ContentMappings newInstance() throws IOException
Constructs a new ContentMappings using an existing config file or default settings if not found.- Throws:
IOException
-
getStopWords
@NonNull public Set<String> getStopWords()
- Returns:
- the set of stop words to ignore when filtering
-
getMappings
@NonNull public Map<String,String> getMappings()
- Returns:
- the map of original to replacement values known to this instance
-
getMappingOrCreate
@NonNull public ContentMapping getMappingOrCreate(@NonNull String original, @NonNull Function<String,ContentMapping> generator)
Looks up or creates a new ContentMapping for the given original string and a ContentMapping generator.
-
reload
public void reload()
-
clear
protected void clear()
-
save
public void save() throws IOException
- Specified by:
save
in interfaceSaveable
- Throws:
IOException
-
iterator
public Iterator<ContentMapping> iterator()
- Specified by:
iterator
in interfaceIterable<ContentMapping>
-
forEach
public void forEach(Consumer<? super ContentMapping> action)
- Specified by:
forEach
in interfaceIterable<ContentMapping>
-
spliterator
public Spliterator<ContentMapping> spliterator()
- Specified by:
spliterator
in interfaceIterable<ContentMapping>
-
getIconFileName
@NonNull public String getIconFileName()
- Specified by:
getIconFileName
in interfaceAction
- Specified by:
getIconFileName
in classManagementLink
-
getDisplayName
@NonNull public String getDisplayName()
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getDescription
public String getDescription()
- Overrides:
getDescription
in classManagementLink
-
getUrlName
@NonNull public String getUrlName()
- Specified by:
getUrlName
in interfaceAction
- Specified by:
getUrlName
in classManagementLink
-
getCategory
@NonNull public ManagementLink.Category getCategory()
- Overrides:
getCategory
in classManagementLink
-
-