Examples of Description


Examples of javax.management.Description

        List<MBeanNotificationInfo> notificationInfos = new ArrayList<MBeanNotificationInfo>();

        instance = givenInstance;

        // class
        Description classDescription = annotatedMBean.getAnnotation(Description.class);
        description = getDescription(classDescription, "a MBean built by OpenEJB");

        NotificationInfo notification = annotatedMBean.getAnnotation(NotificationInfo.class);
        if (notification != null) {
            MBeanNotificationInfo notificationInfo = getNotificationInfo(notification);
            notificationInfos.add(notificationInfo);
        }

        NotificationInfos notifications = annotatedMBean.getAnnotation(NotificationInfos.class);
        if (notifications != null && notifications.value() != null) {
            for (NotificationInfo n : notifications.value()) {
                MBeanNotificationInfo notificationInfo = getNotificationInfo(n);
                notificationInfos.add(notificationInfo);
            }
        }


        // methods
        for (Method m : annotatedMBean.getMethods()) {
            int modifiers = m.getModifiers();
            if (m.getDeclaringClass().equals(Object.class)
                    || !Modifier.isPublic(modifiers)
                    || Modifier.isAbstract(modifiers)) {
                continue;
            }

            if (m.getAnnotation(ManagedAttribute.class) != null) {
                String methodName = m.getName();
                String attrName = methodName;
                if (((attrName.startsWith("get") && m.getParameterTypes().length == 0)
                        || (attrName.startsWith("set") && m.getParameterTypes().length == 1))
                        && attrName.length() > 3) {
                    attrName = attrName.substring(3);
                    if (attrName.length() > 1) {
                        attrName = Character.toLowerCase(attrName.charAt(0)) + attrName.substring(1);
                    } else {
                        attrName = attrName.toLowerCase();
                    }
                } else {
                    logger.warning("ignoring attribute " + m.getName() + " for " + annotatedMBean.getName());
                }

                if (methodName.startsWith("get")) {
                    getters.put(attrName, m);
                } else if (methodName.startsWith("set")) {
                    setters.put(attrName, m);
                }
            } else if (m.getAnnotation(ManagedOperation.class) != null) {
                operations.put(m.getName(), m);

                String operationDescr = "";
                Description descr = m.getAnnotation(Description.class);
                if (descr != null) {
                    operationDescr = getDescription(descr, "-");
                }

                operationInfos.add(new MBeanOperationInfo(operationDescr, m));
            }
        }

        for (Map.Entry<String, Method> e : getters.entrySet()) {
            String key = e.getKey();
            Method mtd = e.getValue();

            String attrDescr = "";
            Description descr = mtd.getAnnotation(Description.class);
            if (descr != null) {
                attrDescr = getDescription(descr, "-");
            }

            try {
View Full Code Here

Examples of net.fortuna.ical4j.model.property.Description

    // add timezone info..
    VTimeZone tz = timeZone.getVTimeZone();
   
    meeting.getProperties().add(tz.getTimeZoneId());
   
    meeting.getProperties().add(new Description(description));
   
    meeting.getProperties().add(new Sequence(1));
   
    // generate unique identifier (if not submitted)
    Uid ui = null;
View Full Code Here

Examples of nl.clockwork.mule.ebms.model.ebxml.Description

  {
    Error error = new Error();
    error.setCodeContext(Constants.EBMS_ERROR_CODE_CONTEXT);
    error.setLocation(location);
    error.setErrorCode(errorCode);
    error.setDescription(new Description());
    error.getDescription().setLang(language);
    error.getDescription().setValue(description);
    error.setSeverity(severity);
    return error;
  }
View Full Code Here

Examples of oms3.annotations.Description

            sb.append("</blockquote>");
            sb.append(NEWLINE);
            sb.append(NEWLINE);
        } else {
            // try with module description
            Description description = moduleClass.getAnnotation(Description.class);
            String descriptionStr = AnnotationUtilities.getLocalizedDescription(description);
            if (description != null) {
                sb.append("<h2>Description</h2>").append(NEWLINE);
                sb.append(NEWLINE);
                sb.append("<blockquote>");
View Full Code Here

Examples of org.amdatu.web.rest.doc.Description

            if (Modifier.isStatic(modifiers) || fieldType.isSynthetic()) {
                continue;
            }

            Description description = f.getAnnotation(Description.class);
            DefaultValue defaultValue = f.getAnnotation(DefaultValue.class);

            String swaggerType = convertToSwaggerType(models, fieldType);

            SwaggerModelProperty smp;
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.Description

    }
   
    private void handleDocs(Annotation[] anns, StringBuilder sb) {
        for (Annotation a : anns) {
            if (a.annotationType() == Description.class) {
                Description d = (Description)a;

                sb.append("<doc");
                if (d.lang().length() > 0) {
                    sb.append(" xml:lang=\"" + d.lang() + "\"");
                }
                if (d.title().length() > 0) {
                    sb.append(" title=\"" + d.title() + "\"");
                }
                sb.append(">");
                if (d.value().length() > 0) {
                    sb.append(d.value());
                } else if (d.docuri().length() > 0) {
                    InputStream is = null;
                    if (d.docuri().startsWith(CLASSPATH_PREFIX)) {
                        String path = d.docuri().substring(CLASSPATH_PREFIX.length());
                        is = ResourceUtils.getClasspathResourceStream(path, SchemaHandler.class,
                            BusFactory.getDefaultBus());
                        if (is != null) {
                            try {
                                sb.append(IOUtils.toString(is));
View Full Code Here

Examples of org.apache.geronimo.jee.security.Description

        // set the Subject Info
        SubjectInfo subject = securityFactory.createSubjectInfo();
        subject.setId("subjectinfo-id");
        subject.setRealm("subjectinfo-realm");
        Description description = securityFactory.createDescription();
        description.setValue("subjectinfo-description");
        subject.getDescription().add(description);
        applicationClient.setDefaultSubject(subject);

        // set the EJB Ref
        EjbRef ejbRef = namingFactory.createEjbRef();
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.Description

public class FunctionExtractor {
  public static void main(String [] args) throws Exception {
    System.out.println("<ClassList>");
    for (String arg : args) {
      Class<?> c = Class.forName(arg);
      Description d = c.getAnnotation(Description.class);
      if (d == null) {
        continue;
      }
      System.out.print("    <Class javaname=\"");
      System.out.print(c.getName());
      System.out.print("\" sqlname=\"");
      System.out.print(d.name());
      System.out.println("\" />");
    }
    System.out.println("</ClassList>");
  }
View Full Code Here

Examples of org.apache.jetspeed.om.portlet.Description

                       
                        if (newLocale != null && newDescription != null)
                        {
                            SecurityRoleRef secRoleRef = def.getSecurityRoleRef(securityRoleRef.getRoleName());
                            Locale locale = new Locale(newLocale);
                            Description targetDescription = null;
                           
                            for (Description description : secRoleRef.getDescriptions())
                            {
                                if (description.getLocale().equals(locale))
                                {
                                    targetDescription = description;
                                    break;
                                }
                            }
                           
                            if (targetDescription == null)
                            {
                                targetDescription = securityRoleRef.addDescription(newLocale);
                            }
                           
                            targetDescription.setDescription(newDescription);
                           
                            newLocale = null;
                            newDescription = null;
                        }

                        FeedbackPanel feed = (FeedbackPanel) getPage().get("feedback");
                       
                        try
                        {
                            registry.savePortletDefinition(def);
                            StringResourceModel resModel = new StringResourceModel("pam.details.action.status.portlet.saveOK", this, null, new Object [] { paNodeBean.getName() } );
                            feed.info(resModel.getString());
                        }
                        catch (RegistryException e)
                        {
                            logger.error("Failed to save portlet definition.", e);
                            StringResourceModel resModel = new StringResourceModel("pam.details.action.status.portlet.saveFailure", this, null, new Object [] { paNodeBean.getName(), e.getMessage() } );
                            feed.info(resModel.getString());
                        }
                    }
                };
            }

            @Override
            public void delete(IModel<DescriptionBean>[] fields)
            {
                FeedbackPanel feed = (FeedbackPanel) getPage().get("feedback");
               
                try
                {
                    PortletRegistry registry = ((AbstractAdminWebApplication) getApplication()).getServiceLocator().getPortletRegistry();
                    PortletApplication app = registry.getPortletApplication(paNodeBean.getApplicationName());
                    PortletDefinition def = app.getPortlet(paNodeBean.getName());
                    SecurityRoleRef secRoleRef = def.getSecurityRoleRef(securityRoleRef.getRoleName());
                   
                    if (secRoleRef != null)
                    {
                        for (Iterator<Description> it = secRoleRef.getDescriptions().iterator(); it.hasNext(); )
                        {
                            Description description = it.next();
                           
                            for (IModel<DescriptionBean> descriptionBeanModel : fields)
                            {
                                if (descriptionBeanModel.getObject().getLocale().equals(description.getLocale()))
                                {
                                    it.remove();
                                    break;
                                }
                            }
View Full Code Here

Examples of org.apache.juddi.datatype.Description

      statement.setString(1, tModelKey.toString());

      int listSize = descList.size();
      for (int descID = 0; descID < listSize; descID++)
      {
        Description desc = (Description) descList.elementAt(descID);

        statement.setInt(2, descID);
        statement.setString(3, desc.getLanguageCode());
        statement.setString(4, desc.getValue());

        if (log.isDebugEnabled()) {
            log.debug(
              "insert into " + tablePrefix + "TMODEL_DESCR table:\n\n\t"
                + insertSQL
                + "\n\t TMODEL_KEY="
                + tModelKey.toString()
                + "\n\t TMODEL_DESCR_ID="
                + descID
                + "\n\t LANG_CODE="
                + desc.getLanguageCode()
                + "\n\t DESCR="
                + desc.getValue()
                + "\n");
        }

        statement.executeUpdate();
      }
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.