*
Execute an already created Azkaban project.
@param sessionId Session Id.
@param azkabanProjectId Project Id.
@param azkabanProjectConfig Azkaban Project Config that contains schedule information.
@throws IOException
552799
public static void executeJob(String sessionId, String azkabanProjectId,
      AzkabanProjectConfig azkabanProjectConfig)
      throws IOException {
    log.info("Executing Azkaban project: " + azkabanProjectConfig.getAzkabanProjectName());
    AzkabanAjaxAPIClient.executeAzkabanProject(sessionId, azkabanProjectId, azkabanProjectConfig);
  }
1234597
public static void store(MavenProject project) throws IOException {
        final File output = new File(project.getBasedir(), Constants.DEPENDENCIES_FILE);
        output.getParentFile().mkdirs();
        ProjectDependencies dependencies = new ProjectDependencies(project);
        mapper.writer()
                .withDefaultPrettyPrinter()
                .writeValue(
                        output,
                        dependencies
                );
    }
314613
private void writeCalendar(ProjectCalendar record) throws IOException
   {
      //
      // Test used to ensure that we don't write the default calendar used for the "Unassigned" resource
      //
      if (record.getParent() == null || record.getResource() != null)
      {
         m_buffer.setLength(0);

         if (record.getParent() == null)
         {
            m_buffer.append(MPXConstants.BASE_CALENDAR_RECORD_NUMBER);
            m_buffer.append(m_delimiter);
            if (record.getName() != null)
            {
               m_buffer.append(record.getName());
            }
         }
         else
         {
            m_buffer.append(MPXConstants.RESOURCE_CALENDAR_RECORD_NUMBER);
            m_buffer.append(m_delimiter);
            m_buffer.append(record.getParent().getName());
         }

         for (DayType day : record.getDays())
         {
            if (day == null)
            {
               day = DayType.DEFAULT;
            }
            m_buffer.append(m_delimiter);
            m_buffer.append(day.getValue());
         }

         m_buffer.append(MPXConstants.EOL);
         m_writer.write(m_buffer.toString());

         ProjectCalendarHours[] hours = record.getHours();
         for (int loop = 0; loop < hours.length; loop++)
         {
            if (hours[loop] != null)
            {
               writeCalendarHours(record, hours[loop]);
            }
         }

         if (!record.getCalendarExceptions().isEmpty())
         {
            //
            // A quirk of MS Project is that these exceptions must be
            // in date order in the file, otherwise they are ignored.
            // The getCalendarExceptions method now guarantees that
            // the exceptions list is sorted when retrieved.
            //
            for (ProjectCalendarException ex : record.getCalendarExceptions())
            {
               writeCalendarException(record, ex);
            }
         }

         m_eventManager.fireCalendarWrittenEvent(record);
      }
   }
674604
private void processCalendars() throws Exception
   {
      List<Row> rows = getRows("select * from zcalendar where zproject=?", m_projectID);
      for (Row row : rows)
      {
         ProjectCalendar calendar = m_project.addCalendar();
         calendar.setUniqueID(row.getInteger("Z_PK"));
         calendar.setName(row.getString("ZTITLE"));
         processDays(calendar);
         processExceptions(calendar);
         m_eventManager.fireCalendarReadEvent(calendar);
      }
   }
260358
@Override
    public IRundeckProject createFrameworkProjectStrict(final String projectName, final Properties properties) {

        return createFrameworkProjectInt(projectName,properties,true);
    }
688782
public void loadProject(String arg) throws IOException {
        Project newProject = Project.readProject(arg);
        newProject.setConfiguration(project.getConfiguration());
        project = newProject;
        projectLoadedFromFile = true;
    }
321978
public static void writeProject(JSONWriter writer, Project project)
			throws IllegalArgumentException, JSONException {
		/* Validate project */
		if (project.getName() == null)
			throw new IllegalArgumentException(
					"Project name must be set to create a new project");
		if (project.getIdentifier() == null)
			throw new IllegalArgumentException(
					"Project identifier must be set to create a new project");

		writeProject(project, writer);
	}
767790
private void processProject() throws SQLException
   {
      ProjectProperties props = m_project.getProjectProperties();
      Row row = getRows("select * from zproject where z_pk=?", m_projectID).get(0);
      props.setWeekStartDay(Day.getInstance(row.getInt("ZFIRSTDAYOFWEEK") + 1));
      props.setScheduleFrom(row.getInt("ZSCHEDULINGDIRECTION") == 1 ? ScheduleFrom.START : ScheduleFrom.FINISH);
      props.setMinutesPerDay(Integer.valueOf(row.getInt("ZHOURSPERDAY") * 60));
      props.setDaysPerMonth(row.getInteger("ZDAYSPERMONTH"));
      props.setMinutesPerWeek(Integer.valueOf(row.getInt("ZHOURSPERWEEK") * 60));
      props.setStatusDate(row.getTimestamp("ZGIVENSTATUSDATE"));
      props.setCurrencySymbol(row.getString("ZCURRENCYSYMBOL"));
      props.setName(row.getString("ZTITLE"));
      props.setUniqueID(row.getUUID("ZUNIQUEID").toString());
   }
