/** * Discriminate special NF interfaces * * <ul> * <li>COLLECTION: ignored, they are dynamically generated * <li>CONTENT: if primitive, ignore it * <li>BINDING: if primitive and DOESN'T HAVE F client interfaces, ignore it * </ul> * * @return true if 'special case', faslse otherwise */ private boolean specialCasesForNfType( String itfName, PAGCMInterfaceType itfType, boolean isPrimitive) { // COLLECTION interfaces are ignored, because they are generated dynamically if (itfType.isFcCollectionItf()) { return true; } // CONTENT controller is not created for primitives if (Constants.CONTENT_CONTROLLER.equals(itfName) && !itfType.isFcClientItf() && !itfType.isInternal() && isPrimitive) { // logger.warn("Ignored NF Interface '"+ Constants.CONTENT_CONTROLLER +"' declared for // component '"+ this.componentParameters.getName() + "'"); return true; } // BINDING controller is not created for primitives without client interfaces except if it has // an internal server interface if (Constants.BINDING_CONTROLLER.equals(itfName) && !itfType.isFcClientItf() && !itfType.isInternal() && isPrimitive) { if ((Utils.getClientItfTypes(this.componentParameters.getComponentType()).length == 0) && !hasNfInternalServerInterfaces()) { // logger.warn("Ignored NF Interface '"+ Constants.BINDING_CONTROLLER +"' declared for // component '"+ this.componentParameters.getName() + "'"); return true; } } return false; }
/** * Discriminate special controller interfaces * * <ul> * <li>COLLECTION: ignored??? (TODO:check if this is needed) * <li>CONTENT: if primitive, ignore it * <li>BINDING: if primitive and DOESN'T HAVE F client interfaces, ignore it * <li>Avoid duplicates * </ul> * * @param controllerName * @param itfType * @param isPrimitive * @return */ private boolean specialCasesForController( String controllerName, PAGCMInterfaceType itfType, boolean isPrimitive, String controllersConfigFileLocation) { // COLLECTION interfaces are ignored, because they are generated dynamically (and an object // controller shouldn't be a collection, right?) // if(itfType.isFcCollectionItf()) { // return true; // } // CONTENT controller is not created for primitives if (Constants.CONTENT_CONTROLLER.equals(controllerName) && !itfType.isFcClientItf() && !itfType.isInternal() && isPrimitive) { // logger.warn("Ignored controller '"+ Constants.CONTENT_CONTROLLER +"' declared for component // '"+ this.componentParameters.getName() + "' in file: "+ controllersConfigFileLocation); return true; } // BINDING controller is not created for primitives without client interfaces except if it has // an internal server interface if (Constants.BINDING_CONTROLLER.equals(controllerName) && !itfType.isFcClientItf() && !itfType.isInternal() && isPrimitive) { if ((Utils.getClientItfTypes(this.componentParameters.getComponentType()).length == 0) && !hasNfInternalServerInterfaces()) { // logger.warn("Ignored controller '"+ Constants.BINDING_CONTROLLER +"' declared for // component '"+ this.componentParameters.getName() + "' in file: "+ // controllersConfigFileLocation); return true; } } // Controller interface had already been declared (f.e., in the NF Type). Do not create this // controller. if (existsNfInterface(controllerName)) { // logger.warn("Controller interface '"+ controllerName +"' already created. Ignoring this // controller."); return true; } return false; }