Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package de.hshannover.f4.trust.ifmapj.messages;
  
  /*
   * #%L
   * =====================================================
   *   _____                _     ____  _   _       _   _
   *  |_   _|_ __ _   _ ___| |_  / __ \| | | | ___ | | | |
   *    | | | '__| | | / __| __|/ / _` | |_| |/ __|| |_| |
   *    | | | |  | |_| \__ \ |_| | (_| |  _  |\__ \|  _  |
  *    |_| |_|   \__,_|___/\__|\ \__,_|_| |_||___/|_| |_|
  *                             \____/
  * 
  * =====================================================
  * 
  * Hochschule Hannover
  * (University of Applied Sciences and Arts, Hannover)
  * Faculty IV, Dept. of Computer Science
  * Ricklinger Stadtweg 118, 30459 Hannover, Germany
  * 
  * Email: trust@f4-i.fh-hannover.de
  * Website: http://trust.f4.hs-hannover.de
  * 
  * This file is part of IfmapJ, version 1.0.0, implemented by the Trust@HsH
  * research group at the Hochschule Hannover.
  * 
  * IfmapJ is a lightweight, platform-independent, easy-to-use IF-MAP client
  * library for Java. IF-MAP is an XML based protocol for sharing data across
  * arbitrary components, specified by the Trusted Computing Group. IfmapJ is
  * maintained by the Trust@HsH group at the Hochschule Hannover. IfmapJ
  * was developed within the ESUKOM research project.
  * %%
  * Copyright (C) 2010 - 2013 Trust@HsH
  * %%
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  * 
  *      http://www.apache.org/licenses/LICENSE-2.0
  * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * #L%
  */
 
 import java.util.List;
 
 
Factory in order to create any IF-MAP request message.
For PublishUpdate: If no lifetime is given, it's session.
For PublishDelete: If no filter string is given, it is left out --> match all
For Search/Subscribe: Setting same parameters to NULL leaves those parameters out.

Deprecated:
Use Requests directly to create differen Request implementations.
Author(s):
aw
ib
 
 public interface RequestFactory {

Create an empty PublishRequest

Returns:
the new PublishRequest
 
Create a new PublishRequest that contains the given PublishElement

Parameters:
el the PublishElement that is added to the new PublishRequest
Returns:
the new PublishRequest
 
Create a new PublishRequest that contains the given list of PublishElement instances.

Parameters:
list the list of PublishElement instances that are added to the new PublishRequest
Returns:
the new PublishRequest
 
Create a new, empty PublishUpdate instance.

Returns:
the new PublishUpdate instance
Create a new PublishUpdate instance that is used to publish metadata to an de.hshannover.f4.trust.ifmapj.identifier.Identifier. The MetadataLifetime of the new metadata is set to MetadataLifetime.session.

Parameters:
i1 the de.hshannover.f4.trust.ifmapj.identifier.Identifier to which the given metadata is published to
md the metadata that shall be published
Returns:
the new PublishUpdate instance
Create a new PublishUpdate instance that is used to publish metadata on an de.hshannover.f4.trust.ifmapj.identifier.Identifier with a specific MetadataLifetime.

Parameters:
i1 the de.hshannover.f4.trust.ifmapj.identifier.Identifier to which the given metadata is published to
md the metadata that shall be published
lifetime the lifetime of the new metadata
Returns:
the new PublishUpdate instance
			MetadataLifetime lifetime);

Create a new PublishUpdate instance that is used to publish metadata on a link between two de.hshannover.f4.trust.ifmapj.identifier.Identifier instances. The MetadataLifetime of the new metadata is set to MetadataLifetime.session.

Parameters:
i1 the first de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
i2 the second de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
md the metadata that shall be published
Returns:
the new PublishUpdate instance
Create a new PublishUpdate instance that is used to publish metadata on a link between two de.hshannover.f4.trust.ifmapj.identifier.Identifier instances with a specific MetadataLifetime.

Parameters:
i1 the first de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
i2 the second de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
md the metadata that shall be published
lifetime the lifetime of the new metadata
Returns:
the new PublishUpdate instance
			Document mdMetadataLifetime lifetime);

Create a new PublishUpdate instance that is used to publish a list of metadata instances. The MetadataLifetime of the new metadata is set to MetadataLifetime.session.

Parameters:
i1 the de.hshannover.f4.trust.ifmapj.identifier.Identifier to which the given metadata is published to
mdlist a list of metadata objects
Returns:
the new PublishUpdate instance
			Collection<Documentmdlist);

Create a new PublishUpdate instance that is used to publish a list of metadata instances with a specific MetadataLifetime.

Parameters:
i1 the de.hshannover.f4.trust.ifmapj.identifier.Identifier to which the given metadata is published to
mdlist a list of metadata objects
lifetime the lifetime of the new metadata
Returns:
the new PublishUpdate instance
			Collection<DocumentmdlistMetadataLifetime lifetime);

Create a new PublishUpdate instance that is used to publish a list of metadata on a link between two de.hshannover.f4.trust.ifmapj.identifier.Identifier instances. The MetadataLifetime of the new metadata is set to MetadataLifetime.session.

Parameters:
i1 the first de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
i2 the second de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
mdlist a list of metadata objects
Returns:
the new PublishUpdate instance
			Collection<Documentmdlist);

Create a new PublishUpdate instance that is used to publish a list of metadata on a link between two de.hshannover.f4.trust.ifmapj.identifier.Identifier instances with a specific MetadataLifetime.