1353993
private void handlePurgeProject(final HttpServletRequest req,
      final HttpServletResponse resp, final Session session) throws ServletException,
      IOException {
    final User user = session.getUser();
    final HashMap<String, Object> ret = new HashMap<>();
    boolean isOperationSuccessful = true;

    try {
      Project project = null;
      final String projectParam = getParam(req, "project");

      if (StringUtils.isNumeric(projectParam)) {
        project = this.projectManager.getProject(Integer.parseInt(projectParam)); // get
        // project
        // by
        // Id
      } else {
        project = this.projectManager.getProject(projectParam); // get project by
        // name (name cannot
        // start
        // from ints)
      }

      // invalid project
      if (project == null) {
        ret.put(ERROR_PARAM, "invalid project");
        isOperationSuccessful = false;
      }

      // project is already deleted
      if (isOperationSuccessful
          && this.projectManager.isActiveProject(project.getId())) {
        ret.put(ERROR_PARAM, "Project " + project.getName()
            + " should be deleted before purging");
        isOperationSuccessful = false;
      }

      // only eligible users can purge a project
      if (isOperationSuccessful && !hasPermission(project, user, Type.ADMIN)) {
        ret.put(ERROR_PARAM, "Cannot purge. User '" + user.getUserId()
            + "' is not an ADMIN.");
        isOperationSuccessful = false;
      }

      if (isOperationSuccessful) {
        this.projectManager.purgeProject(project, user);
      }
    } catch (final Exception e) {
      ret.put(ERROR_PARAM, e.getMessage());
      isOperationSuccessful = false;
    }

    ret.put("success", isOperationSuccessful);
    this.writeJSON(resp, ret);
  }
716265
private static void createSimpleProject( File targetDirectory, CreationBean creationBean )
	throws IOException {

		// Create the directory structure
		String[] directoriesToCreate = creationBean.isReusableRecipe() ? RR_DIRECTORIES : ALL_DIRECTORIES;
		for( String s : directoriesToCreate ) {
			File dir = new File( targetDirectory, s );
			Utils.createDirectory( dir );
		}

		// Create the descriptor
		InputStream in = ProjectUtils.class.getResourceAsStream( "/application-skeleton.props" );
		ByteArrayOutputStream out = new ByteArrayOutputStream();
		Utils.copyStreamSafely( in, out );
		String tpl = out.toString( "UTF-8" )
				.replace( TPL_NAME, creationBean.getProjectName())
				.replace( TPL_VERSION, creationBean.getProjectVersion())
				.replace( TPL_DESCRIPTION, creationBean.getProjectDescription());

		// Create the rest of the project
		completeProjectCreation( targetDirectory, tpl, creationBean );
	}
1225085
public void project_serviceName_instance_instanceId_PUT(String serviceName, String instanceId, String instanceName) throws IOException {
		String qPath = "/cloud/project/{serviceName}/instance/{instanceId}";
		StringBuilder sb = path(qPath, serviceName, instanceId);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "instanceName", instanceName);
		exec(qPath, "PUT", sb.toString(), o);
	}
777298
public void addProjectResource(String resourceName) {

        if ((m_throwable != null) || (m_projectName == null)) {
            return;
        }
        if (m_projectResources == null) {
            m_projectResources = new ArrayList<String>();
        }
        m_projectResources.add(resourceName);
    }
1352568
public void project_serviceName_instance_instanceId_snapshot_POST(String serviceName, String instanceId, String snapshotName) throws IOException {
		String qPath = "/cloud/project/{serviceName}/instance/{instanceId}/snapshot";
		StringBuilder sb = path(qPath, serviceName, instanceId);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "snapshotName", snapshotName);
		exec(qPath, "POST", sb.toString(), o);
	}
1034834
@Override
  public void execute() throws BuildException {
    validate();

    if (allowUndefined) {
      values.add(null);
    }

    long permutedSeed = SeedUtils.parseSeedChain(random)[0];
    permutedSeed ^= new Random(executionId.incrementAndGet()).nextLong();

    StringValue pick = RandomPicks.randomFrom(new Random(permutedSeed), values);
    if (pick != null) {
      getProject().setProperty(propertyName, pick.toString());
    }
  }
729485
public void setParamProjectid(String projectId) {

        m_paramProjectid = projectId;
        getJsp().getRequest().getSession().setAttribute("LASTPRJ", projectId);
    }
812986
public void execute()
        throws MojoExecutionException
    {
        File jarFile = createArchive();

        String classifier = getClassifier();
        if ( classifier != null )
        {
            projectHelper.attachArtifact( getProject(), "jar", classifier, jarFile );
        }
        else
        {
            getProject().getArtifact().setFile( jarFile );
        }
    }
540110
public void actionDeleteProject() throws Exception {

        String pId = getJsp().getRequest().getParameter(CmsEditProjectDialog.PARAM_PROJECTID);
        getCms().deleteProject(new CmsUUID(pId));
        refreshList();
        actionCloseDialog();
    }