Search in sources :

Example 1 with NMutableEnvironment

use of com.icodici.universa.contract.services.NMutableEnvironment in project universa by UniversaBlockchain.

the class Node method getFullEnvironment.

/**
 * Get environment and follower contract by environment identifier.
 *
 * @param environmentId is environment subscription
 *
 * @return {@link Binder} with environment and follower contract
 */
public Binder getFullEnvironment(long environmentId) {
    NImmutableEnvironment ime = getEnvironment(environmentId);
    ime.setNameCache(nameCache);
    NSmartContract contract = ime.getContract();
    contract.setNodeInfoProvider(nodeInfoProvider);
    NMutableEnvironment me = ime.getMutable();
    if (me == null)
        return Binder.EMPTY;
    return Binder.of("follower", contract, "environment", me);
}
Also used : NSmartContract(com.icodici.universa.contract.services.NSmartContract) NMutableEnvironment(com.icodici.universa.contract.services.NMutableEnvironment) NImmutableEnvironment(com.icodici.universa.contract.services.NImmutableEnvironment)

Aggregations

NImmutableEnvironment (com.icodici.universa.contract.services.NImmutableEnvironment)1 NMutableEnvironment (com.icodici.universa.contract.services.NMutableEnvironment)1 NSmartContract (com.icodici.universa.contract.services.NSmartContract)1