Codota Logo
WorklogInputParametersImpl
Code IndexAdd Codota to your IDE (free)

How to use
WorklogInputParametersImpl
in
com.atlassian.jira.bc.issue.worklog

Best Java code snippets using com.atlassian.jira.bc.issue.worklog.WorklogInputParametersImpl (Showing top 17 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: com.atlassian.jira/jira-api

/**
 * Will build the {@link WorklogInputParameters} object and pass in every variable independent of which
 * adjustment option you have picked.
 *
 * @return a {@link WorklogInputParameters} object with the built parameters.
 */
public WorklogInputParameters buildAll()
{
  return new WorklogInputParametersImpl(worklogId, issue, timeSpent, startDate, comment, groupLevel, roleLevelId,
      getVisibility(), newEstimate, adjustmentAmount, editableCheckRequired, errorFieldPrefix);
}
origin: com.atlassian.jira/jira-rest-plugin

@Override
public WorklogInputParameters prepareData(JiraServiceContextImpl serviceContext, Issue issue, WorklogJsonBean request, IssueWorklogResource.WorklogAdjustmentRequest adjustment)
{
  ErrorCollection errors = serviceContext.getErrorCollection();
  Worklog existingWorklog = getAndValidateExistingWorklog(request, errors, serviceContext);
  if (!errors.hasAnyErrors())
  {
    WorklogInputParametersImpl.Builder builder = WorklogInputParametersImpl
        .issue(issue);
    addAdjustmentParams(adjustment, builder, errors, DELETE, serviceContext);
    if (!errors.hasAnyErrors())
    {
      builder.worklogId(existingWorklog.getId());
      return builder.buildAll();
    }
  }
  return null;
}
origin: com.atlassian.jira/jira-core

public void doValidation()
{
  final CommentVisibility commentVisibility = getCommentVisibility();
  final Visibility visibility = Visibilities.fromGroupAndStrRoleId(commentVisibility.getGroupLevel(), commentVisibility.getRoleLevel());
  // Call the correct validation on the service so that we can get the worklog to update
  final WorklogInputParametersImpl.Builder builder = WorklogInputParametersImpl
      .timeSpent(getTimeLogged())
      .worklogId(getWorklogId())
      .startDate(getParsedStartDate())
      .comment(getComment())
      .visibility(visibility);
  if (ADJUST_ESTIMATE_NEW.equalsIgnoreCase(adjustEstimate))
  {
    final WorklogNewEstimateInputParameters params = builder
        .newEstimate(getNewEstimate())
        .buildNewEstimate();
    worklogResult = worklogService.validateUpdateWithNewEstimate(getJiraServiceContext(), params);
  }
  else
  {
    final WorklogInputParameters params = builder.build();
    worklogResult = worklogService.validateUpdate(getJiraServiceContext(), params);
  }
}
origin: com.atlassian.jira.plugins/jira-fisheye-plugin

  public Either<CommitHookErrors, Worklog> handle(ApplicationUser user, MutableIssue issue, String commandName, List<String> args) {
    JiraServiceContextImpl jiraServiceContext = new JiraServiceContextImpl(user);
    WorklogResult result = worklogService.validateCreate(
        jiraServiceContext,
        WorklogInputParametersImpl.builder()
            .issue(issue)
            .timeSpent(args.isEmpty() ? null : args.get(0))
            .comment(args.size() > 1 ? args.get(1) : null)
            .startDate(new Date())
            .build());
    if (!jiraServiceContext.getErrorCollection().hasAnyErrors()) {
      return Either.value(worklogService.createAndAutoAdjustRemainingEstimate(
          jiraServiceContext, result, true));
    } else {
      return Either.error(CommitHookErrors.fromErrorCollection(
          CMD_TYPE.getName(), issue.getKey(), jiraServiceContext.getErrorCollection()));
    }
  }
}
origin: com.atlassian.jira/jira-rest-plugin

.issue(issue);
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

public void updateWorklogAndRetainRemainingEstimate(User user, RemoteWorklog remoteWorklog)
    throws RemoteException, RemotePermissionException, RemoteValidationException
{
  JiraServiceContext serviceContext = new JiraServiceContextImpl(user, new SimpleErrorCollection());
  Long id = SoapUtils.toLongRequired(remoteWorklog.getId());
  String timeSpent = remoteWorklog.getTimeSpent();
  Date startDate = remoteWorklog.getStartDate();
  String comment = remoteWorklog.getComment();
  String groupLevel = remoteWorklog.getGroupLevel();
  String roleLevelId = remoteWorklog.getRoleLevelId();
  final WorklogInputParameters params = WorklogInputParametersImpl
      .timeSpent(timeSpent)
      .worklogId(id)
      .startDate(startDate)
      .comment(comment)
      .groupLevel(groupLevel)
      .roleLevelId(roleLevelId)
      .build();
  WorklogResult worklogResult = worklogService.validateUpdate(serviceContext, params);
  checkAndThrowValidationException(serviceContext.getErrorCollection());
  if (worklogResult == null)
  {
    throw new RemoteValidationException(getI18nHelper().getText("error.unexpected.condition", "WorklogService.validateUpdate"));
  }
  worklogService.updateAndRetainRemainingEstimate(serviceContext, worklogResult, true);
  checkAndThrowRemoteException(serviceContext.getErrorCollection());
}
origin: com.atlassian.jira/jira-core

