private void createExtendedObject(String realm,String fedId,String location,String role,Map keys) throws WSFederationMetaException, JAXBException, AMConsoleException {
  try {
    ObjectFactory objFactory=new ObjectFactory();
    WSFederationMetaManager metaManager=getWSFederationMetaManager();
    FederationElement edes=metaManager.getEntityDescriptor(realm,fedId);
    if (edes == null) {
      if (debug.warningEnabled()) {
        debug.warning("WSFedPropertiesModelImpl.createExtendedObject: " + "No such entity: " + fedId);
      }
      String[] data={realm,fedId};
      throw new WSFederationMetaException("fedId_invalid",data);
    }
    FederationConfigElement eConfig=metaManager.getEntityConfig(realm,fedId);
    if (eConfig == null) {
      BaseConfigType bctype=null;
      FederationConfigElement ele=objFactory.createFederationConfigElement();
      ele.setFederationID(fedId);
      if (location.equals("remote")) {
        ele.setHosted(false);
      }
      List ll=ele.getIDPSSOConfigOrSPSSOConfig();
      if (isDualRole(edes)) {
        BaseConfigType bctype_idp=null;
        BaseConfigType bctype_sp=null;
        bctype_idp=objFactory.createIDPSSOConfigElement();
        bctype_idp=createAttributeElement(keys,bctype_idp);
        bctype_sp=objFactory.createSPSSOConfigElement();
        bctype_sp=createAttributeElement(keys,bctype_sp);
        ll.add(bctype_idp);
        ll.add(bctype_sp);
      }
 else       if (role.equals(IDENTITY_PROVIDER)) {
        bctype=objFactory.createIDPSSOConfigElement();
        bctype=createAttributeElement(keys,bctype);
        ll.add(bctype);
      }
 else       if (role.equals(SERVICE_PROVIDER)) {
        bctype=objFactory.createSPSSOConfigElement();
        bctype=createAttributeElement(keys,bctype);
        ll.add(bctype);
      }
      metaManager.setEntityConfig(realm,ele);
    }
  }
 catch (  JAXBException e) {
    debug.warning("WSFedPropertiesModelImpl.createExtendedObject",e);
    throw new AMConsoleException(getErrorString(e));
  }
catch (  WSFederationMetaException e) {
    debug.warning("WSFedPropertiesModelImpl.createExtendedObject",e);
    throw new AMConsoleException(getErrorString(e));
  }
}

private void createExtendedObject ( String realm , String fedId , String location , String role , Map keys ) throws WSFederationMetaException , JAXBException , AMConsoleException { try { ObjectFactory objFactory = new ObjectFactory ( ) ; WSFederationMetaManager metaManager = getWSFederationMetaManager ( ) ; FederationElement edes = metaManager . getEntityDescriptor ( realm , fedId ) ; if ( edes == null ) { if ( debug . warningEnabled ( ) ) { debug . warning ( "WSFedPropertiesModelImpl.createExtendedObject: " + "No such entity: " + fedId ) ; } String [ ] data = { realm , fedId } ; throw new WSFederationMetaException ( "fedId_invalid" , data ) ; } FederationConfigElement eConfig = metaManager . getEntityConfig ( realm , fedId ) ; if ( eConfig == null ) { BaseConfigType bctype = null ; FederationConfigElement ele = objFactory . createFederationConfigElement ( ) ; ele . setFederationID ( fedId ) ; if ( location . equals ( "remote" ) ) { ele . setHosted ( false ) ; } List ll = ele . getIDPSSOConfigOrSPSSOConfig ( ) ; if ( isDualRole ( edes ) ) { BaseConfigType bctype_idp = null ; BaseConfigType bctype_sp = null ; bctype_idp = objFactory . createIDPSSOConfigElement ( ) ; bctype_idp = createAttributeElement ( keys , bctype_idp ) ; bctype_sp = objFactory . createSPSSOConfigElement ( ) ; bctype_sp = createAttributeElement ( keys , bctype_sp ) ; ll . add ( bctype_idp ) ; ll . add ( bctype_sp ) ; } else if ( role . equals ( IDENTITY_PROVIDER ) ) { bctype = objFactory . createIDPSSOConfigElement ( ) ; bctype = createAttributeElement ( keys , bctype ) ; ll . add ( bctype ) ; } else if ( role . equals ( SERVICE_PROVIDER ) ) { bctype = objFactory . createSPSSOConfigElement ( ) ; bctype = createAttributeElement ( keys , bctype ) ; ll . add ( bctype ) ; } metaManager . setEntityConfig ( realm , ele ) ; } } catch ( JAXBException e ) { debug . warning ( "WSFedPropertiesModelImpl.createExtendedObject" , e ) ; throw new AMConsoleException ( getErrorString ( e ) ) ; } catch ( WSFederationMetaException e ) { debug . warning ( "WSFedPropertiesModelImpl.createExtendedObject" , e ) ; throw new AMConsoleException ( getErrorString ( e ) ) ; } }
creates the extended config object when it does not exist .
