Examples of AttributeType


Examples of org.apache.directory.shared.ldap.model.schema.AttributeType

        {
            String desc = value.getString();

            try
            {
                AttributeType attributeType = AT_DESCR_SCHEMA_PARSER.parseAttributeTypeDescription( desc );

                updateSchemas( attributeType );
            }
            catch ( ParseException pe )
            {
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.AttributeType

        entry.put( JCLASSNAME_ATTR, obj.getClass().getName() );
        entry.put( JSERIALDATA_ATTR, serialize( obj ) );

        // Add all the class names this object can be cast to:
        Class<?>[] classes = obj.getClass().getClasses();
        AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( JCLASSNAMES_ATTR );
        ServerAttribute javaClassNames = new DefaultServerAttribute( attributeType, JCLASSNAMES_ATTR );

        for ( int ii = 0; ii < classes.length; ii++ )
        {
            javaClassNames.add( classes[ii].getName() );
View Full Code Here

Examples of org.apache.geronimo.deployment.xbeans.AttributeType

        }
        // Build the realm GBean
        GbeanType realm = GbeanType.Factory.newInstance();
        realm.setName(data.getName());
        realm.setClass1("org.apache.geronimo.security.realm.GenericSecurityRealm");
        AttributeType realmName = realm.addNewAttribute();
        realmName.setName("realmName");
        realmName.setStringValue(data.getName());
        ReferenceType serverInfo = realm.addNewReference();
        serverInfo.setName2("ServerInfo");
        serverInfo.setName((String) PortletManager.getNameFor(request, PortletManager.getCurrentServer(request).getServerInfo()).getName().get("name"));
        XmlAttributeType config = realm.addNewXmlReference();
        // Construct the content to put in the XmlAttributeType
View Full Code Here

Examples of org.apache.geronimo.system.plugin.model.AttributeType

       
        attributeName = "attName";
    }
   
    public void testPropertyEditorIsCarriedByWriteXml() throws Exception {
        AttributeType attributeType = new AttributeType();
        gbeanType.getAttributeOrReference().add(attributeType);
        attributeType.setName(attributeName);
        attributeType.getContent().add("value");
        attributeType.setPropertyEditor("myPropertyEditor");
       
        GBeanOverride override = new GBeanOverride(gbeanType, new JexlExpressionParser());
        GbeanType copiedGBeanType = override.writeXml();
        assertEquals(1, copiedGBeanType.getAttributeOrReference().size());
        AttributeType copiedAttributeType = (AttributeType) copiedGBeanType.getAttributeOrReference().get(0);
        assertEquals(attributeType.getPropertyEditor(), copiedAttributeType.getPropertyEditor());
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.model.AttributeType

       
        assertEquals("bean", override.getAttribute(attributeName));
       
        GbeanType copiedGBeanType = override.writeXml();
        assertEquals(1, copiedGBeanType.getAttributeOrReference().size());
        AttributeType attributeType = (AttributeType) copiedGBeanType.getAttributeOrReference().get(0);
        assertEquals("bean", attributeType.getContent().get(0));
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.model.AttributeType

        GBeanOverride override = new GBeanOverride(gbeanType, new JexlExpressionParser());
        override.setAttribute(attributeName, new Bean(), Service.class.getName(), getClass().getClassLoader());
       
        GbeanType copiedGBeanType = override.writeXml();
        assertEquals(1, copiedGBeanType.getAttributeOrReference().size());
        AttributeType attributeType = (AttributeType) copiedGBeanType.getAttributeOrReference().get(0);
        assertEquals(BeanEditor.class.getName(), attributeType.getPropertyEditor());
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.model.AttributeType

        GBeanOverride override = new GBeanOverride(gbeanType, new JexlExpressionParser());
        override.setAttribute(attributeName, new Bean(), Bean.class.getName(), getClass().getClassLoader());
       
        GbeanType copiedGBeanType = override.writeXml();
        assertEquals(1, copiedGBeanType.getAttributeOrReference().size());
        AttributeType attributeType = (AttributeType) copiedGBeanType.getAttributeOrReference().get(0);
        assertNull(attributeType.getPropertyEditor());
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.model.AttributeType

        GBeanOverride override = new GBeanOverride(gbeanType, new JexlExpressionParser());
        override.setAttribute(attributeName, new Integer(1), int.class.getName(), getClass().getClassLoader());
       
        GbeanType copiedGBeanType = override.writeXml();
        assertEquals(1, copiedGBeanType.getAttributeOrReference().size());
        AttributeType attributeType = (AttributeType) copiedGBeanType.getAttributeOrReference().get(0);
        assertNull(attributeType.getPropertyEditor());
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.model.AttributeType

        GBeanOverride override = new GBeanOverride(gbeanType, new JexlExpressionParser());
        override.setAttribute(attributeName, Collections.singleton("test"), Collection.class.getName(), getClass().getClassLoader());
       
        GbeanType copiedGBeanType = override.writeXml();
        assertEquals(1, copiedGBeanType.getAttributeOrReference().size());
        AttributeType attributeType = (AttributeType) copiedGBeanType.getAttributeOrReference().get(0);
        assertNull(attributeType.getPropertyEditor());
    }
View Full Code Here

Examples of org.apache.geronimo.system.plugin.model.AttributeType

        comment = gbean.getComment();

        // attributes
        for (Object o : gbean.getAttributeOrReference()) {
            if (o instanceof AttributeType) {
                AttributeType attr = (AttributeType) o;

                String propertyEditor = attr.getPropertyEditor();
                if (null != propertyEditor) {
                    propertyEditors.put(attr.getName(), propertyEditor);
                }
               
                if (attr.isNull()) {
                    getNullAttributes().add(attr.getName());
                } else {
                    String value;
                    try {
                        value = AttributesXmlUtil.extractAttributeValue(attr);
                    } catch (JAXBException e) {
                        throw new InvalidGBeanException("Could not extract attribute value from gbean override", e);
                    } catch (XMLStreamException e) {
                        throw new InvalidGBeanException("Could not extract attribute value from gbean override", e);
                    }
                    if (value == null || value.length() == 0) {
                        setClearAttribute(attr.getName());
                    } else {
                        String truevalue = (String) EncryptionManager.decrypt(value);
                        getAttributes().put(attr.getName(), truevalue);
                    }
                }
            } else if (o instanceof ReferenceType) {
                ReferenceType ref = (ReferenceType) o;
                if (ref.getPattern().isEmpty()) {
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.