public final class DataGroups extends HTTPParameter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATA_GROUP_ALL
If present in a request, all available content should be returned in the response
|
static java.lang.String |
DATA_GROUP_BASIC
If present in a request, the basic should be returned in the response.
|
static java.lang.String |
DATA_GROUP_DEFAULTS
If present in a request, the default content should be returned in the response.
|
static java.lang.String |
PARAMETER_DEFAULT_NAME
the default HTTP parameter name
|
Constructor and Description |
---|
DataGroups()
required for serialization
|
DataGroups(DataGroups dataGroups)
Create a new copy based on the given dataGroup, this will create a deep copy of the given object.
|
DataGroups(java.lang.String... dataGroups)
varargs constructor for data groups
|
Modifier and Type | Method and Description |
---|---|
void |
addDataGroup(java.lang.String dataGroup)
Add datagroup to the default, non-typed datagroup list
|
void |
addDataGroup(java.lang.String dataGroup,
java.lang.String type)
Add the given dataGroup for the given type
|
java.lang.String |
getValue() |
static boolean |
hasDataGroup(java.lang.String dataGroup,
DataGroups dataGroups) |
static boolean |
hasDataGroup(java.lang.String dataGroup,
DataGroups dataGroups,
java.lang.String type) |
boolean |
hasValues() |
void |
initialize(java.util.List<java.lang.String> parameterValues)
Initialize this parameter based on the given parameter values
|
void |
initialize(java.lang.String parameterValue)
Initialize this parameter based on the given parameter value
|
static boolean |
isEmpty(DataGroups dataGroups) |
boolean |
removeDataGroup(java.lang.String dataGroup)
Remove the data group from the default type
|
boolean |
removeDataGroup(java.lang.String dataGroup,
java.lang.String type)
Remove data group from the given type
|
java.lang.String |
toDataGroupString() |
getParameterName, initialize, initializeRaw, initializeRaw, setParameterName
public static final java.lang.String DATA_GROUP_ALL
public static final java.lang.String DATA_GROUP_BASIC
public static final java.lang.String DATA_GROUP_DEFAULTS
public static final java.lang.String PARAMETER_DEFAULT_NAME
public DataGroups(java.lang.String... dataGroups)
dataGroups
- public DataGroups()
public DataGroups(DataGroups dataGroups)
dataGroups
- not-nullpublic void initialize(java.util.List<java.lang.String> parameterValues) throws java.lang.IllegalArgumentException
HTTPParameter
initialize
in class HTTPParameter
parameterValues
- can NOT be nulljava.lang.IllegalArgumentException
- on bad input datapublic void initialize(java.lang.String parameterValue) throws java.lang.IllegalArgumentException
HTTPParameter
initialize
in class HTTPParameter
parameterValue
- can be nulljava.lang.IllegalArgumentException
- on bad input datapublic boolean hasValues()
hasValues
in class HTTPParameter
public static boolean hasDataGroup(java.lang.String dataGroup, DataGroups dataGroups)
dataGroup
- dataGroups
- can be nullpublic static boolean hasDataGroup(java.lang.String dataGroup, DataGroups dataGroups, java.lang.String type)
dataGroup
- dataGroups
- can be nulltype
- public boolean removeDataGroup(java.lang.String dataGroup)
dataGroup
- public boolean removeDataGroup(java.lang.String dataGroup, java.lang.String type)
dataGroup
- type
- public void addDataGroup(java.lang.String dataGroup)
dataGroup
- public void addDataGroup(java.lang.String dataGroup, java.lang.String type)
dataGroup
- type
- public static boolean isEmpty(DataGroups dataGroups)
dataGroups
- public java.lang.String toDataGroupString()
public java.lang.String getValue()
getValue
in class HTTPParameter
Copyright © 2015 Tampere University of Technology, Pori Department.