Package emissary.id
Class IdPlace
- java.lang.Object
-
- emissary.directory.DirectoryProviderPlace
-
- emissary.place.ServiceProviderPlace
-
- emissary.id.IdPlace
-
- All Implemented Interfaces:
IServiceProviderPlace,ServiceProviderPlaceMBean
- Direct Known Subclasses:
SizeIdPlace,UnixFilePlace
public abstract class IdPlace extends ServiceProviderPlace
Abstract class that is the parent of all places that operate in the ID phase of the workflow.
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<String>finalFormsSet of final id forms that do not add unknown on topprotected Set<String>ignoresprotected Map<String,String>renames-
Fields inherited from class emissary.place.ServiceProviderPlace
configG, configLocs, heavyDutyMethodImplemented, kff, placeLocation, processMethodImplemented, slogger
-
Fields inherited from class emissary.directory.DirectoryProviderPlace
denyList, dirPlace, keys, localDirPlace, logger, myKey, placeName, serviceCost, serviceDescription, serviceQuality
-
Fields inherited from interface emissary.place.IServiceProviderPlace
DOT, SPROUT_KEY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedIdPlace()Create and register an id place with all default config informationprotectedIdPlace(InputStream configStream)Construct with config data from a stream on the local directoryprotectedIdPlace(InputStream configStream, String theDir, String thePlaceLocation)Create an id place with config data from a streamprotectedIdPlace(String placeLoc)Create an Id Place and register it at the location specifiedprotectedIdPlace(String configFile, String placeLocation)Create and register with default directoryprotectedIdPlace(String configFile, String theDir, String thePlaceLocation)Create and register constructor, called from the place by super(x,y,z)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureIdPlace()Save a list of all the forms that this place is a service proxy for and a list of final id determinations that this place can make so that any new form being set can be differentiated as final or non-final and the stacks cleaned up appropriately FINAL_ID - current form values that do not get UNKNOWN pushed on top ID_RENAME_ - current form values to rename ID_IGNORE - current form values to ignoreprotected StringrenamedForm(String form)Return the form renamed if it is listed as a RENAME_ID otherwise just return as-idintsetCurrentForm(IBaseDataObject d, String newForm)Set the current form after deciding if it's a FINAL_ID or notintsetCurrentForm(IBaseDataObject d, Collection<String> newForms)Set a whole bunch of new forms.intsetFinalCurrentForm(IBaseDataObject d, String newForm)Before setting a final current form, pop everything this place is a proxy for, then push the new form onto both the currentForm() and destination() stack.intsetNonFinalCurrentForm(IBaseDataObject d, String newForm)Before setting a non-final current form, pop everything this place is s proxy for, then push the new form onto the currentForm() stack, then push UNKNOWN on right after it (unless the newForm itself is UNKNOWN).-
Methods inherited from class emissary.place.ServiceProviderPlace
agentProcessCall, agentProcessHeavyDuty, agentProcessHeavyDuty, changesPrimaryView, createsExtractedRecords, dumpPlaceStats, dumpRunningConfig, getAgent, getAlternateViewsModified, getConfigurator, getFileTypes, getOutputForms, getParametersModified, getPlaceStats, getResourceLimitMillis, getRunningConfig, getTld, initKff, process, processHeavyDuty, rehash, setConfigLocations, setPlaceLocation, setupPlace, setupPlace, sproutsChildren, verifyProcessImplementationProvided
-
Methods inherited from class emissary.directory.DirectoryProviderPlace
addKey, addServiceProxy, configureServicePlace, deregisterFromDirectory, getDirectoryEntry, getKey, getKeys, getPlaceName, getPrimaryProxy, getProxies, isDenied, nextKeys, nukeMyProxies, register, register, registerWithDirectory, removeKey, removeServiceProxy, setLogger, setupPlacePostHook, shutDown, toString, unbindFromNamespace
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface emissary.place.IServiceProviderPlace
addKey, addServiceProxy, getDirectoryEntry, getKey, getKeys, getPlaceName, getPrimaryProxy, getProxies, isDenied, loadConfigurator, loadConfigurator, loadConfigurator, loadConfigurator, nextKeys, removeKey, removeServiceProxy, shutDown
-
-
-
-
Constructor Detail
-
IdPlace
protected IdPlace() throws IOExceptionCreate and register an id place with all default config information- Throws:
IOException
-
IdPlace
protected IdPlace(String placeLoc) throws IOException
Create an Id Place and register it at the location specified- Parameters:
placeLoc- the location for registering this place- Throws:
IOException
-
IdPlace
protected IdPlace(String configFile, String theDir, String thePlaceLocation) throws IOException
Create and register constructor, called from the place by super(x,y,z)- Parameters:
configFile- the config location file or resourcetheDir- controlling directorythePlaceLocation- key to use in registration- Throws:
IOException
-
IdPlace
protected IdPlace(String configFile, String placeLocation) throws IOException
Create and register with default directory- Parameters:
configFile- the config location file or resourceplaceLocation- key to use in registration- Throws:
IOException
-
IdPlace
protected IdPlace(InputStream configStream, String theDir, String thePlaceLocation) throws IOException
Create an id place with config data from a stream- Parameters:
configStream- stream of config datatheDir- string name of our directorythePlaceLocation- string name of our location- Throws:
IOException
-
IdPlace
protected IdPlace(InputStream configStream) throws IOException
Construct with config data from a stream on the local directory- Parameters:
configStream- stream of config data- Throws:
IOException
-
-
Method Detail
-
configureIdPlace
public void configureIdPlace()
Save a list of all the forms that this place is a service proxy for and a list of final id determinations that this place can make so that any new form being set can be differentiated as final or non-final and the stacks cleaned up appropriately- FINAL_ID - current form values that do not get UNKNOWN pushed on top
- ID_RENAME_ - current form values to rename
- ID_IGNORE - current form values to ignore
-
setNonFinalCurrentForm
public int setNonFinalCurrentForm(IBaseDataObject d, @Nullable String newForm)
Before setting a non-final current form, pop everything this place is s proxy for, then push the new form onto the currentForm() stack, then push UNKNOWN on right after it (unless the newForm itself is UNKNOWN).
-
renamedForm
protected String renamedForm(String form)
Return the form renamed if it is listed as a RENAME_ID otherwise just return as-id- Parameters:
form- the form to check- Returns:
- the renamed form
-
setFinalCurrentForm
public int setFinalCurrentForm(IBaseDataObject d, String newForm)
Before setting a final current form, pop everything this place is a proxy for, then push the new form onto both the currentForm() and destination() stack.
-
setCurrentForm
public int setCurrentForm(IBaseDataObject d, @Nullable String newForm)
Set the current form after deciding if it's a FINAL_ID or not
-
setCurrentForm
public int setCurrentForm(IBaseDataObject d, @Nullable Collection<String> newForms)
Set a whole bunch of new forms. The top one may or may not be a FINAL_ID, all others are FINAL_ID de facto so that extraneous UNKNOWNs are not put on the stack
-
-