public class BatchUtil
extends java.lang.Object
Constructor | Description |
---|---|
BatchUtil() |
Modifier and Type | Method | Description |
---|---|---|
static AbstractResponse |
addAliasToHandleRecord(java.lang.String handle,
java.lang.String alias,
int index,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static AbstractResponse |
addHandleValue(java.lang.String handle,
HandleValue value,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static HandleValue[] |
addValue(HandleValue[] values,
HandleValue value) |
|
static HandleValue[] |
createExampleHandleValues(java.lang.String handle,
java.lang.String url,
java.lang.String adminHandle,
int adminIndex) |
|
static AbstractResponse |
createHandleRecord(java.lang.String handle,
HandleValue[] values,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static AbstractResponse |
deleteHandleRecord(java.lang.String handle,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static SiteInfo |
getFirstPrimarySite(HandleValue[] values) |
|
static SiteInfo |
getFirstPrimarySiteFromHserv(HandleValue[] values,
HandleResolver resolver) |
|
static java.util.List<java.lang.String> |
getHandlesFromFile(java.lang.String fileName) |
|
static HandleValue |
getHandleValueAtIndex(HandleValue[] handleValues,
int index) |
|
static java.util.List<java.lang.String> |
getLinesFromFile(java.lang.String fileName) |
|
static int |
getNextIndex(HandleValue[] values,
int start) |
|
static SiteInfo |
getSite(java.lang.String siteHandle,
HandleResolver resolver) |
|
static java.util.List<HandleValue> |
getValuesNotOfType(HandleValue[] values,
java.lang.String type) |
|
static java.util.List<HandleValue> |
getValuesOfType(HandleValue[] values,
java.lang.String type) |
|
static boolean |
hasHandleValueOfType(HandleValue[] values,
java.lang.String type) |
|
static AbstractResponse |
homePrefix(java.lang.String prefix,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static java.util.List<java.lang.String> |
listAllHandlesOnSite(SiteInfo site,
HandleResolver resolver,
AuthenticationInfo authInfo) |
|
static java.util.List<java.lang.String> |
listHandles(java.lang.String prefix,
SiteInfo site,
HandleResolver resolver,
AuthenticationInfo authInfo) |
|
static java.util.List<java.lang.String> |
listPrefixesOnSite(SiteInfo site,
HandleResolver resolver,
AuthenticationInfo authInfo) |
|
static int |
lowestAvailableIndex(java.util.List<java.lang.Integer> usedIndexes) |
|
static int |
lowestAvailableIndex(HandleValue[] values) |
|
static AbstractResponse |
modifyHandleValue(java.lang.String handle,
HandleValue value,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static AbstractResponse |
removeValueRequest(java.lang.String handle,
HandleValue value,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static AbstractResponse |
removeValuesAtIndices(java.lang.String handle,
int[] indicesToRemove,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static HandleValue[] |
resolveHandle(java.lang.String handle,
HandleResolver resolver,
AuthenticationInfo authInfo) |
|
static HandleValue[] |
resolveHandleFromSite(java.lang.String handle,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static HandleValue[] |
signHandleValues(HandleValue[] values,
java.lang.String handleToCreate,
java.lang.String handleOfSigner,
int indexOfSigner,
java.security.PrivateKey privateKeyOfSigner) |
|
static HandleValue[] |
signHandleValuesWithJws(HandleValue[] values,
java.lang.String handleToSign,
java.lang.String handleOfSigner,
int indexOfSigner,
java.security.PrivateKey privateKeyOfSigner,
java.util.List<java.lang.String> chain) |
|
static void |
throwIfNotSuccess(AbstractResponse response) |
|
static AbstractResponse |
unhomePrefix(java.lang.String prefix,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static AbstractResponse |
updateEntireHandleRecord(java.lang.String handle,
java.util.List<HandleValue> values,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static AbstractResponse |
updateEntireHandleRecord(java.lang.String handle,
HandleValue[] values,
HandleResolver resolver,
AuthenticationInfo authInfo,
SiteInfo site) |
|
static void |
writeHandlesToConsole(java.util.List<java.lang.String> handles) |
|
static void |
writeHandlesToFile(java.util.List<java.lang.String> handles,
java.lang.String fileName) |
public static SiteInfo getSite(java.lang.String siteHandle, HandleResolver resolver) throws HandleException
HandleException
public static HandleValue getHandleValueAtIndex(HandleValue[] handleValues, int index)
public static SiteInfo getFirstPrimarySiteFromHserv(HandleValue[] values, HandleResolver resolver) throws HandleException
HandleException
public static SiteInfo getFirstPrimarySite(HandleValue[] values)
public static java.util.List<java.lang.String> listAllHandlesOnSite(SiteInfo site, HandleResolver resolver, AuthenticationInfo authInfo) throws HandleException
HandleException
public static java.util.List<java.lang.String> listPrefixesOnSite(SiteInfo site, HandleResolver resolver, AuthenticationInfo authInfo) throws HandleException
HandleException
public static java.util.List<java.lang.String> listHandles(java.lang.String prefix, SiteInfo site, HandleResolver resolver, AuthenticationInfo authInfo) throws HandleException
HandleException
public static java.util.List<java.lang.String> getHandlesFromFile(java.lang.String fileName) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public static java.util.List<java.lang.String> getLinesFromFile(java.lang.String fileName) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public static void writeHandlesToFile(java.util.List<java.lang.String> handles, java.lang.String fileName) throws java.io.IOException
java.io.IOException
public static void writeHandlesToConsole(java.util.List<java.lang.String> handles)
public static HandleValue[] addValue(HandleValue[] values, HandleValue value)
public static int getNextIndex(HandleValue[] values, int start)
public static int lowestAvailableIndex(HandleValue[] values)
public static int lowestAvailableIndex(java.util.List<java.lang.Integer> usedIndexes)
public static boolean hasHandleValueOfType(HandleValue[] values, java.lang.String type)
public static java.util.List<HandleValue> getValuesOfType(HandleValue[] values, java.lang.String type)
public static java.util.List<HandleValue> getValuesNotOfType(HandleValue[] values, java.lang.String type)
public static AbstractResponse addHandleValue(java.lang.String handle, HandleValue value, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static HandleValue[] resolveHandle(java.lang.String handle, HandleResolver resolver, AuthenticationInfo authInfo) throws HandleException
HandleException
public static HandleValue[] resolveHandleFromSite(java.lang.String handle, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static AbstractResponse addAliasToHandleRecord(java.lang.String handle, java.lang.String alias, int index, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static AbstractResponse modifyHandleValue(java.lang.String handle, HandleValue value, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static AbstractResponse updateEntireHandleRecord(java.lang.String handle, java.util.List<HandleValue> values, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static AbstractResponse removeValueRequest(java.lang.String handle, HandleValue value, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static AbstractResponse removeValuesAtIndices(java.lang.String handle, int[] indicesToRemove, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static HandleValue[] signHandleValues(HandleValue[] values, java.lang.String handleToCreate, java.lang.String handleOfSigner, int indexOfSigner, java.security.PrivateKey privateKeyOfSigner) throws java.lang.Exception
java.lang.Exception
public static HandleValue[] signHandleValuesWithJws(HandleValue[] values, java.lang.String handleToSign, java.lang.String handleOfSigner, int indexOfSigner, java.security.PrivateKey privateKeyOfSigner, java.util.List<java.lang.String> chain) throws java.lang.Exception
java.lang.Exception
public static HandleValue[] createExampleHandleValues(java.lang.String handle, java.lang.String url, java.lang.String adminHandle, int adminIndex)
public static AbstractResponse deleteHandleRecord(java.lang.String handle, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static AbstractResponse createHandleRecord(java.lang.String handle, HandleValue[] values, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static AbstractResponse updateEntireHandleRecord(java.lang.String handle, HandleValue[] values, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static AbstractResponse unhomePrefix(java.lang.String prefix, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static AbstractResponse homePrefix(java.lang.String prefix, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException
HandleException
public static void throwIfNotSuccess(AbstractResponse response) throws HandleException
HandleException