.issue(getIssueObject())
.timeSpent(getTimeLogged())
.startDate(getParsedStartDate())
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

public void updateWorklogAndAutoAdjustRemainingEstimate(User user, RemoteWorklog remoteWorklog)
    throws RemoteException, RemotePermissionException, RemoteValidationException
{
  JiraServiceContext serviceContext = new JiraServiceContextImpl(user, new SimpleErrorCollection());
  Long id = SoapUtils.toLongRequired(remoteWorklog.getId());
  String timeSpent = remoteWorklog.getTimeSpent();
  Date startDate = remoteWorklog.getStartDate();
  String comment = remoteWorklog.getComment();
  String groupLevel = remoteWorklog.getGroupLevel();
  String roleLevelId = remoteWorklog.getRoleLevelId();
  final WorklogInputParameters params = WorklogInputParametersImpl
      .timeSpent(timeSpent)
      .worklogId(id)
      .startDate(startDate)
      .comment(comment)
      .groupLevel(groupLevel)
      .roleLevelId(roleLevelId)
      .build();
  WorklogResult worklogResult = worklogService.validateUpdate(serviceContext, params);
  checkAndThrowValidationException(serviceContext.getErrorCollection());
  if (worklogResult == null)
  {
    throw new RemoteValidationException(getI18nHelper().getText("error.unexpected.condition", "WorklogService.validateUpdate"));
  }
  worklogService.updateAndAutoAdjustRemainingEstimate(serviceContext, worklogResult, true);
  checkAndThrowRemoteException(serviceContext.getErrorCollection());
}
origin: com.atlassian.jira/jira-api

/**
 * Use this method to build the {@link WorklogAdjustmentAmountInputParameters} object required for the
 * "manual adjustment" (or "adjustment amount") service calls.
 *
 * @return a {@link WorklogAdjustmentAmountInputParameters} object with the built parameters.
 */
public WorklogAdjustmentAmountInputParameters buildAdjustmentAmount()
{
  return new WorklogInputParametersImpl(worklogId, issue, timeSpent, startDate, comment, groupLevel, roleLevelId,
      getVisibility(), null, adjustmentAmount, editableCheckRequired, errorFieldPrefix);
}
origin: com.atlassian.jira/jira-core

private WorklogInputParametersImpl.Builder getWorklogInputParams(Issue issue, WorklogValue value)
{
  boolean editableCheckRequired = value.isEditIssue();
  final CommentVisibility commentVisibility = new CommentVisibility(value.commentLevel());
  final Visibility visibility = Visibilities.fromGroupAndStrRoleId(commentVisibility.getGroupLevel(), commentVisibility.getRoleLevel());
  final Date parsedStartDate = WorklogValue.Builder.parseStartDate(getOutlookDateManager(), authenticationContext.getLocale(), value.startDate());
  return WorklogInputParametersImpl
      .issue(issue)
      .timeSpent(value.timeLogged())
      .startDate(parsedStartDate)
      .worklogId(value.id())
      .comment(value.comment())
      .visibility(visibility)
      .editableCheckRequired(editableCheckRequired)
      .newEstimate(value.newEstimate())
      .adjustmentAmount(value.adjustmentAmount())
      .errorFieldPrefix(IssueFieldConstants.WORKLOG + "_");
}
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

public void updateWorklogWithNewRemainingEstimate(User user, RemoteWorklog remoteWorklog, String newRemainingEstimate)
    throws RemoteException, RemotePermissionException, RemoteValidationException
{
  JiraServiceContext serviceContext = new JiraServiceContextImpl(user, new SimpleErrorCollection());
  Long id = SoapUtils.toLongRequired(remoteWorklog.getId());
  String timeSpent = remoteWorklog.getTimeSpent();
  Date startDate = remoteWorklog.getStartDate();
  String comment = remoteWorklog.getComment();
  String groupLevel = remoteWorklog.getGroupLevel();
  String roleLevelId = remoteWorklog.getRoleLevelId();
  final WorklogNewEstimateInputParameters params = WorklogInputParametersImpl
      .timeSpent(timeSpent)
      .worklogId(id)
      .startDate(startDate)
      .comment(comment)
      .groupLevel(groupLevel)
      .roleLevelId(roleLevelId)
      .newEstimate(newRemainingEstimate)
      .buildNewEstimate();
  WorklogNewEstimateResult worklogResult = worklogService.validateUpdateWithNewEstimate(serviceContext, params);
  checkAndThrowValidationException(serviceContext.getErrorCollection());
  if (worklogResult == null)
  {
    throw new RemoteValidationException(getI18nHelper().getText("error.unexpected.condition", "WorklogService.validateUpdateWithNewEstimate"));
  }
  worklogService.updateWithNewRemainingEstimate(serviceContext, worklogResult, true);
  checkAndThrowRemoteException(serviceContext.getErrorCollection());
}
origin: com.atlassian.jira/jira-api

