Sets the plugin definition for this element.

@param definition The plugin definition.
162645
public void setDefinition(PluginDefinition definition) {
        if (this.definition != null) {
            if (this.definition == definition) {
                return;
            }
            
            CWFException.raise("Cannot modify plugin definition.");
        }
        
        this.definition = definition;
        
        // Assign any default property values.
        if (definition != null) {
            for (PropertyInfo propInfo : definition.getProperties()) {
                String dflt = propInfo.getDefault();
                
                if (dflt != null) {
                    try {
                        propInfo.setPropertyValue(this, dflt);
                    } catch (Exception e) {
                        log.error("Error setting default value for property " + propInfo.getName(), e);
                    }
                }
            }
        }
    }
612211
public void addBindingsType(TDefinitions definitions)
    {
        String interfacens;
        String interfacename;
        QName qname;
        String value;
        String name;
        
        if (soapFactory == null)
            soapFactory = new org.xmlsoap.schemas.wsdl.soap.ObjectFactory();
        
        // Create the bindings type
        TBinding binding = wsdlFactory.createTBinding();
        definitions.getAnyTopLevelOptionalElement().add(binding);
        name = this.getControlProperty(MessageControl.BINDING_NAME);
        binding.setName(name);
        interfacens = this.getNamespace();
        interfacename = this.getControlProperty(MessageControl.INTERFACE_NAME);
        qname = new QName(interfacens, interfacename);
        binding.setType(qname);
        //?LocalElement localElement = schemaFactory.createLocalElement();
        //?TBinding.getAny().add(localElement);
        org.xmlsoap.schemas.wsdl.soap.TBinding tBinding = soapFactory.createTBinding();
        binding.getAny().add(soapFactory.createBinding(tBinding));
        interfacens = this.getControlProperty(SOAP_URI);
        tBinding.setTransport(interfacens);
        tBinding.setStyle(org.xmlsoap.schemas.wsdl.soap.TStyleChoice.DOCUMENT);
        
        this.addBindingOperationTypes(binding);
    }
160689
protected void updatePluginContainer(PluginContainer value, String xmlTag, Counter counter, Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         iteratePlugin(innerCount, root, value.getPlugins(), "plugins", "plugin");
      }
   }
235594
public void addPlugin(String pluginTypeName) {
		try {
			Class<?> pluginType = Class.forName(pluginTypeName);
			if (SimonConsolePlugin.class.isAssignableFrom(pluginType)) {
				addPlugin((Class<? extends SimonConsolePlugin>) pluginType);
			} else {
				throw new IllegalArgumentException("Invalid plugin type " + pluginTypeName);
			}
		} catch (ClassNotFoundException classNotFoundException) {
			throw new IllegalArgumentException("Invalid plugin type " + pluginTypeName, classNotFoundException);
		}
	}
300585
public void setContext(Context context) {
        context.put(JavacElements.class, this);
        javaCompiler = JavaCompiler.instance(context);
        syms = Symtab.instance(context);
        names = Names.instance(context);
        types = Types.instance(context);
        enter = Enter.instance(context);
    }
291639
function (plugin) {
                var plugins = [], self = this, isString = typeof plugin === 'string';
                util.each(self.get('plugins'), function (p) {
                    var keep = 0, pluginId;
                    if (plugin) {
                        if (isString) {
                            // user defined takes priority
                            pluginId = p.get && p.get('pluginId') || p.pluginId;
                            if (pluginId !== plugin) {
                                plugins.push(p);
                                keep = 1;
                            }
                        } else {
                            if (p !== plugin) {
                                plugins.push(p);
                                keep = 1;
                            }
                        }
                    }
                    if (!keep) {
                        p.pluginDestructor(self);
                    }
                });
                self.setInternal('plugins', plugins);
                return self;
            }
1257089
function (key, value) {
                if (docMode8) { // IE8 setAttribute bug
                    this.element[key] = value;
                } else {
                    this.element.setAttribute(key, value);
                }
            }
37904
protected void updatePluginConfiguration(PluginConfiguration value, String xmlTag, Counter counter,
            Element element)
   {
      boolean shouldExist = value != null;
      Element root = updateElement(counter, element, xmlTag, shouldExist);
      if (shouldExist)
      {
         Counter innerCount = new Counter(counter.getDepth() + 1);
         updatePluginManagement(value.getPluginManagement(), "pluginManagement", innerCount, root);
         iteratePlugin(innerCount, root, value.getPlugins(), "plugins", "plugin");
      }
   }
