Package emissary.id

Class IdPlace

    • Field Detail

      • finalForms

        protected Set<String> finalForms
        Set of final id forms that do not add unknown on top
    • Constructor Detail

      • IdPlace

        protected IdPlace()
                   throws IOException
        Create 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 resource
        theDir - controlling directory
        thePlaceLocation - 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 resource
        placeLocation - 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 data
        theDir - string name of our directory
        thePlaceLocation - 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