@Override public Policy create_policy(int type, Any value) throws PolicyError { if (type != CSIv2Policy.TYPE) { throw new PolicyError(); } // stored as java.io.Serializable - is this a hack? IORSecurityConfigMetaData metadata = (IORSecurityConfigMetaData) value.extract_Value(); return new CSIv2Policy(metadata, codec); } }
public Policy create_policy(int type, Any value) throws PolicyError { if (type != INVOCATION_POLICY_TYPE.value) { throw new PolicyError("Invalid InvocationPolicyType", (short) 0); } short policyValue = InvocationPolicyValueHelper.extract(value); switch (policyValue) { case SHARED.value : case UNSHARED.value : case EITHER.value : break; default : throw new PolicyError("Invalid InvocationPolicyValue", (short) 1); } return new InvocationPolicyImpl(policyValue); } }
public Policy create_policy(int type, Any value) throws PolicyError { 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); } }
public Policy create_policy( int type, Any any ) throws PolicyError { if( type != BIDIRECTIONAL_POLICY_TYPE.value ) { throw new PolicyError("Invalid policy type of " + type, BAD_POLICY.value ); } short value = BidirectionalPolicyValueHelper.extract( any ); if( value != NORMAL.value && value != BOTH.value ) { throw new PolicyError("Invalid value for BiDir policy of " + value, BAD_POLICY_VALUE.value); } return new BiDirPolicy( value ); } }
public org.omg.CORBA.Policy createPolicy(int type, org.omg.CORBA.Any any) throws org.omg.CORBA.PolicyError { java.lang.Object factory; Integer itype = new Integer(type); if ((factory = policyFactoryTableInternal_.get(itype)) != null) return ((org.omg.PortableInterceptor.PolicyFactory) factory) .create_policy(type, any); if ((factory = policyFactoryTableExternal_.get(itype)) != null) return ((org.omg.PortableInterceptor.PolicyFactory) factory) .create_policy(type, any); throw new org.omg.CORBA.PolicyError(org.omg.CORBA.BAD_POLICY.value); }
@Override public Policy create_policy(int type, Any value) throws PolicyError { if (type != CSIv2Policy.TYPE) { throw new PolicyError(); } // stored as java.io.Serializable - is this a hack? IORSecurityConfigMetaData metadata = (IORSecurityConfigMetaData) value.extract_Value(); return new CSIv2Policy(metadata, codec); } }
/** This is the implementation of standard API defined in org.omg.CORBA.ORB * class. This method finds the Policy Factory for the given Policy Type * and instantiates the Policy object from the Factory. It will throw * PolicyError exception, If the PolicyFactory for the given type is * not registered. * _REVISIT_, Once Policy Framework work is completed, Reorganize * this method to com.sun.corba.se.spi.orb.ORB. */ public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val) throws org.omg.CORBA.PolicyError { if( val == null ) { nullParam( ); } if( policyFactoryTable == null ) { throw new org.omg.CORBA.PolicyError( "There is no PolicyFactory Registered for type " + type, BAD_POLICY.value ); } PolicyFactory factory = (PolicyFactory)policyFactoryTable.get( new Integer(type) ); if( factory == null ) { throw new org.omg.CORBA.PolicyError( " Could Not Find PolicyFactory for the Type " + type, BAD_POLICY.value); } org.omg.CORBA.Policy policy = factory.create_policy( type, val ); return policy; }
public Policy create_policy( int type, Any value ) throws PolicyError { if( type != ATLAS_POLICY_TYPE.value ) throw new PolicyError(); return new ATLASPolicyImpl( ATLASPolicyValuesHelper.extract( value )); } }
@Override public Policy create_policy(int type, Any value) throws PolicyError { if (type != CSIv2Policy.TYPE) { throw new PolicyError(); } // stored as java.io.Serializable - is this a hack? IORSecurityConfigMetaData metadata = (IORSecurityConfigMetaData) value.extract_Value(); return new CSIv2Policy(metadata, codec); } }
public Policy create_policy( int type, Any value ) throws PolicyError { if( type != BIDIRECTIONAL_POLICY_TYPE.value ) { throw new PolicyError(); } return new BiDirPolicyImpl( BidirectionalPolicyValueHelper.extract( value )); } }
public Policy create_policy(int type, Any value) throws PolicyError { if (type != SSL_POLICY_TYPE.value) throw new PolicyError(); return new SSLPolicyImpl(SSLPolicyValueHelper.extract(value)); } }
public Policy create_policy( int type, Any value ) throws PolicyError { if( type != SAS_POLICY_TYPE.value ) throw new PolicyError(); return new SASPolicyImpl( SASPolicyValuesHelper.extract( value )); } }
/** * Returns an instance of the appropriate interface derived from * <code>CORBA.Policy</code> whose value corresponds to the specified any. * @param type An int specifying the type of policy being created. * @param value An any containing data with which to construct the * <code>CORBA.Policy</code>. * @return A <code>CORBA.Policy<code> object of the specified type and * value. * @throws PolicyError if the policy type is invalid */ public Policy create_policy(int type, Any value) throws PolicyError { // Can create only known policy objects if (type != SasPolicy.POLICY_TYPE) { throw new PolicyError(); } // Get component stored SasComponent sasComponent = (SasComponent) value.extract_Value(); // build a new policy object return new SasPolicy(sasComponent); } }
/** * Returns an instance of the appropriate interface derived from * <code>CORBA.Policy</code> whose value corresponds to the specified any. * @param type An int specifying the type of policy being created. * @param value An any containing data with which to construct the * <code>CORBA.Policy</code>. * @return A <code>CORBA.Policy<code> object of the specified type and * value. * @throws PolicyError if the policy type is invalid */ public Policy create_policy(int type, Any value) throws PolicyError { // Can create only known policy objects if (type != SasPolicy.POLICY_TYPE) { throw new PolicyError(); } // Get component stored SasComponent sasComponent = (SasComponent) value.extract_Value(); // build a new policy object return new SasPolicy(sasComponent); } }
public static PolicyError read(org.omg.CORBA.portable.InputStream in) { if(!id().equals(in.read_string())) throw new org.omg.CORBA.MARSHAL(); PolicyError _ob_v = new PolicyError(); _ob_v.reason = PolicyErrorCodeHelper.read(in); return _ob_v; }
public static org.omg.CORBA.PolicyError read (final org.omg.CORBA.portable.InputStream in) { String id = in.read_string(); if (!id.equals(id())) throw new org.omg.CORBA.MARSHAL("wrong id: " + id); short x0; x0=in.read_short(); final org.omg.CORBA.PolicyError result = new org.omg.CORBA.PolicyError(id, x0); return result; } public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.CORBA.PolicyError s)
public static org.omg.CORBA.PolicyError read (final org.omg.CORBA.portable.InputStream in) { String id = in.read_string(); if (!id.equals(id())) throw new org.omg.CORBA.MARSHAL("wrong id: " + id); short x0; x0=in.read_short(); final org.omg.CORBA.PolicyError result = new org.omg.CORBA.PolicyError(id, x0); return result; } public static void write (final org.omg.CORBA.portable.OutputStream out, final org.omg.CORBA.PolicyError s)
public Policy create_policy(int type, Any value) throws org.omg.CORBA.PolicyError { switch (type) { case SecMechanismsPolicy.value: return new MechanismPolicy(value); case SecInvocationCredentialsPolicy.value: return new InvocationCredentialsPolicy(value); case SecQOPPolicy.value: return new QOPPolicy(value); case SecEstablishTrustPolicy.value: return new EstablishTrustPolicy(value); case SecDelegationDirectivePolicy.value: return new DelegationDirectivePolicy(value); case SecGSSUPPolicy.value: return new GSSUPPolicy(value); } throw new org.omg.CORBA.PolicyError (org.omg.CORBA.BAD_POLICY.value); }
throw new org.omg.CORBA.PolicyError();
throw new org.omg.CORBA.PolicyError(org.omg.CORBA.BAD_POLICY.value); } catch (org.omg.CORBA.BAD_OPERATION ex) { throw new org.omg.CORBA.PolicyError( org.omg.CORBA.BAD_POLICY_TYPE.value);