Examples of CustomField


Examples of br.eti.kinoshita.testlinkjavaapi.model.CustomField

    /**
     * @param map
     * @return Custom Field.
     */
    public static final CustomField getCustomField(Map<String, Object> map) {
        CustomField customField = null;
        if (map != null && map.size() > 0) {
            // Sometimes we are working with CFs without ID
            customField = new CustomField();
            customField.setId(getInteger(map, TestLinkResponseParams.ID.toString()));
            customField.setDefaultValue(getString(map, TestLinkResponseParams.DEFAULT_VALUE.toString()));
            customField.setDisplayOrder(getInteger(map, TestLinkResponseParams.DISPLAY_ORDER.toString()));
            customField.setEnableOnDesign(getBoolean(map, TestLinkResponseParams.ENABLE_ON_DESIGN.toString()));
            customField.setEnableOnExecution(getBoolean(map, TestLinkResponseParams.ENABLE_ON_EXECUTION.toString()));
            customField.setEnableOnTestPlanDesign(getBoolean(map,
                    TestLinkResponseParams.ENABLE_ON_TEST_PLAN_DESIGN.toString()));
            customField.setLabel(getString(map, TestLinkResponseParams.LABEL.toString()));
            customField.setLengthMax(getInteger(map, TestLinkResponseParams.LENGTH_MAX.toString()));
            customField.setLengthMin(getInteger(map, TestLinkResponseParams.LENGTH_MIN.toString()));
            customField.setLocation(getInteger(map, TestLinkResponseParams.LOCATION.toString()));
            customField.setName(getString(map, TestLinkResponseParams.NAME.toString()));
            customField.setPossibleValues(getString(map, TestLinkResponseParams.POSSIBLE_VALUES.toString()));
            customField.setShowOnDesign(getBoolean(map, TestLinkResponseParams.SHOW_ON_DESIGN.toString()));
            customField.setShowOnExecution(getBoolean(map, TestLinkResponseParams.SHOW_ON_EXECUTION.toString()));
            customField.setShowOnTestPlanDesign(getBoolean(map,
                    TestLinkResponseParams.SHOW_ON_TEST_PLAN_DESIGN.toString()));
            customField.setType(getInteger(map, TestLinkResponseParams.TYPE.toString()));
            customField.setValidRegexp(getString(map, TestLinkResponseParams.VALID_REGEXP.toString()));
            customField.setValue(getString(map, TestLinkResponseParams.VALUE.toString()));

        }
        return customField;
    }
View Full Code Here

