Package com.saperion.settings
Class SettingSearchInfo
- java.lang.Object
-
- com.saperion.settings.SettingSearchInfo
-
- All Implemented Interfaces:
java.io.Serializable
public final class SettingSearchInfo extends java.lang.Object implements java.io.Serializable
Defines how to search for a setting. Searching is possible for name, section or both. A search is possible for one setting-type (long/regular) at a time only. Name and section are not case-sensitive.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SettingSearchInfo.MatchKind
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SettingSearchInfo
create()
java.lang.String
getName()
SettingSearchInfo.MatchKind
getNameMatchkind()
java.lang.String
getSection()
SettingSearchInfo.MatchKind
getSectionMatchkind()
boolean
isLong()
boolean
isValid()
SettingSearchInfo
longSetting(boolean longSetting)
Whether to search for long or for regular settings.SettingSearchInfo
name(java.lang.String name, SettingSearchInfo.MatchKind matchKind)
Sets the name to search for and the match kind to search with.SettingSearchInfo
section(java.lang.String section, SettingSearchInfo.MatchKind matchKind)
Sets the section to search for and the match kind to search with.java.lang.String
toString()
-
-
-
Method Detail
-
create
public static SettingSearchInfo create()
- Returns:
- new empty
SettingSearchInfo
-
name
public SettingSearchInfo name(java.lang.String name, SettingSearchInfo.MatchKind matchKind)
Sets the name to search for and the match kind to search with.- Parameters:
name
- name to search formatchKind
- match-kind for the given setting name- Returns:
- current
SettingSearchInfo
instance
-
section
public SettingSearchInfo section(java.lang.String section, SettingSearchInfo.MatchKind matchKind)
Sets the section to search for and the match kind to search with.- Parameters:
section
- section to search formatchKind
- match-kind for the given section name- Returns:
- current
SettingSearchInfo
instance
-
longSetting
public SettingSearchInfo longSetting(boolean longSetting)
Whether to search for long or for regular settings. Default is false (regular setting).- Parameters:
longSetting
- if true, search will be performed to long settings- Returns:
- current
SettingSearchInfo
instance
-
getName
public java.lang.String getName()
- Returns:
- the name to search for
-
getNameMatchkind
public SettingSearchInfo.MatchKind getNameMatchkind()
- Returns:
- the match-kind for name matching.
-
getSection
public java.lang.String getSection()
- Returns:
- the section to search for
-
getSectionMatchkind
public SettingSearchInfo.MatchKind getSectionMatchkind()
- Returns:
- the match-kind for section matching.
-
isLong
public boolean isLong()
- Returns:
- whether to search for long or regular settings
-
isValid
public boolean isValid()
- Returns:
- true if this is a valid
SettingSearchInfo
, which means that either name or section contain a value that is not null or empty.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-