Examples of MwMleSourceJpaController


Examples of com.intel.mtwilson.as.controller.MwMleSourceJpaController

                                                        mleData.getOsVersion(), mleData.getOemName());
                                    } catch (NoResultException nre){
                                        throw new ASException(nre,ErrorCode.WS_MLE_DOES_NOT_EXIST, mleData.getName(), mleData.getVersion());
                                    }

                                    MwMleSourceJpaController mleSourceJpaController = new MwMleSourceJpaController(getEntityManagerFactory());

                                    // Let us check if there is a mapping entry already for this MLE. If it does, then we need to return
                                    // back appropriate error.
                                    MwMleSource mleSourceCurrentObj = mleSourceJpaController.findByMleId(tblMle.getId());

                                    if (mleSourceCurrentObj != null) {
                                        log.error("White List host is already mapped to the MLE - " + tblMle.getName());
                                        throw new ASException(ErrorCode.WS_MLE_SOURCE_MAPPING_ALREADY_EXISTS, mleData.getName());
                                    }

                                    // Else create a new entry in the DB.
                                    MwMleSource mleSourceData = new MwMleSource();
                                    mleSourceData.setMleId(tblMle);
                                    mleSourceData.setHostName(mleSourceObj.getHostName());       

                                    mleSourceJpaController.create(mleSourceData);

                                } catch (ASException ase) {
                                        throw ase;
                                } catch (Exception e) {
                                    throw new ASException(e);
View Full Code Here

Examples of com.intel.mtwilson.as.controller.MwMleSourceJpaController

                                    mleData.getOsVersion(), mleData.getOemName());
                } catch (NoResultException nre){
                    throw new ASException(nre,ErrorCode.WS_MLE_DOES_NOT_EXIST, mleData.getName(), mleData.getVersion());
                }
                               
                MwMleSourceJpaController mleSourceJpaController = new MwMleSourceJpaController(getEntityManagerFactory());
                // If the mapping does not exist already in the db, then we need to return back error.
                MwMleSource mwMleSource = mleSourceJpaController.findByMleId(tblMle.getId());
                if (mwMleSource == null) {
                    throw new ASException(ErrorCode.WS_MLE_SOURCE_MAPPING_DOES_NOT_EXIST, mleData.getName());
                }
               
                mwMleSource.setHostName(mleSourceObj.getHostName());       
                mleSourceJpaController.edit(mwMleSource);
               
            } catch (ASException ase) {
                    throw ase;
            } catch (Exception e) {
                throw new ASException(e);
View Full Code Here

Examples of com.intel.mtwilson.as.controller.MwMleSourceJpaController

                } catch (NoResultException nre){
                    throw new ASException(nre,ErrorCode.WS_MLE_DOES_NOT_EXIST, mleName, mleVersion);
                }
                               
                MwMleSourceJpaController mleSourceJpaController = new MwMleSourceJpaController(getEntityManagerFactory());
                MwMleSource mwMleSource = mleSourceJpaController.findByMleId(tblMle.getId());
                // If the mapping does not exist, it is ok. We don't need to worry. Actually for MLES
                // configured manully, this entry does not exist.
                if  (mwMleSource != null)                               
                    mleSourceJpaController.destroy(mwMleSource.getId());
               
            } catch (ASException ase) {
                    throw ase;
            } catch (Exception e) {
                throw new ASException(e);
View Full Code Here

Examples of com.intel.mtwilson.as.controller.MwMleSourceJpaController

                } catch (NoResultException nre){
                    throw new ASException(nre,ErrorCode.WS_MLE_DOES_NOT_EXIST, mleName, mleVersion);
                }
                               
                MwMleSourceJpaController mleSourceJpaController = new MwMleSourceJpaController(getEntityManagerFactory());
                MwMleSource mwMleSource = mleSourceJpaController.findByMleId(tblMle.getId());
               
                // Now check if the data exists in the MLE Source table. If there is no corresponding entry, then we know that
                // the MLE was configured manually.
                if (mwMleSource == null) {
                    hostName = "Manually configured white list";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.