code: public EventDefinitionType<PortletDescriptor> getOrCreateEventDefinition()
     {
        List<Node> nodeList = model.get("event-definition");
        if (nodeList != null &&  nodeList.size() > 0)
        {
           return new EventDefinitionTypeImpl<PortletDescriptor>(this, "event-definition", model, nodeList.get(0));
        }
        return createEventDefinition();
     }
docs: If not already created, a new <code>event-definition</code> element will be created and returned.
  Otherwise, the first existing <code>event-definition</code> element will be returned.
  @return the instance defined for the element <code>event-definition</code>