|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.spray.terminal.profile.DefaultProfile
public class DefaultProfile
A default implementation of profile.
| Constructor Summary | |
|---|---|
DefaultProfile(String name,
Profile... profiles)
Constructs a named profile with defaults. |
|
| Method Summary | |
|---|---|
void |
addContentTypes(Collection<MimeType> types)
Adds more content types to this profile. |
void |
addHostPatterns(Collection<Pattern> patterns)
Adds more host patterns. |
void |
addUserAgentPatterns(Collection<Pattern> patterns)
Adds more user agent patterns. |
void |
clearContentTypes()
Clears content types of this profile.. |
void |
clearHostPatterns()
Clears all host patterns. |
void |
clearUserAgentPatterns()
Clears all user agent patterns. |
List<MimeType> |
getContentTypes()
Gets content types of this profile. |
Integer |
getHeight()
Gets the height in pixels. |
List<Pattern> |
getHostPatterns()
Gets host patterns. |
String |
getName()
Gets the name. |
Boolean |
getScriptable()
Gets whether scriptable. |
List<Pattern> |
getUserAgentPatterns()
Gets user agent patterns. |
Integer |
getWidth()
Gets the width in pixels. |
boolean |
matchHost(String host)
Matches the given host against this profile. |
boolean |
matchUserAgent(String agent)
Matches the given user agent against this profile. |
boolean |
mergeContentTypes(Collection<List<MimeType>> mimes)
Merges content types of this profile and its defaults. |
void |
removeContentType(MimeType type)
Removes a content type from this profile. |
void |
removeHostPattern(Pattern pattern)
Removes a host pattern. |
void |
removeUserAgentPattern(Pattern pattern)
Removes a user agent pattern. |
void |
setContentTypes(List<MimeType> types)
Sets content types of this profile. |
void |
setHeight(Integer h)
Sets the height in pixels. |
void |
setHostPatterns(List<Pattern> patterns)
Sets host patterns. |
void |
setScriptable(Boolean state)
Sets whether scriptable. |
void |
setUserAgentPatterns(List<Pattern> patterns)
Sets user agent patterns. |
void |
setWidth(Integer w)
Sets the width.in pixels |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultProfile(String name,
Profile... profiles)
name - the name of the profile.profiles - the default profiles.
NullPointerException - for a null name.| Method Detail |
|---|
public String getName()
Profile
getName in interface Profilepublic Boolean getScriptable()
Profile
getScriptable in interface Profilepublic void setScriptable(Boolean state)
Profile
setScriptable in interface Profilestate - the scriptable state.public Integer getWidth()
Profile
getWidth in interface Profilepublic void setWidth(Integer w)
Profile
setWidth in interface Profilew - the width.public Integer getHeight()
Profile
getHeight in interface Profilepublic void setHeight(Integer h)
Profile
setHeight in interface Profileh - the height.public List<MimeType> getContentTypes()
Profile
getContentTypes in interface Profilepublic void setContentTypes(List<MimeType> types)
Profile
setContentTypes in interface Profiletypes - a set of content types.public void addContentTypes(Collection<MimeType> types)
Profile
addContentTypes in interface Profiletypes - a collection of content types.public void removeContentType(MimeType type)
Profile
removeContentType in interface Profiletype - a comma separated value of content types.public void clearContentTypes()
Profile
clearContentTypes in interface Profilepublic boolean mergeContentTypes(Collection<List<MimeType>> mimes)
Profile
mergeContentTypes in interface Profilemimes - the result collection.
public List<Pattern> getUserAgentPatterns()
Profile
getUserAgentPatterns in interface Profilepublic void setUserAgentPatterns(List<Pattern> patterns)
Profile
setUserAgentPatterns in interface Profilepatterns - a set of patterns.public void addUserAgentPatterns(Collection<Pattern> patterns)
Profile
addUserAgentPatterns in interface Profilepatterns - a collection of patterns.public void removeUserAgentPattern(Pattern pattern)
Profile
removeUserAgentPattern in interface Profilepattern - a user agent pattern.public void clearUserAgentPatterns()
Profile
clearUserAgentPatterns in interface Profilepublic boolean matchUserAgent(String agent)
Profile
matchUserAgent in interface Profileagent - the user agent.
public List<Pattern> getHostPatterns()
Profile
getHostPatterns in interface Profilepublic void setHostPatterns(List<Pattern> patterns)
Profile
setHostPatterns in interface Profilepatterns - a set of patterns.public void addHostPatterns(Collection<Pattern> patterns)
Profile
addHostPatterns in interface Profilepatterns - a collection of patterns.public void removeHostPattern(Pattern pattern)
Profile
removeHostPattern in interface Profilepattern - a host pattern.public void clearHostPatterns()
Profile
clearHostPatterns in interface Profilepublic boolean matchHost(String host)
Profile
matchHost in interface Profilehost - the host name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||