Esri Geoportal Server
1.2.9

com.esri.gpt.agp.sync
Class AgpItemHelper

java.lang.Object
  extended by com.esri.gpt.agp.sync.AgpItemHelper

public class AgpItemHelper
extends Object

Item related helper functions for the AgpPush synchronizer.


Constructor Summary
AgpItemHelper()
          Default constructor.
 
Method Summary
 boolean doesUnsyncedItemExist(AgpItem sourceItem, AgpDestination destination)
          Determines if an item with an exact itemId exists at the destination.
 boolean isSyncedItem(AgpItem item)
          Determines if a source item originated from synchronization.
protected  AgpItem makeDestinationItem(AgpSource source, AgpItem sourceItem)
          Make the destination item.
protected  String makeSyncKey(AgpItem sourceItem)
          Make the synchronization key.
protected  String makeSyncKey(String sourceId)
          Make the synchronization key.
protected  AgpItem querySingleItem(AgpConnection connection, String query)
          Query for a single item.
protected  boolean requiresUpdate(AgpItem sourceItem, AgpDestination destination, AgpItem destItem)
          Determine if the destination item requires an update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgpItemHelper

public AgpItemHelper()
Default constructor.

Method Detail

doesUnsyncedItemExist

public boolean doesUnsyncedItemExist(AgpItem sourceItem,
                                     AgpDestination destination)
                              throws Exception
Determines if an item with an exact itemId exists at the destination.
Avoid publishing these (these tend to be the start up items common to all arcGIS Portal instances.

Parameters:
sourceItem - the source item
destination - the destination
Returns:
true if an item with the exact itemId exists at the destination
Throws:
Exception

isSyncedItem

public boolean isSyncedItem(AgpItem item)
Determines if a source item originated from synchronization.
Avoid propagating synced items from portal to portal.

Parameters:
item - the source item
Returns:
true if the item originated from synchronization

makeDestinationItem

protected AgpItem makeDestinationItem(AgpSource source,
                                      AgpItem sourceItem)
Make the destination item.

Parameters:
source - the source
sourceItem - the source item
Returns:
the destination item

makeSyncKey

protected String makeSyncKey(AgpItem sourceItem)
Make the synchronization key.

Parameters:
sourceItem - the source item
Returns:
the key

makeSyncKey

protected String makeSyncKey(String sourceId)
Make the synchronization key.

Parameters:
sourceId - the ID of the source item
Returns:
the key

querySingleItem

protected AgpItem querySingleItem(AgpConnection connection,
                                  String query)
                           throws Exception
Query for a single item.

Parameters:
connection - the connection
query - the query string
Returns:
the found item
Throws:
Exception - if an exception occurs

requiresUpdate

protected boolean requiresUpdate(AgpItem sourceItem,
                                 AgpDestination destination,
                                 AgpItem destItem)
                          throws Exception
Determine if the destination item requires an update.

Parameters:
sourceItem - the synchronization source item
destination - the synchronization destination
destItem - the synchronization destination item
Returns:
true if the item should be updated
Throws:
Exception - if an exception occurs

Esri Geoportal Server
1.2.9

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