public class ChannelFinderClientComp extends Object implements ChannelFinderClient
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close
|
void |
delete(Collection<Channel.Builder> channels)
Delete the set of channels identified by channels
|
void |
delete(Property.Builder property,
Collection<String> channelNames)
Remove the property property from the set of channels
channelNames
|
void |
delete(Property.Builder property,
String channelName)
Remove property property from the channel with name
channelName
|
void |
delete(Tag.Builder tag,
Collection<String> channelNames)
Remove the tag tag from all the channels channelNames
|
void |
delete(Tag.Builder tag,
String channelName)
Delete tag tag from the channel with the name
channelName
|
void |
deleteChannel(String channelName)
Delete the channel identified by channel
|
void |
deleteProperty(String propertyName)
Completely Delete property with name = propertyName from all channels and
the channelfinder service.
|
void |
deleteTag(String tagName)
Completely Delete {tag} with name = tagName from all channels and the
channelfinder service.
|
Collection<Channel> |
find(Map<String,String> map)
Query for channels based on the multiple criteria specified in the map.
|
Collection<Channel> |
find(javax.ws.rs.core.MultivaluedMap<String,String> map)
uery for channels based on the multiple criteria specified in the map.
|
Collection<Channel> |
find(String query)
Space seperated search criterias, patterns may include * and ? wildcards
channelNamePattern propertyName=valuePattern1,valuePattern2
Tags=tagNamePattern Each criteria is logically ANDed, || seperated values
are logically ORed
Query for channels based on the Query string query example:
find("SR* Cell=1,2 Tags=GolderOrbit,myTag)
this will return all channels with names starting with SR AND have property Cell=1 OR 2 AND have tags goldenOrbit AND myTag. IMP: each criteria is logically AND'ed while multiple values for Properties are OR'ed. |
Collection<Channel> |
findByName(String pattern)
Search for channels who's name match the pattern pattern.
The pattern can contain wildcard char * or ?. |
Collection<Channel> |
findByProperty(String property,
String... pattern)
Search for channels with properties who's Value match the pattern
pattern.
The pattern can contain wildcard char * or ?. |
Collection<Channel> |
findByTag(String pattern)
Search for channels with tags who's name match the pattern
pattern.
The pattern can contain wildcard char * or ?. |
Collection<String> |
getAllProperties()
Get a list of names of all the properties currently present on the
channelfinder service.
|
Collection<String> |
getAllTags()
Get a list of names of all the tags currently present on the
channelfinder service.
|
Channel |
getChannel(String channelName)
Returns a channel that exactly matches the channelName
channelName.
|
static ChannelFinderClientComp |
getInstance() |
void |
set(Channel.Builder channel)
Destructively set a single channel channel, if the channel
already exists it will be replaced with the given channel.
|
void |
set(Collection<Channel.Builder> channels)
Destructively set a set of channels, if any channels already exists it is
replaced.
|
void |
set(Property.Builder property)
Destructively set a new property property.
|
void |
set(Property.Builder property,
Collection<String> channelNames)
Destructively set property prop and add it to the channels
channelNames removing it from all other channels.
|
void |
set(Property.Builder prop,
Map<String,String> channelPropertyMap)
Destructively set the property prop and add it to the channels
specified in the channelPropertyMap, where the map key is the
channel name and the associated value is the property value to be used
for that channel.
|
void |
set(Property.Builder property,
String channelName)
Destructively set property prop and add it to the channel
channelName and remove it from all others.
|
void |
set(Tag.Builder tag)
Destructively set a Tag tag with no associated channels to the
database.
|
void |
set(Tag.Builder tag,
Collection<String> channelNames)
Set tag tag on the set of channels {channels} and remove it from
all others.
|
void |
set(Tag.Builder tag,
String channelName)
Destructively set tag tag to channel channelName and
remove the tag from all other channels.
|
void |
setReader(ChannelFinderClient reader) |
void |
setWriter(ChannelFinderClient writer) |
void |
update(Channel.Builder channel)
Update existing channel with channel.
|
void |
update(Property.Builder property,
Collection<String> channelNames)
Update the channels identified with channelNames with the
property property
|
void |
update(Property.Builder property,
Map<String,String> channelPropValueMap)
Update the property property on all channels specified in the
channelPropValueMap, where the key in the map is the channel name and the
value is the value for that property
|
void |
update(Property.Builder property,
String channelName)
Update Property property by adding it to the channel
channelName, without affecting the other channels.
|
void |
update(Tag.Builder tag,
Collection<String> channelNames)
Update the Tag tag by adding it to the set of the channels with
names channelNames, without affecting the other instances of
this tag.
|
void |
update(Tag.Builder tag,
String channelName)
Update Tag tag by adding it to Channel with name
channelName, without affecting the other instances of this tag.
|
public static ChannelFinderClientComp getInstance()
public void setReader(ChannelFinderClient reader)
public void setWriter(ChannelFinderClient writer)
public Collection<String> getAllProperties()
ChannelFinderClientgetAllProperties in interface ChannelFinderClientPropertys.public Collection<String> getAllTags()
ChannelFinderClientgetAllTags in interface ChannelFinderClientTags.public Channel getChannel(String channelName) throws ChannelFinderException
ChannelFinderClientgetChannel in interface ChannelFinderClientchannelName - - name of the required channel.Channel with name channelName or nullChannelFinderExceptionpublic Collection<Channel> findByName(String pattern) throws ChannelFinderException
ChannelFinderClientfindByName in interface ChannelFinderClientpattern - - the search pattern for the channel namesChannelFinderExceptionpublic Collection<Channel> findByTag(String pattern) throws ChannelFinderException
ChannelFinderClientfindByTag in interface ChannelFinderClientpattern - - the search pattern for the tag namesChannelFinderExceptionpublic Collection<Channel> findByProperty(String property, String... pattern) throws ChannelFinderException
ChannelFinderClientfindByProperty in interface ChannelFinderClientproperty - - the name of the property.pattern - - the seatch pattern for the property value.ChannelFinderExceptionpublic Collection<Channel> find(String query) throws ChannelFinderException
ChannelFinderClientfind in interface ChannelFinderClientChannelFinderExceptionpublic Collection<Channel> find(Map<String,String> map) throws ChannelFinderException
ChannelFinderClientfind in interface ChannelFinderClientChannelFinderExceptionpublic Collection<Channel> find(javax.ws.rs.core.MultivaluedMap<String,String> map) throws ChannelFinderException
ChannelFinderClientfind in interface ChannelFinderClientmap - - multivalued map of all search criteriaChannelFinderExceptionpublic void set(Channel.Builder channel) throws ChannelFinderException
ChannelFinderClientset in interface ChannelFinderClientchannel - the channel to be addedChannelFinderExceptionpublic void set(Tag.Builder tag)
ChannelFinderClientset in interface ChannelFinderClienttag - - the tag to be set.public void set(Property.Builder property) throws ChannelFinderException
ChannelFinderClientset in interface ChannelFinderClientproperty - - the property to be set.ChannelFinderExceptionpublic void set(Collection<Channel.Builder> channels) throws ChannelFinderException
ChannelFinderClientset in interface ChannelFinderClientchannels - set of channels to be addedChannelFinderExceptionpublic void set(Tag.Builder tag, String channelName) throws ChannelFinderException
ChannelFinderClientset in interface ChannelFinderClienttag - - the tag to be set.channelName - - the channel to which the tag should be set on.ChannelFinderExceptionpublic void set(Property.Builder property, String channelName)
ChannelFinderClientset in interface ChannelFinderClientproperty - - property to be set.channelName - - the channel to which this property must be added.public void set(Tag.Builder tag, Collection<String> channelNames) throws ChannelFinderException
ChannelFinderClientset in interface ChannelFinderClienttag - - the tag to be set.channelNames - - the list of channels to which this tag will be added and
removed from all others.ChannelFinderExceptionpublic void set(Property.Builder property, Collection<String> channelNames)
ChannelFinderClientset in interface ChannelFinderClientproperty - - the property to be set.channelNames - - the channels to which this property should be added and
removed from all others.public void set(Property.Builder prop, Map<String,String> channelPropertyMap)
ChannelFinderClientset in interface ChannelFinderClientprop - - the property to be set.channelPropertyMap - - map with channel names and property valuespublic void update(Channel.Builder channel) throws ChannelFinderException
ChannelFinderClientupdate in interface ChannelFinderClientChannelFinderExceptionpublic void update(Tag.Builder tag, String channelName) throws ChannelFinderException
ChannelFinderClientupdate in interface ChannelFinderClienttag - the tag to be addedchannelName - Name of the channel to which the tag is to be addedChannelFinderExceptionpublic void update(Property.Builder property, String channelName) throws ChannelFinderException
ChannelFinderClientupdate in interface ChannelFinderClientproperty - - the property to be updatedchannelName - - the channel to which this property should be added or
updated.ChannelFinderExceptionpublic void update(Tag.Builder tag, Collection<String> channelNames) throws ChannelFinderException
ChannelFinderClientupdate in interface ChannelFinderClienttag - - the tag that needs to be updated.channelNames - - list of channels to which this tag should be added.ChannelFinderExceptionpublic void update(Property.Builder property, Collection<String> channelNames) throws ChannelFinderException
ChannelFinderClientupdate in interface ChannelFinderClientChannelFinderExceptionpublic void update(Property.Builder property, Map<String,String> channelPropValueMap) throws ChannelFinderException
ChannelFinderClientupdate in interface ChannelFinderClientChannelFinderExceptionpublic void deleteTag(String tagName) throws ChannelFinderException
ChannelFinderClientdeleteTag in interface ChannelFinderClienttagName - - name of tag to be deleted.ChannelFinderExceptionpublic void deleteProperty(String propertyName) throws ChannelFinderException
ChannelFinderClientdeleteProperty in interface ChannelFinderClientpropertyName - - name of property to be deleted.ChannelFinderExceptionpublic void deleteChannel(String channelName) throws ChannelFinderException
ChannelFinderClientdeleteChannel in interface ChannelFinderClientchannelName - channel to be removedChannelFinderExceptionpublic void delete(Collection<Channel.Builder> channels) throws ChannelFinderException
ChannelFinderClientdelete in interface ChannelFinderClientChannelFinderExceptionpublic void delete(Tag.Builder tag, String channelName) throws ChannelFinderException
ChannelFinderClientdelete in interface ChannelFinderClienttag - - the tag to be deleted.channelName - - the channel from which to delete the tag tagChannelFinderExceptionpublic void delete(Property.Builder property, String channelName) throws ChannelFinderException
ChannelFinderClientdelete in interface ChannelFinderClientproperty - - the property to be deleted.channelName - - the channel from which to delete the property
propertyChannelFinderExceptionpublic void delete(Tag.Builder tag, Collection<String> channelNames) throws ChannelFinderException
ChannelFinderClientdelete in interface ChannelFinderClienttag - - the tag to be deleted.channelNames - - the channels from which to delete the tag tagChannelFinderExceptionpublic void delete(Property.Builder property, Collection<String> channelNames)
ChannelFinderClientdelete in interface ChannelFinderClientproperty - - the property to be deleted.channelNames - - the channels from which to delete the property
propertypublic void close()
ChannelFinderClientclose in interface ChannelFinderClientCopyright © 2012. All Rights Reserved.