Package org.jvnet.hk2.config

Examples of org.jvnet.hk2.config.Element


        for (int inum = num; inum < max; inum++) {
            if (!allPorts.contains(inum))
                return inum;
        }
        throw new TransactionFailure(Strings.get("PortManager.noFreePort", num, max));
    }
View Full Code Here


                 * helper to return the DN for that alias (or the DN if that's
                 * what the user specified).
                 */
                instance.setDn(helper.getDN(value, isAlias));
            } catch (Exception ex) {
                throw new TransactionFailure("create", ex);
            }
        }
View Full Code Here

                File libraryFile = new File(libDir, libraryName);
                if (libraryFile.exists()) {
                    FileUtils.deleteFile(libraryFile);
                    PropertyChangeEvent pe = new PropertyChangeEvent(libDir,
                        "remove-library", libraryFile, null);
                    UnprocessedChangeEvent uce = new UnprocessedChangeEvent(
                        pe, "remove-library");
                    unprocessed.add(uce);
                } else {
                    msg.append(localStrings.getLocalString("lfnf","Library file not found", libraryFile.getAbsolutePath()));
                }
View Full Code Here

                                    }
                                } else if (a.equals(SERVER_LOG_FILE_PROPERTY)) {
                                    //check if file name was changed and send notification
                                    if (!val.equals(serverLogFileDetail)) {
                                        PropertyChangeEvent pce = new PropertyChangeEvent(this, a, serverLogFileDetail, val);
                                        UnprocessedChangeEvents ucel = new UnprocessedChangeEvents(new UnprocessedChangeEvent(pce, "server log filename changed."));
                                        List<UnprocessedChangeEvents> b = new ArrayList();
                                        b.add(ucel);
                                        ucl.unprocessedTransactedEvents(b);
                                    }
                                } else if (a.equals(HANDLER_PROPERTY)) {
View Full Code Here

        }
    }

    public void generateAttributeChangeEvent(String property, String propertyDetail, Map props) {
        PropertyChangeEvent pce = new PropertyChangeEvent(this, property, propertyDetail, props.get(property));
        UnprocessedChangeEvents ucel = new UnprocessedChangeEvents(new UnprocessedChangeEvent(pce, "server log file attribute " + property + " changed."));
        List<UnprocessedChangeEvents> b = new ArrayList();
        b.add(ucel);
        ucl.unprocessedTransactedEvents(b);
    }
View Full Code Here

                report.setActionExitCode(ActionReport.ExitCode.WARNING);
                report.setMessage(msg.toString());
            }

            // set the restart required flag
            UnprocessedChangeEvents uces = new UnprocessedChangeEvents(
                unprocessed);
            List<UnprocessedChangeEvents> ucesList =
                new ArrayList<UnprocessedChangeEvents>();
            ucesList.add(uces);
            ucl.unprocessedTransactedEvents(ucesList);
View Full Code Here

                                    }
                                } else if (a.equals(SERVER_LOG_FILE_PROPERTY)) {
                                    //check if file name was changed and send notification
                                    if (!val.equals(serverLogFileDetail)) {
                                        PropertyChangeEvent pce = new PropertyChangeEvent(this, a, serverLogFileDetail, val);
                                        UnprocessedChangeEvents ucel = new UnprocessedChangeEvents(new UnprocessedChangeEvent(pce, "server log filename changed."));
                                        List<UnprocessedChangeEvents> b = new ArrayList();
                                        b.add(ucel);
                                        ucl.unprocessedTransactedEvents(b);
                                    }
                                } else if (a.equals(HANDLER_PROPERTY)) {
View Full Code Here

        }
    }

    public void generateAttributeChangeEvent(String property, String propertyDetail, Map props) {
        PropertyChangeEvent pce = new PropertyChangeEvent(this, property, propertyDetail, props.get(property));
        UnprocessedChangeEvents ucel = new UnprocessedChangeEvents(new UnprocessedChangeEvent(pce, "server log file attribute " + property + " changed."));
        List<UnprocessedChangeEvents> b = new ArrayList();
        b.add(ucel);
        ucl.unprocessedTransactedEvents(b);
    }
View Full Code Here

            List<String> vsList = StringUtils.parseStringList(vsIDs, " ,");
            if (httpService != null && vsList != null && !vsList.isEmpty()) {
                for (VirtualServer vsBean : httpService.getVirtualServer()) {
                    if (vsList.contains(vsBean.getId())) {
                        Boolean csr = null;
                        Property prop = vsBean.getProperty("contextXmlDefault");
                        if (prop != null) {
                            File contextXml = new File(serverEnvironment.getInstanceRoot(),
                                    prop.getValue());
                            if (contextXml.exists()) {  // vs context.xml
                                ContextXmlParser parser = new ContextXmlParser(contextXml);
                                csr = parser.getClearReferencesStatic();
                            }
                        }
View Full Code Here

    @DuckTyped
    String getGroupMapping();

    class Duck {
        public static String getGroupMapping(AuthRealm me) {
            Property prop = me.getProperty("group-mapping"); //have to hard-code this, unfortunately :(
            if (prop != null)
                return prop.getValue();
            return null;
        }
View Full Code Here

TOP

Related Classes of org.jvnet.hk2.config.Element

Copyright © 2018 www.massapicom. 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.