Class WriteableView

    • Constructor Detail

    • Method Detail

      • getPropertyValue

        public String getPropertyValue​(String propertyName)
      • join

        public boolean join​(Transaction t)
        Enter a new Transaction, this method should return false if this object is already enlisted in another transaction, or cannot be enlisted with the passed transaction. If the object returns true, the object is enlisted in the passed transaction and cannot be enlisted in another transaction until either commit or abort has been issued.
        Specified by:
        join in interface Transactor
        Parameters:
        t - the transaction to enlist with
        Returns:
        true if the enlisting with the passed transaction was accepted, false otherwise
      • canCommit

        public boolean canCommit​(Transaction t)
                          throws TransactionFailure
        Returns true of this Transaction can be committed on this object
        Specified by:
        canCommit in interface Transactor
        Parameters:
        t - is the transaction to commit, should be the same as the one passed during the join(Transaction t) call.
        Returns:
        true if the trsaction commiting would be successful
        Throws:
        TransactionFailure - if the changes cannot be validated
      • stripMarkers

        public static String stripMarkers​(String s)
        remove @ or <> eg "@foo" => "foo" or "" => "foo"
      • abort

        public void abort​(Transaction t)
        Aborts this Transaction, reverting the state
        Specified by:
        abort in interface Transactor
        Parameters:
        t - the aborting transaction
      • allocateProxy

        public <T extends ConfigBeanProxy> T allocateProxy​(Class<T> type)
                                                    throws TransactionFailure
        Allocate a new ConfigBean object as part of the Transaction associated with this configuration object. This will eventually be moved to a factory.
        Parameters:
        type - the request configuration object type
        Returns:
        the propertly constructed configuration object
        Throws:
        TransactionFailure - if the allocation failed