FileDocCategorySizeDatePackage
OTSPolicyFactory.javaAPI DocGlassfish v2 API3271Fri May 04 22:36:42 BST 2007com.sun.jts.pi

OTSPolicyFactory

public class OTSPolicyFactory extends LocalObject implements PolicyFactory
This is the PolicyFactory to create an OTSPolicy object.
author
Ram Jeyaraman 11/11/2000
version
1.0

Fields Summary
Constructors Summary
public OTSPolicyFactory()

Methods Summary
public org.omg.CORBA.Policycreate_policy(int type, org.omg.CORBA.Any value)


        if (type != OTS_POLICY_TYPE.value) {
            throw new PolicyError("Invalid OTSPolicyType", (short) 0);
        }

        short policyValue = OTSPolicyValueHelper.extract(value);

        switch (policyValue) {
        case REQUIRES.value :
        case ADAPTS.value :
        case FORBIDS.value :
            break;
        default :
            throw new PolicyError("Invalid OTSPolicyValue", (short) 1);
        }

        return new OTSPolicyImpl(policyValue);