/**
 * Use this method to build the base {@link WorklogInputParameters} object.
 *
 * @return a {@link WorklogInputParameters} object with the built parameters.
 */
public WorklogInputParameters build()
{
  return new WorklogInputParametersImpl(worklogId, issue, timeSpent, startDate, comment, groupLevel, roleLevelId,
      getVisibility(), null, null, editableCheckRequired, errorFieldPrefix);
}
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

public RemoteWorklog addWorklogAndAutoAdjustRemainingEstimate(final User user, final String issueKey, final RemoteWorklog remoteWorklog)
    throws RemoteException, RemotePermissionException, RemoteValidationException
{
  JiraServiceContext serviceContext = new JiraServiceContextImpl(user, new SimpleErrorCollection());
  Issue issue = getIssueFromKey(issueKey);
  String timeSpent = remoteWorklog.getTimeSpent();
  Date startDate = remoteWorklog.getStartDate();
  String comment = remoteWorklog.getComment();
  String groupLevel = remoteWorklog.getGroupLevel();
  String roleLevelId = remoteWorklog.getRoleLevelId();
  WorklogInputParameters params = WorklogInputParametersImpl
      .issue(issue)
      .timeSpent(timeSpent)
      .startDate(startDate)
      .comment(comment)
      .groupLevel(groupLevel)
      .roleLevelId(roleLevelId)
      .build();
  WorklogResult worklogResult = worklogService.validateCreate(serviceContext, params);
  checkAndThrowValidationException(serviceContext.getErrorCollection());
  if (worklogResult == null)
  {
    throw new RemoteValidationException(getI18nHelper().getText("error.unexpected.condition", "WorklogService.validateCreate"));
  }
  Worklog createdWorklog = worklogService.createAndAutoAdjustRemainingEstimate(serviceContext, worklogResult, true);
  checkAndThrowRemoteException(serviceContext.getErrorCollection());
  return RemoteWorklogImpl.copyToRemoteWorkLog(createdWorklog, getJiraDurationUtils());
}
origin: com.atlassian.jira/jira-api

/**
 * Use this method to build the {@link WorklogNewEstimateInputParameters} object required for the "new estimate"
 * service calls.
 *
 * @return a {@link WorklogNewEstimateInputParameters} object with the built parameters.
 */
public WorklogNewEstimateInputParameters buildNewEstimate()
{
  return new WorklogInputParametersImpl(worklogId, issue, timeSpent, startDate, comment, groupLevel, roleLevelId,
      getVisibility(), newEstimate, null, editableCheckRequired, errorFieldPrefix);
}
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

public RemoteWorklog addWorklogAndRetainRemainingEstimate(final User user, final String issueKey, final RemoteWorklog remoteWorklog)
    throws RemoteException, RemotePermissionException, RemoteValidationException
{
  JiraServiceContext serviceContext = new JiraServiceContextImpl(user, new SimpleErrorCollection());
  Issue issue = getIssueFromKey(issueKey);
  String timeSpent = remoteWorklog.getTimeSpent();
  Date startDate = remoteWorklog.getStartDate();
  String comment = remoteWorklog.getComment();
  String groupLevel = remoteWorklog.getGroupLevel();
  String roleLevelId = remoteWorklog.getRoleLevelId();
  WorklogInputParameters params = WorklogInputParametersImpl
      .issue(issue)
      .timeSpent(timeSpent)
      .startDate(startDate)
      .comment(comment)
      .groupLevel(groupLevel)
      .roleLevelId(roleLevelId)
      .build();
  WorklogResult worklogResult = worklogService.validateCreate(serviceContext, params);
  checkAndThrowValidationException(serviceContext.getErrorCollection());
  if (worklogResult == null)
  {
    throw new RemoteValidationException(getI18nHelper().getText("error.unexpected.condition", "WorklogService.validateCreate"));
  }
  Worklog createdWorklog = worklogService.createAndRetainRemainingEstimate(serviceContext, worklogResult, true);
  checkAndThrowRemoteException(serviceContext.getErrorCollection());
  return RemoteWorklogImpl.copyToRemoteWorkLog(createdWorklog, getJiraDurationUtils());
}
origin: com.atlassian.jira.plugins/atlassian-jira-rpc-plugin

.issue(issue)
.timeSpent(timeSpent)
.startDate(startDate)
origin: com.atlassian.jira/jira-rest-plugin

.issue(issue);
com.atlassian.jira.bc.issue.worklogWorklogInputParametersImpl

Javadoc

Implementation of the WorklogInputParameters, WorklogNewEstimateInputParameters and WorklogAdjustmentAmountInputParameters interfaces. Static builder methods are provided for convenience.

Most used methods

  • issue
  • timeSpent
  • <init>
  • builder

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • startActivity (Activity)
  • onCreateOptionsMenu (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now