Esri Geoportal Server
1.2.9

com.esri.gpt.control.webharvest.protocol
Class ProtocolInvoker

java.lang.Object
  extended by com.esri.gpt.control.webharvest.protocol.ProtocolInvoker

public class ProtocolInvoker
extends Object

Invokes various methods on protocol through Reflection.


Constructor Summary
ProtocolInvoker()
           
 
Method Summary
static boolean getAutoApprove(Protocol protocol)
          Checks if 'auto-approve' is enabled.
static List<String> getDestinations(Protocol protocol)
          Gets protocol destinations.
static boolean getLockTitle(Protocol protocol)
          Checks if 'lock-title' is enabled.
static boolean getRetryAsDraft(Protocol protocol)
          Checks if another attempt to publish as "draft" should be made if first attempt failed validation.
static BotsMode getRobotsTxtMode(Protocol protocol)
          Gets robots.txt mode.
static boolean getUpdateContent(Protocol protocol)
          Checks if 'deep harvest' is enabled.
static boolean getUpdateDefinition(Protocol protocol)
          Checks if 'xml generation' is enabled.
static void ping(Protocol protocol, String url)
          Deprecated.  
static void setAutoApprove(Protocol protocol, boolean autoApprove)
          Enables/disables 'auto-approve'
static void setDestinations(Protocol protocol, List<String> destinations)
          Sets protocol destinations.
static void setLockTitle(Protocol protocol, boolean lockTitle)
          Enables/disables 'lock-title'.
static void setRetryAsDraft(Protocol protocol, boolean retryAsDraft)
          Allows to make another attempt to publish as a draft if first attempt failed validation.
static void setRobotsTxtMode(Protocol protocol, BotsMode mode)
          Sets robots.txt mode.
static void setUpdateContent(Protocol protocol, boolean enabled)
          Enables/disables 'deep harvest'
static void setUpdateDefinition(Protocol protocol, boolean enabled)
          Enables/disables 'xml generation'
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolInvoker

public ProtocolInvoker()
Method Detail

ping

@Deprecated
public static void ping(Protocol protocol,
                                   String url)
                 throws Exception
Deprecated. 

Invokes ping on the protocol.

Parameters:
protocol - protocol
url - resource URL
Throws:
IllegalArgumentException - if invalid protocol definition
IOException - if error connection resource
Exception

getUpdateContent

public static boolean getUpdateContent(Protocol protocol)
Checks if 'deep harvest' is enabled.

Parameters:
protocol - protocol
Returns:
true if 'deep harvest' is enabled

setUpdateContent

public static void setUpdateContent(Protocol protocol,
                                    boolean enabled)
Enables/disables 'deep harvest'

Parameters:
protocol - protocol
enabled - true to enable 'deep harvest'

getUpdateDefinition

public static boolean getUpdateDefinition(Protocol protocol)
Checks if 'xml generation' is enabled.

Parameters:
protocol - protocol
Returns:
true if 'xml generation' is enabled

setUpdateDefinition

public static void setUpdateDefinition(Protocol protocol,
                                       boolean enabled)
Enables/disables 'xml generation'

Parameters:
protocol - protocol
enabled - true to enable 'xml generation'

getAutoApprove

public static boolean getAutoApprove(Protocol protocol)
Checks if 'auto-approve' is enabled.

Parameters:
protocol - protocol
Returns:
true if 'auto-approve' is enabled

setAutoApprove

public static void setAutoApprove(Protocol protocol,
                                  boolean autoApprove)
Enables/disables 'auto-approve'

Parameters:
protocol - protocol
autoApprove - true to enable 'auto-approve'

getLockTitle

public static boolean getLockTitle(Protocol protocol)
Checks if 'lock-title' is enabled. If a flag is set, it means a title is locked and synchronizer is not allowed to update it, although all the rest of information is allowed to be updated.

Parameters:
protocol - protocol
Returns:
true if 'lock-title' is enabled

setLockTitle

public static void setLockTitle(Protocol protocol,
                                boolean lockTitle)
Enables/disables 'lock-title'. If a flag is set, it means a title is locked and synchronizer is not allowed to update it, although all the rest of information is allowed to be updated.

Parameters:
protocol - protocol
lockTitle - true to enable 'lock-title'

getRetryAsDraft

public static boolean getRetryAsDraft(Protocol protocol)
Checks if another attempt to publish as "draft" should be made if first attempt failed validation. first attempt failed.

Parameters:
protocol - protocol
Returns:
true if another attempt should be made

setRetryAsDraft

public static void setRetryAsDraft(Protocol protocol,
                                   boolean retryAsDraft)
Allows to make another attempt to publish as a draft if first attempt failed validation.

Parameters:
protocol - protocol
retryAsDraft - true if another attempt should be made

getDestinations

public static List<String> getDestinations(Protocol protocol)
Gets protocol destinations.

Parameters:
protocol - protocol
Returns:
list of protocol destinations or null

setDestinations

public static void setDestinations(Protocol protocol,
                                   List<String> destinations)
Sets protocol destinations.

Parameters:
protocol - protocol
destinations - list of protocol destinations or null

setRobotsTxtMode

public static void setRobotsTxtMode(Protocol protocol,
                                    BotsMode mode)
Sets robots.txt mode.

Parameters:
protocol - protocol
mode - mode

getRobotsTxtMode

public static BotsMode getRobotsTxtMode(Protocol protocol)
Gets robots.txt mode.

Parameters:
protocol - protocol
Returns:
mode

Esri Geoportal Server
1.2.9

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.