Package com.atlassian.jira.project

Examples of com.atlassian.jira.project.ProjectManager


    public boolean matches(User user) {
      if (myProjectId == 0 || myRoleId == 0) {
        return false;
      }
      ProjectManager pm = ComponentAccessor.getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentAccessor.getComponentOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
View Full Code Here


        if (configuration == null) {
          return false;
        }
        projects = configuration.getCurrentlyEnabledProjects();
      } else {
        ProjectManager pm = ComponentAccessor.getProjectManager();
        Project project = pm.getProjectObj(myProjectId);
        projects = project == null ? Collections.<Project>emptyList() : Collections.singletonList(project);
      }

      for (Project project : projects) {
        if (rm.isUserInProjectRole(user, role, project)) {
View Full Code Here

    public boolean matches(User user) {
      if (myProjectId == 0 || myRoleId == 0) {
        return false;
      }
      ProjectManager pm = ComponentAccessor.getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentAccessor.getComponentOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
View Full Code Here

      }

      // Get a search request service to use for searching
      final ComponentManager componentManager = ComponentManager.getInstance();
      final SearchService searchService = componentManager.getSearchService();
      final ProjectManager projectManager = componentManager.getProjectManager();
      final IssueTypeSchemeManager issueTypeSchemeManager = componentManager.getIssueTypeSchemeManager();
      final EventTypeManager eventTypeManager = componentManager.getEventTypeManager();
      final CustomFieldManager customFieldManager = componentManager.getCustomFieldManager();

      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()) {
        final ClientSLAConfig clientSLAConfig = (ClientSLAConfig) iterator.next();
        //**
//        log.debug("processing slas for client: "+clientSLAConfig.getClientName());
        final String clientName = clientSLAConfig.getClientName();
        final String[] projects = clientSLAConfig.getProjects();
        Collection<Long> projectCollection = new HashSet<Long>();
        Collection<String> issueTypeCollection = new HashSet<String>();
        for (int i = 0; i < projects.length; i++) {
          final String projectName = projects[i] == null ? null : projects[i].trim();
          //**
//          log.debug("Found project name " + projectName);
          if (projectName != null) {
            final Project project = projectManager.getProjectObjByName(projectName);
            projectCollection.add(project.getId());
            final String id = getIncidentIssueId(issueTypeSchemeManager, project);
            if (id != null) {
              issueTypeCollection.add(id);
            }
View Full Code Here

    public boolean matches(User user) {
      if (myProjectId == 0 || myRoleId == 0) {
        return false;
      }
      ProjectManager pm = ComponentManager.getInstance().getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentManager.getComponentInstanceOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
View Full Code Here

        if (configuration == null) {
          return false;
        }
        projects = configuration.getCurrentlyEnabledProjects();
      } else {
        ProjectManager pm = ComponentAccessor.getProjectManager();
        Project project = pm.getProjectObj(myProjectId);
        projects = project == null ? Collections.<Project>emptyList() : Collections.singletonList(project);
      }

      for (Project project : projects) {
        if (rm.isUserInProjectRole(user, role, project)) {
View Full Code Here

    public boolean matches(User user) {
      if (myProjectId == 0 || myRoleId == 0) {
        return false;
      }
      ProjectManager pm = ComponentAccessor.getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentAccessor.getComponentOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
View Full Code Here

    public boolean matches(User user) {
      if (myProjectId == 0 || myRoleId == 0) {
        return false;
      }
      ProjectManager pm = ComponentManager.getInstance().getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentManager.getComponentInstanceOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
View Full Code Here

    public boolean matches(User user) {
      if (myProjectId == 0 || myRoleId == 0) {
        return false;
      }
      ProjectManager pm = ComponentAccessor.getProjectManager();
      Project project = pm.getProjectObj(myProjectId);
      if (project == null) {
        return false;
      }
      ProjectRoleManager rm = ComponentAccessor.getComponentOfType(ProjectRoleManager.class);
      com.atlassian.jira.security.roles.ProjectRole role = rm.getProjectRole(myRoleId);
View Full Code Here

TOP

Related Classes of com.atlassian.jira.project.ProjectManager

Copyright © 2018 www.massapicom. 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.