Examples of br.eti.kinoshita.testlinkjavaapi.model.CustomField

     * @throws TestLinkAPIException
     */
    protected CustomField getTestCaseCustomFieldDesignValue(Integer testCaseId, Integer testCaseExternalId,
            Integer versionNumber, Integer testProjectId, String customFieldName, ResponseDetails details)
            throws TestLinkAPIException {
        CustomField customField = null;

        try {
            Map<String, Object> executionData = new HashMap<String, Object>();
            executionData.put(TestLinkParams.TEST_CASE_ID.toString(), testCaseId);
            executionData.put(TestLinkParams.TEST_CASE_EXTERNAL_ID.toString(), testCaseExternalId);
            executionData.put(TestLinkParams.VERSION.toString(), versionNumber);
            executionData.put(TestLinkParams.TEST_PROJECT_ID.toString(), testProjectId);
            executionData.put(TestLinkParams.CUSTOM_FIELD_NAME.toString(), customFieldName);
            executionData.put(TestLinkParams.DETAILS.toString(), Util.getStringValueOrNull(details));

            Object response = this.executeXmlRpcCall(
                    TestLinkMethods.GET_TEST_CASE_CUSTOM_FIELD_DESIGN_VALUE.toString(), executionData);

            if (response instanceof String) {
                customField = new CustomField();
                customField.setValue(response.toString());
            } else if (response instanceof Map<?, ?>) {
                Map<String, Object> responseMap = Util.castToMap(response);
                customField = Util.getCustomField(responseMap);
            }

View Full Code Here

Examples of br.eti.kinoshita.testlinkjavaapi.model.CustomField

     * @throws TestLinkAPIException
     */
    protected CustomField getTestCaseCustomFieldTestPlanDesignValue(Integer testCaseId, Integer testCaseExternalId,
            Integer versionNumber, Integer testProjectId, String customFieldName, ResponseDetails details)
            throws TestLinkAPIException {
        CustomField customField = null;

        try {
            Map<String, Object> executionData = new HashMap<String, Object>();
            executionData.put(TestLinkParams.TEST_CASE_ID.toString(), testCaseId);
            executionData.put(TestLinkParams.TEST_CASE_EXTERNAL_ID.toString(), testCaseExternalId);
            executionData.put(TestLinkParams.VERSION.toString(), versionNumber);
            executionData.put(TestLinkParams.TEST_PROJECT_ID.toString(), testProjectId);
            executionData.put(TestLinkParams.CUSTOM_FIELD_NAME.toString(), customFieldName);
            executionData.put(TestLinkParams.DETAILS.toString(), Util.getStringValueOrNull(details));

            Object response = this.executeXmlRpcCall(
                    TestLinkMethods.GET_TEST_CASE_CUSTOM_FIELD_TEST_PLAN_DESIGN_VALUE.toString(), executionData);

            if (response instanceof String) {
                customField = new CustomField();
                customField.setValue(response.toString());
            } else if (response instanceof Map<?, ?>) {
                Map<String, Object> responseMap = Util.castToMap(response);
                customField = Util.getCustomField(responseMap);
            }

View Full Code Here

Examples of br.eti.kinoshita.testlinkjavaapi.model.CustomField

     * @throws TestLinkAPIException
     */
    protected CustomField getTestCaseCustomFieldExecutionValue(Integer testCaseId, Integer testCaseExternalId,
            Integer versionNumber, Integer executionId, Integer testProjectId, String customFieldName,
            ResponseDetails details) throws TestLinkAPIException {
        CustomField customField = null;

        try {
            Map<String, Object> executionData = new HashMap<String, Object>();
            executionData.put(TestLinkParams.TEST_CASE_ID.toString(), testCaseId);
            executionData.put(TestLinkParams.TEST_CASE_EXTERNAL_ID.toString(), testCaseExternalId);
            executionData.put(TestLinkParams.VERSION.toString(), versionNumber);
            executionData.put(TestLinkParams.TEST_PROJECT_ID.toString(), testProjectId);
            executionData.put(TestLinkParams.CUSTOM_FIELD_NAME.toString(), customFieldName);
            executionData.put(TestLinkParams.DETAILS.toString(), Util.getStringValueOrNull(details));
            executionData.put(TestLinkParams.EXECUTION_ID.toString(), executionId);

            Object response = this.executeXmlRpcCall(
                    TestLinkMethods.GET_TEST_CASE_CUSTOM_FIELD_EXECUTION_VALUE.toString(), executionData);

            if (response instanceof String) {
                customField = new CustomField();
                customField.setValue(response.toString());
            } else if (response instanceof Map<?, ?>) {
                Map<String, Object> responseMap = Util.castToMap(response);
                customField = Util.getCustomField(responseMap);
            }

View Full Code Here

Examples of com.atlassian.jira.issue.fields.CustomField

      initialiseEventTypeIds(eventTypeManager);

      // create service context to execute search with
      JiraServiceContextImpl jiraServiceContextImpl = new JiraServiceContextImpl(user);

      final CustomField securityLevel = customFieldManager.getCustomFieldObjectByName(SECURITY_LEVEL);
      final CustomField dateResolved = customFieldManager.getCustomFieldObjectByName(DATE_RESOLVED);       
      final CustomField dateResponded = customFieldManager.getCustomFieldObjectByName(DATE_RESPONDED);       
      final CustomField slaLastCalculated = customFieldManager.getCustomFieldObjectByName(SLA_LAST_CALCULATED);       
      final CustomField responseSlaState = customFieldManager.getCustomFieldObjectByName(RESPONSE_SLA_STATE);       
      final CustomField fixSlaState = customFieldManager.getCustomFieldObjectByName(FIX_KPI_STATE);       
      final CustomField timeElapsed = customFieldManager.getCustomFieldObjectByName(TIME_ELAPSED);       
      final CustomField onHold = customFieldManager.getCustomFieldObjectByName(ON_HOLD);       
//      final CustomField incidentPriority = customFieldManager.getCustomFieldObjectByName(INCIDENT_PRIORITY);


      final Iterator iterator = clientSLAConfigurations.iterator();
      while (iterator.hasNext()) {
View Full Code Here

Examples of com.centraview.customfield.CustomField

  {
    int elementID = Integer.parseInt(key);
    CustomFieldHome customFieldHome =(CustomFieldHome)CVUtility.getHomeObject("com.centraview.customfield.CustomFieldHome","CustomField");//call to CustomFieldEJB
    try
    {
      CustomField remote=(CustomField)customFieldHome.create();
      remote.setDataSource(this.dataSource);
      remote.deleteCustomField(indvID,elementID);
    }
    catch(Exception e)
    {
      logger.error("[Exception] CustomFieldList.deleteElement( int indvID, String key ) ", e);
    }
View Full Code Here

Examples of com.centraview.customfield.CustomField

    ArrayList resultDeleteLog = new ArrayList();
    CustomFieldHome customFieldHome=(CustomFieldHome)CVUtility.getHomeObject("com.centraview.customfield.CustomFieldHome","CustomField");
    try
    {
      //call to EJB server
      CustomField remote=(CustomField)customFieldHome.create();
      remote.setDataSource(this.dataSource);
      for (int i=0; i<recordID.length; i++)
      {
        if(recordID[i] != null && !recordID[i].equals("")){
          int elementID = Integer.parseInt(recordID[i]);
          remote.deleteCustomField(individualID,elementID);
        }//end of if(recordID[i] != null && !recordID[i].equals(""))
      }//end of for (int i=0; i<recordID.length; i++)       
    }//end of try block
    catch( CreateException e )
    {
View Full Code Here

Examples of com.centraview.customfield.CustomField

    CustomFieldHome cfh = (CustomFieldHome)CVUtility.getHomeObject(
        "com.centraview.customfield.CustomFieldHome", "CustomField");

    try {
      CustomField remote = cfh.create();
      remote.setDataSource(dataSource);

      remote.updateCustomField(custVo);

      CustomFieldVO cfvo = remote.getCustomField(fieldId);

      ContactFacadeHome contactFacadeHome = (ContactFacadeHome)CVUtility.getHomeObject(
          "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
      ContactFacade remoteContactFacade = contactFacadeHome.create();
      remoteContactFacade.setDataSource(dataSource);
View Full Code Here

Examples of com.centraview.customfield.CustomField

      CustomFieldVO cfvo = null;

      CustomFieldHome cfh = (CustomFieldHome)CVUtility.getHomeObject(
          "com.centraview.customfield.CustomFieldHome", "CustomField");
      CustomField remote = cfh.create();
      remote.setDataSource(dataSource);

      int userId = 0;
      if (session.getAttribute("userobject") != null) {
        userId = ((UserObject)session.getAttribute("userobject")).getIndividualID();
      }

      request.setAttribute("RECORDOPERATIONRIGHT", new Integer(CVUtility.getRecordPermission(
          userId, "CustomFields", recordID, dataSource)));

      cfvo = remote.getCustomField(Integer.parseInt(rowId[0]), recordID);
      cfvo.setRecordID(recordID);

      request.setAttribute("CustomFieldVO", cfvo);
      returnStatus = ".view.contacts.view_custom_field";
    } catch (Exception e) {
View Full Code Here

Examples of com.centraview.customfield.CustomField

        CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    DynaActionForm entityForm = (DynaActionForm)form;
    // moc Types.
    entityForm.set("mocTypeList", Globals.MOC_TYPE);
    // Get the custom field stuff and set it on the form.
    CustomField customField = null;
    try {
      customField = (CustomField)CVUtility.setupEJB("CustomField",
          "com.centraview.customfield.CustomFieldHome", dataSource);
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    // Only 8 custom fields fit on the detail screen so we have to pull only the
    // first 8 out.
    TreeMap customFieldMap = customField.getCustomFieldData("Entity");
    Collection customFieldValues = customFieldMap.values();
    int arraySize = customFieldValues.size() > 4 ? 4 : customFieldValues.size();
    CustomFieldVO[] fieldArray = new CustomFieldVO[arraySize];
    Iterator i = customFieldValues.iterator();
    int count = 0;
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.