Package net.handle.apps.batch
Class BatchUtil
- java.lang.Object
- 
- net.handle.apps.batch.BatchUtil
 
- 
 public class BatchUtil extends java.lang.Object
- 
- 
Constructor SummaryConstructors Constructor Description BatchUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static AbstractResponseaddAliasToHandleRecord(java.lang.String handle, java.lang.String alias, int index, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site)static AbstractResponseaddHandleValue(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 AbstractResponsecreateHandleRecord(java.lang.String handle, HandleValue[] values, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site)static AbstractResponsedeleteHandleRecord(java.lang.String handle, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site)static SiteInfogetFirstPrimarySite(HandleValue[] values)static SiteInfogetFirstPrimarySiteFromHserv(HandleValue[] values, HandleResolver resolver)static java.util.List<java.lang.String>getHandlesFromFile(java.lang.String fileName)static HandleValuegetHandleValueAtIndex(HandleValue[] handleValues, int index)static java.util.List<java.lang.String>getLinesFromFile(java.lang.String fileName)static intgetNextIndex(HandleValue[] values, int start)static SiteInfogetSite(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 booleanhasHandleValueOfType(HandleValue[] values, java.lang.String type)static AbstractResponsehomePrefix(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 intlowestAvailableIndex(java.util.List<java.lang.Integer> usedIndexes)static intlowestAvailableIndex(HandleValue[] values)static AbstractResponsemodifyHandleValue(java.lang.String handle, HandleValue value, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site)static AbstractResponseremoveValueRequest(java.lang.String handle, HandleValue value, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site)static AbstractResponseremoveValuesAtIndices(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 voidthrowIfNotSuccess(AbstractResponse response)static AbstractResponseunhomePrefix(java.lang.String prefix, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site)static AbstractResponseupdateEntireHandleRecord(java.lang.String handle, java.util.List<HandleValue> values, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site)static AbstractResponseupdateEntireHandleRecord(java.lang.String handle, HandleValue[] values, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site)static voidwriteHandlesToConsole(java.util.List<java.lang.String> handles)static voidwriteHandlesToFile(java.util.List<java.lang.String> handles, java.lang.String fileName)
 
- 
- 
- 
Method Detail- 
getSitepublic static SiteInfo getSite(java.lang.String siteHandle, HandleResolver resolver) throws HandleException - Throws:
- HandleException
 
 - 
getHandleValueAtIndexpublic static HandleValue getHandleValueAtIndex(HandleValue[] handleValues, int index) 
 - 
getFirstPrimarySiteFromHservpublic static SiteInfo getFirstPrimarySiteFromHserv(HandleValue[] values, HandleResolver resolver) throws HandleException - Throws:
- HandleException
 
 - 
getFirstPrimarySitepublic static SiteInfo getFirstPrimarySite(HandleValue[] values) 
 - 
listAllHandlesOnSitepublic static java.util.List<java.lang.String> listAllHandlesOnSite(SiteInfo site, HandleResolver resolver, AuthenticationInfo authInfo) throws HandleException - Throws:
- HandleException
 
 - 
listPrefixesOnSitepublic static java.util.List<java.lang.String> listPrefixesOnSite(SiteInfo site, HandleResolver resolver, AuthenticationInfo authInfo) throws HandleException - Throws:
- HandleException
 
 - 
listHandlespublic static java.util.List<java.lang.String> listHandles(java.lang.String prefix, SiteInfo site, HandleResolver resolver, AuthenticationInfo authInfo) throws HandleException- Throws:
- HandleException
 
 - 
getHandlesFromFilepublic static java.util.List<java.lang.String> getHandlesFromFile(java.lang.String fileName) throws java.io.FileNotFoundException- Throws:
- java.io.FileNotFoundException
 
 - 
getLinesFromFilepublic static java.util.List<java.lang.String> getLinesFromFile(java.lang.String fileName) throws java.io.FileNotFoundException- Throws:
- java.io.FileNotFoundException
 
 - 
writeHandlesToFilepublic static void writeHandlesToFile(java.util.List<java.lang.String> handles, java.lang.String fileName) throws java.io.IOException- Throws:
- java.io.IOException
 
 - 
writeHandlesToConsolepublic static void writeHandlesToConsole(java.util.List<java.lang.String> handles) 
 - 
addValuepublic static HandleValue[] addValue(HandleValue[] values, HandleValue value) 
 - 
getNextIndexpublic static int getNextIndex(HandleValue[] values, int start) 
 - 
lowestAvailableIndexpublic static int lowestAvailableIndex(HandleValue[] values) 
 - 
lowestAvailableIndexpublic static int lowestAvailableIndex(java.util.List<java.lang.Integer> usedIndexes) 
 - 
hasHandleValueOfTypepublic static boolean hasHandleValueOfType(HandleValue[] values, java.lang.String type) 
 - 
getValuesOfTypepublic static java.util.List<HandleValue> getValuesOfType(HandleValue[] values, java.lang.String type) 
 - 
getValuesNotOfTypepublic static java.util.List<HandleValue> getValuesNotOfType(HandleValue[] values, java.lang.String type) 
 - 
addHandleValuepublic static AbstractResponse addHandleValue(java.lang.String handle, HandleValue value, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
resolveHandlepublic static HandleValue[] resolveHandle(java.lang.String handle, HandleResolver resolver, AuthenticationInfo authInfo) throws HandleException - Throws:
- HandleException
 
 - 
resolveHandleFromSitepublic static HandleValue[] resolveHandleFromSite(java.lang.String handle, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
addAliasToHandleRecordpublic static AbstractResponse addAliasToHandleRecord(java.lang.String handle, java.lang.String alias, int index, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
modifyHandleValuepublic static AbstractResponse modifyHandleValue(java.lang.String handle, HandleValue value, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
updateEntireHandleRecordpublic static AbstractResponse updateEntireHandleRecord(java.lang.String handle, java.util.List<HandleValue> values, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
removeValueRequestpublic static AbstractResponse removeValueRequest(java.lang.String handle, HandleValue value, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
removeValuesAtIndicespublic static AbstractResponse removeValuesAtIndices(java.lang.String handle, int[] indicesToRemove, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
signHandleValuespublic static HandleValue[] signHandleValues(HandleValue[] values, java.lang.String handleToCreate, java.lang.String handleOfSigner, int indexOfSigner, java.security.PrivateKey privateKeyOfSigner) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 - 
signHandleValuesWithJwspublic 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 - Throws:
- java.lang.Exception
 
 - 
createExampleHandleValuespublic static HandleValue[] createExampleHandleValues(java.lang.String handle, java.lang.String url, java.lang.String adminHandle, int adminIndex) 
 - 
deleteHandleRecordpublic static AbstractResponse deleteHandleRecord(java.lang.String handle, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
createHandleRecordpublic static AbstractResponse createHandleRecord(java.lang.String handle, HandleValue[] values, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
updateEntireHandleRecordpublic static AbstractResponse updateEntireHandleRecord(java.lang.String handle, HandleValue[] values, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
unhomePrefixpublic static AbstractResponse unhomePrefix(java.lang.String prefix, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
homePrefixpublic static AbstractResponse homePrefix(java.lang.String prefix, HandleResolver resolver, AuthenticationInfo authInfo, SiteInfo site) throws HandleException - Throws:
- HandleException
 
 - 
throwIfNotSuccesspublic static void throwIfNotSuccess(AbstractResponse response) throws HandleException - Throws:
- HandleException
 
 
- 
 
-