Parameters:
i1 the first de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
i2 the second de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
mdlist a list of metadata objects
lifetime the lifetime of the new metadata
Returns:
the new PublishUpdate instance
			Collection<DocumentmdlistMetadataLifetime lifetime);

Create a new, empty PublishDelete instance.

Returns:
the new PublishDelete instance
Create a new PublishDelete instance for a specific de.hshannover.f4.trust.ifmapj.identifier.Identifier in order to delete all of its metadata.

Parameters:
i1 the de.hshannover.f4.trust.ifmapj.identifier.Identifier that is the target of the delete request
Returns:
the new PublishDelete instance
Create a new PublishDelete instance for a link between two de.hshannover.f4.trust.ifmapj.identifier.Identifier instances in order to delete all metadata of the link.

Parameters:
i1 the first de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
i2 the second de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
Returns:
the new PublishDelete instance
Create a new PublishDelete instance for a specific de.hshannover.f4.trust.ifmapj.identifier.Identifier in order to delete its metadata that matches the given filter.

Parameters:
i1 the de.hshannover.f4.trust.ifmapj.identifier.Identifier that is the target of the delete request
filter a filter that expresses the metadata that shall be deleted
Returns:
the new PublishDelete instance
Create a new PublishDelete instance for a link between two de.hshannover.f4.trust.ifmapj.identifier.Identifier instances in order to delete its metadata that matches the given filter.

Parameters:
i1 the first de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
i2 the second de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
filter a filter that expresses the metadata that shall be deleted
Returns:
the new PublishDelete instance
Create a new, empty PublishNotify instance.

Returns:
the new PublishNotify instance
Create a new PublishNotify instance that is used to publish metadata to an de.hshannover.f4.trust.ifmapj.identifier.Identifier.

Parameters:
i1 the de.hshannover.f4.trust.ifmapj.identifier.Identifier to which the given metadata is published to
md the metadata that shall be published
Returns:
the new PublishNotify instance
Create a new PublishNotify instance that is used to publish metadata on a link between two de.hshannover.f4.trust.ifmapj.identifier.Identifier instances.

Parameters:
i1 the first de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
i2 the second de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
md the metadata that shall be published
Returns:
the new PublishNotify instance
Create a new PublishNotify instance that is used to publish a list of metadata instances.

Parameters:
i1 the de.hshannover.f4.trust.ifmapj.identifier.Identifier to which the given metadata is published to
mdlist a list of metadata objects
Returns:
the new PublishNotify instance
			Collection<Documentmdlist);

Create a new PublishNotify instance that is used to publish a list of metadata on a link between two de.hshannover.f4.trust.ifmapj.identifier.Identifier instances. The MetadataLifetime of the new metadata is set to MetadataLifetime.session.

Parameters:
i1 the first de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
i2 the second de.hshannover.f4.trust.ifmapj.identifier.Identifier of the link
mdlist a list of metadata objects
Returns:
the new PublishNotify instance
			Collection<Documentmdlist);

Create a SearchRequest with default values. You need to set at least the start de.hshannover.f4.trust.ifmapj.identifier.Identifier with SearchHolder.setStartIdentifier(de.hshannover.f4.trust.ifmapj.identifier.Identifier) afterwards!

Returns:
the new SearchRequest instance
Create a new SearchRequest in order to perform an IF-MAP search.

Parameters:
matchLinks the match-links filter (null means match-all, an empty java.lang.String means match-nothing)
maxDepth max-depth of the search (default is left out)
terminalIdentifiers comma separated list of terminal identifier types (for example 'identity,device')
maxSize max-size of search result (default is left out)
resultFilter the result-filter filter (null means match-all, an empty java.lang.String means match-nothing)
start the start de.hshannover.f4.trust.ifmapj.identifier.Identifier
Returns:
the new SearchRequest instance
	public SearchRequest createSearchRequest(String matchLinksInteger maxDepth,
			String terminalIdentifiersInteger maxSizeString resultFilter,
			Identifier start);

Create an empty SubscribeRequest

Returns:
the new SubscribeRequest instance
Create a SubscribeRequest with one SubscribeElement.

Parameters:
el the SubscribeElement that is added to the new SubscribeRequest. This can either be SubscribeUpdate or SubscribeDelete.
Returns:
the new SubscribeRequest
Create a SubscribeRequest with a list of SubscribeElement instances.

Parameters:
list the list of SubscribeElement instances that are added to the new SubscribeRequest. The SubscribeElement instances are either SubscribeUpdate or SubscribeDelete instances.
Returns:
the new SubscribeRequest
Create a SubscribeUpdate instance with the given parameters.

Parameters:
name the name of the subscription
matchLinks the match-links filter (null means match-all, an empty java.lang.String means match-nothing)
maxDepth max-depth of the search (default is left out)
terminalIdentifiers comma separated list of terminal identifier types (for example 'identity,device')
maxSize max-size of search result (default is left out)
resultFilter the result-filter filter (null means match-all, an empty java.lang.String means match-nothing)
start the start de.hshannover.f4.trust.ifmapj.identifier.Identifier
Returns:
the new SubscribeUpdate instance
	public SubscribeUpdate createSubscribeUpdate(String nameString matchLinks,
			Integer maxDepthString terminalIdentifiersInteger maxSize,
			String resultFilterIdentifier start);

Create a SubscribeDelete instance with default values. You need to set the name with SubscribeElement.setName(java.lang.String) afterwards!

Returns:
the new SubscribeDelete instance
Create a new SubscribeDelete instance with the given name.

Parameters:
name the name of the subscription that shall be deleted on the MAPS.
Returns:
the new SubscribeDelete instance
New to GrepCode? Check out our FAQ X