1 21 package org.jacorb.security.sas; 22 23 import org.jacorb.sasPolicy.SASPolicyValuesHelper; 24 import org.jacorb.sasPolicy.SAS_POLICY_TYPE; 25 import org.omg.CORBA.Any ; 26 import org.omg.CORBA.Policy ; 27 import org.omg.CORBA.PolicyError ; 28 import org.omg.PortableInterceptor.PolicyFactory ; 29 30 public class SASPolicyFactory extends org.omg.CORBA.LocalObject implements PolicyFactory 31 { 32 33 public SASPolicyFactory() 34 { 35 } 36 37 public Policy create_policy( int type, Any value ) 38 throws PolicyError 39 { 40 if( type != SAS_POLICY_TYPE.value ) 41 throw new PolicyError (); 42 43 return new SASPolicyImpl( SASPolicyValuesHelper.extract( value )); 44 45 } 46 } 47 48 49 50 51 52 53 | Popular Tags |