Examples of DbProperties


Examples of de.mhus.lib.adb.util.DbProperties

      caoBundle = new MetadataBundle(NoneDriver.getInstance());

    // schema info
    if (schema.hasPersistentInfo()) {
      addClass(schema.getSchemaName(),schema.getClass().getCanonicalName(),Property.class,con);
      schemaPersistence = new DbProperties(this, schema.getClass().getCanonicalName());
    }
   
    // classes
    for (Class<?> clazz : types) {
      addClass(null,clazz.getCanonicalName(),clazz,con);
View Full Code Here

Examples of org.jivesoftware.xmpp.workgroup.DbProperties

        }
        workgroup.send(reply);
    }

    private boolean isOwner(String jid, Workgroup workgroup) {
        DbProperties props = workgroup.getProperties();
        // Add monitors if you wish :)
        String monitors = props.getProperty("monitors");
        if (monitors != null) {
            StringTokenizer tkn = new StringTokenizer(monitors, ",");
            while (tkn.hasMoreTokens()) {
                String monitor = tkn.nextToken();
                if (monitor.equalsIgnoreCase(jid)) {
View Full Code Here

Examples of org.jivesoftware.xmpp.workgroup.DbProperties

        if (workgroup == null) {
            return;
        }


        DbProperties props = workgroup.getProperties();
        String context = "jive.transcript";
        String from = props.getProperty(context + ".from");
        if (from == null) {
            from = workgroup.getJID().toBareJID();
        }

        String fromEmail = props.getProperty(context + ".fromEmail");
        if (fromEmail == null) {
            fromEmail = workgroup.getJID().toBareJID();
        }

        String subject = props.getProperty(context + ".subject");
        if (subject == null) {
            subject = "Chat transcript";
        }

        String message = props.getProperty(context + ".message");
        if (message == null) {
            message = "";
        }

View Full Code Here

Examples of org.jivesoftware.xmpp.workgroup.DbProperties

        xstream.alias("macrogroup", MacroGroup.class);


        for (Workgroup workgroup : workgroupManager.getWorkgroups()) {
            // Load from DB.
            DbProperties prop = workgroup.getProperties();
            String macros = prop.getProperty("jive.macro" + workgroup.getID());
            if (ModelUtil.hasLength(macros)) {
                MacroGroup group = (MacroGroup)xstream.fromXML(macros);
                rootGroups.put(workgroup, group);
            }
        }
View Full Code Here

Examples of org.jivesoftware.xmpp.workgroup.DbProperties

        long id = workgroup.getID();
        MacroGroup group = getMacroGroup(workgroup);

        String saveString = xstream.toXML(group);

        DbProperties props = workgroup.getProperties();
        try {
            props.deleteProperty("jive.macro" + id);
            props.setProperty("jive.macro" + id, saveString);
        }
        catch (UnauthorizedException e) {
           Log.error(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.jivesoftware.xmpp.workgroup.DbProperties

        WorkgroupForm workgroupForm = getWebForm(workgroup);
        if (workgroupForm != null) {
            XStream xstream = new XStream();
            String xmlToSave = xstream.toXML(workgroupForm);

            DbProperties props = workgroup.getProperties();
            String context = "jive.webform.wg";
            try {
                props.deleteProperty(context);

                props.setProperty(context, xmlToSave);
            }
            catch (UnauthorizedException e) {
                Log.error(e.getMessage(), e);
            }
        }
View Full Code Here

Examples of org.jivesoftware.xmpp.workgroup.DbProperties

        }

        XStream xstream = new XStream();
        String xmlToSave = xstream.toXML(dataForm);

        DbProperties props = workgroup.getProperties();
        String context = "jive.dataform.wg";
        try {
            props.deleteProperty(context);

            props.setProperty(context, xmlToSave);
        }
        catch (UnauthorizedException e) {
            Log.error(e.getMessage(), e);
        }
View Full Code Here

Examples of org.jivesoftware.xmpp.workgroup.DbProperties

        }


        if ("macros".equals(name) && !isPersonal) {
            Element globalMacros = reply.setChildElement("macros", "http://jivesoftware.com/protocol/workgroup");
            DbProperties props = workgroup.getProperties();
            String macroModel = props.getProperty("jive.macro" + workgroup.getID());
            if (ModelUtil.hasLength(macroModel)) {
                globalMacros.addElement("model").setText(macroModel);
            }
            else {
                sendItemNotFound(packet, workgroup);
                return;
            }
        }
        else if (isPersonal) {
            Element personalMacros = reply.setChildElement("macros", "http://jivesoftware.com/protocol/workgroup");
            DbProperties props = agent.getProperties();
            String macroModel = props.getProperty("personal.macro");
            if (ModelUtil.hasLength(macroModel)) {
                personalMacros.addElement("model").setText(macroModel);
            }
            else {
                sendItemNotFound(packet, workgroup);
View Full Code Here

Examples of org.jivesoftware.xmpp.workgroup.DbProperties

        }

    }

    public DataForm getDataForm(Workgroup workgroup) {
        DbProperties props = workgroup.getProperties();
        String context = "jive.dataform.wg";
        String form = props.getProperty(context);

        if (form != null) {
            XStream xstream = new XStream();
            xstream.setClassLoader(this.getClass().getClassLoader());
View Full Code Here

Examples of org.jivesoftware.xmpp.workgroup.DbProperties

        String personalMacro = iq.element("personalMacro").getTextTrim();
        try {
            // Verify that an agent is requesting this information.
            Agent agent = workgroup.getAgentManager().getAgent(packet.getFrom());

            DbProperties props = agent.getProperties();
            XStream xstream = new XStream();
            xstream.alias("macro", Macro.class);
            xstream.alias("macrogroup", MacroGroup.class);
            MacroGroup group = (MacroGroup)xstream.fromXML(personalMacro);

            String saveString = xstream.toXML(group);

            try {
                props.deleteProperty("personal.macro");
                props.setProperty("personal.macro", saveString);
            }
            catch (UnauthorizedException e) {
                Log.error(e.getMessage(), e);
            }
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.