1076321
public void registerContentDefinition(CmsContentDefinition definition) {

        getWidgetService().addConfigurations(definition.getConfigurations());
        CmsType baseType = definition.getTypes().get(definition.getEntityTypeName());
        m_entityBackend.registerTypes(baseType, definition.getTypes());
        for (CmsEntity entity : definition.getEntities().values()) {
            CmsEntity previousValue = m_entityBackend.getEntity(entity.getId());
            if (previousValue != null) {
                m_entityBackend.changeEntityContentValues(previousValue, entity);
            } else {
                m_entityBackend.registerEntity(entity);
                m_registeredEntities.add(entity.getId());
            }
        }
        for (Map.Entry<String, CmsComplexWidgetData> entry : definition.getComplexWidgetData().entrySet()) {
            String attrName = entry.getKey();
            CmsComplexWidgetData widgetData = entry.getValue();
            getWidgetService().registerComplexWidgetAttribute(
                attrName,
                widgetData.getRendererName(),
                widgetData.getConfiguration());
        }
    }
963297
void addContentDefinition(CmsContentDefinition definition) {

        m_definitions.put(definition.getLocale(), definition);
        m_contentLocales.add(definition.getLocale());
    }
125228
protected function _set($name, $definition, $type)
    {
        if ($definition instanceof Closure) {
            $definition = $definition->bindTo($this, get_class($this));
        }
        $this->_definitions[$name] = compact('definition', 'type');
    }
1281706
public void register(final FieldDefinition definition) {
        //ensure that we can't register a mandatory definition if there are already optional ones
        boolean hasOptionalField = false;
        for (final FieldDefinition fieldDefinition : fields.values()) {
            if (fieldDefinition.isOptional()) {
                hasOptionalField = true;
                break;
            }
        }
        if (!definition.isOptional() && hasOptionalField) {
            throw new IllegalArgumentException("Can't register mandatory definition after a optional definition.");
        }
        fields.put(definition.getFieldName(), definition);
    }
763256
public UpdateServiceActionRequest withDefinition(java.util.Map<String, String> definition) {
        setDefinition(definition);
        return this;
    }
289270
void putDefinitions(InternalQName name, NodeTypeData nodeType)
   {

      // put child node defs
      NodeDefinitionData[] nodeDefs = nodeType.getDeclaredChildNodeDefinitions();
      for (NodeDefinitionData nodeDef : nodeDefs)
      {
         // put required node type defs
         for (InternalQName rnt : nodeDef.getRequiredPrimaryTypes())
         {
            addNodeDefinitionDataInternal(name, nodeDef.getName(), rnt, nodeDef);
            if (LOG.isDebugEnabled())
            {
               LOG.debug("NodeDef added: parent NT: " + name.getAsString() + " child nodeName: "
                  + nodeDef.getName().getAsString() + " childNT: " + rnt.getAsString());
            }
         }

         // put default node definition
         addNodeDefinitionDataInternal(name, nodeDef.getName(), nodeDef);

         if (LOG.isDebugEnabled())
         {
            LOG.debug("Default NodeDef added: parent NT: " + name.getAsString() + " child nodeName: "
               + nodeDef.getName());
         }
      }

      // put prop defs
      PropertyDefinitionData[] propDefs = nodeType.getDeclaredPropertyDefinitions();
      for (PropertyDefinitionData propDef : propDefs)
      {
         addPropertyDefinitionInternal(name, propDef.getName(), propDef.isMultiple(), propDef);

         if (LOG.isDebugEnabled())
         {
            LOG.debug("PropDef added: parent NT: " + name.getAsString() + " child propName: "
               + propDef.getName().getAsString() + " isMultiple: " + propDef.isMultiple());
         }
      }

   }
554121
public void set(Element element) {
        if (element == null) {
            throw new NullPointerException("element == null");
        }

        CstString pairName = new CstString(element.getName());
        Constant pairValue = Element.toConstant(element.getValue());
        NameValuePair nameValuePair = new NameValuePair(pairName, pairValue);
        elements.put(element.getName(), nameValuePair);
    }
1199928
function Plugin( element ) {
        this.element = element;
        this.jqElement = $(element);
        this.isScaleActive = false;

        this._defaults = defaults;
        this._name = pluginName;
    }
1043921
public void setAbstract(final String description) {
        if (description == null && this.description == null) {
            return;
        } else if (description == null) {
            removeChild(this.description);
            this.description = null;
        } else if (this.description == null) {
            this.description = new KeyValueNode<String>(CommonConstants.CS_ABSTRACT_TITLE, description);
            appendChild(this.description, false);
        } else {
            this.description.setValue(description);
        }
    }