Class Project
- java.lang.Object
-
- com.aspose.tasks.Project
-
public class Project extends Object
Represents a project.
The Project is a central class in the Aspose.Tasks library.
One can use Project to read one of supported project management formats: MPP, MPT, MPX, XML.To load an existing document in any of the supported formats, pass a file name or a stream into one of the Project constructors. To create a blank project, call the parameterless constructor.
Use one of the Save method overloads to save the project in any of the
SaveFileFormat
formats: Primavera: P6 XML, PM XER; Microsoft Excel: XLSX, XML; Fixed Layout: PDF; Images: JPEG, PNG, BMP, TIFF, SVG; Text: TXT; Others: HTML.To print the project, use one of the
print()
method overloads.The Project stores project-wide information such as
Aspose.Tasks.Project.Views
(getViews()
/setViews(ViewCollection)
),Aspose.Tasks.Project.BuiltInProps
(getBuiltInProps()
/setBuiltInProps(BuiltInProjectPropertyCollection)
),Aspose.Tasks.Project.CustomProps
(getCustomProps()
/setCustomProps(CustomProjectPropertyCollection)
), andAspose.Tasks.Project.ExtendedAttributes
(getExtendedAttributes()
/setExtendedAttributes(ExtendedAttributeDefinitionCollection)
). Most of these objects are accessible via the corresponding properties of the Project class.The Project is a root entity that contains entry points to manipulate other project entities, such as
The Project entities can be accessed via typed collections, for exampleTask
,Resource
,ResourceAssignment
,ExtendedAttribute
andCalendar
.Aspose.Tasks.Task.Children
(Task.getChildren()
/Task.setChildren(TaskCollection)
),Aspose.Tasks.Project.Resources
(getResources()
/setResources(ResourceCollection)
),Aspose.Tasks.Project.ResourceAssignments
(getResourceAssignments()
/setResourceAssignments(ResourceAssignmentCollection)
), etc.
-
-
Constructor Summary
Constructors Constructor Description Project()
Initializes a new instance of theProject
class.Project(DbSettings settings)
Initializes a new instance of theProject
class to read data from a database which is specified by the instance of theDbSettings
class.Project(InputStream stream)
Initializes a new instance of theProject
class from a stream.Project(InputStream stream, LoadOptions options)
Initializes a new instance of theProject
class from the Stream with the specified instance of theLoadOptions
class.Project(InputStream stream, ParseErrorCallback parseErrorHandler)
Initializes a new instance of theProject
class from a template(existent mpp or mpt file).Project(InputStream stream, PrimaveraReadOptions options)
Initializes a new instance of theProject
class from the Stream with the specified instance of thePrimaveraReadOptions
class.Project(InputStream stream, String protectionPassword)
Initializes a new instance of theProject
class from a template(existent mpp or mpt file).Project(String projectTemplate)
Initializes a new instance of theProject
class from a template (existent mpp or mpt file).Project(String projectTemplate, LoadOptions options)
Initializes a new instance of theProject
class from a template (existent mpp or mpt file) with the specified instance of theLoadOptions
class.Project(String projectTemplate, ParseErrorCallback parseErrorHandler)
Initializes a new instance of theProject
class from a template (existent mpp or mpt file).Project(String projectTemplate, PrimaveraReadOptions options)
Initializes a new instance of theProject
class from a template (existent MPP or MPT file) with the specified instance of thePrimaveraReadOptions
class.Project(String projectTemplate, String protectionPassword)
Initializes a new instance of theProject
class from a password protected template (existent mpp or mpt file).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyTo(Project another)
Copies project's main data and properties to another project.void
copyTo(Project another, CopyToOptions options)
Copies project's main data and properties to another project.Iterable<Task>
enumerateAllChildTasks()
Recursively enumerates all project's tasks including root task.<T> T
get(Key<T,Integer> key)
Returns the value to which the property is mapped in this container.NullableBool
getActualsInSync()
Gets a value indicating whether ActualsInSync is set or not.NullableBool
getAdminProject()
Gets a value indicating whether AdminProject is set or not.NullableBool
getAreEditableActualCosts()
Gets a value indicating whether AreEditableActualCosts is set or not.String
getAuthor()
Gets a value of Author.NullableBool
getAutoAddNewResourcesAndTasks()
Gets a value indicating whether AutoAddNewResourcesAndTasks is set or not.NullableBool
getAutolink()
Gets a value indicating whether Autolink is set or not.int
getBaselineForEarnedValue()
Gets a value of BaselineForEarnedValue.Date
getBaselineSaveTime(int baselineNumber)
Returns the baseline save time.BuiltInProjectPropertyCollection
getBuiltInProps()
Gets project's built-in properties collection.int
getCalculationMode()
Gets calculation mode of a project.Calendar
getCalendar()
Gets a value of Calendar.CalendarCollection
getCalendars()
GetsCalendarCollection
object of this Project instance.String
getCategory()
Gets a value of Category.String
getComments()
Gets a value of Comments.String
getCompany()
Gets a value of Company.Date
getCreationDate()
Gets a value of CreationDate.TaskCollection
getCriticalPath()
Gets a collection which contains a list of Critical tasks which comprise Critical Path of this project.int
getCriticalSlackLimit()
Gets a value of CriticalSlackLimit.String
getCurrencyCode()
Gets a value of CurrencyCode.int
getCurrencyDigits()
Gets a value of CurrencyDigits.String
getCurrencySymbol()
Gets a value of CurrencySymbol.int
getCurrencySymbolPosition()
Gets a value of CurrencySymbolPosition.Date
getCurrentDate()
Gets a value of CurrentDate.String
getCustomDateFormat()
Gets a value of CustomDateFormat.CustomProjectPropertyCollection
getCustomProps()
Gets project's custom properties collection.int
getDateFormat()
Gets a value of DateFormat.int
getDaysPerMonth()
Gets a value of DaysPerMonth.Date
getDefaultFinishTime()
Gets a value of DefaultFinishTime.int
getDefaultFixedCostAccrual()
Gets a value of DefaultFixedCostAccrual.double
getDefaultOvertimeRate()
Gets a value of DefaultOvertimeRate.double
getDefaultStandardRate()
Gets a value of DefaultStandardRate.Date
getDefaultStartTime()
Gets a value of DefaultStartTime.int
getDefaultTaskEVMethod()
Gets a value of DefaultTaskEVMethod.int
getDefaultTaskType()
Gets a value of DefaultTaskType.View
getDefaultView()
Gets default view of the project.WeekDayCollection
getDefaultWeekWorkingDays()
Gets the instance ofWeekDayCollection
class which represents a collection of project default week working days and working times.ProjectDisplayOptions
getDisplayOptions()
Gets an instance of theProjectDisplayOptions
class.Duration
getDuration(double val)
GetsDuration
object with the specified number of units and default duration format which is defined in project's settingsPrj.DURATION_FORMAT
.Duration
getDuration(double val, int timeUnit)
GetsDuration
object with the specified number ofTimeUnitType
units.int
getDurationFormat()
Gets a value of DurationFormat.int
getEarnedValueMethod()
Gets a value of EarnedValueMethod.ExtendedAttributeDefinitionCollection
getExtendedAttributes()
Gets ExtendedAttributeDefinitionCollection object.Date
getExtendedCreationDate()
Gets a value of ExtendedCreationDate.Date
getFinishDate()
Gets a value of FinishDate.NullableBool
getFiscalYearStart()
Gets a value indicating whether FiscalYearStart is set or not.int
getFyStartDate()
Gets a value of FyStartDate.UUID
getGuid()
Gets a value of Guid.NullableBool
getHonorConstraints()
Gets a value indicating whether HonorConstraints is set or not.String
getHyperlinkBase()
Gets a value of HyperlinkBase.NullableBool
getInsertedProjectsLikeSummary()
Gets a value indicating whether InsertedProjectsLikeSummary is set or not.NullableBool
getKeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled()
Gets a value indicating whether KeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled is set or not.String
getKeywords()
Gets a value of Keywords.String
getLastAuthor()
Gets a value of LastAuthor.Date
getLastPrinted()
Gets a value of LastPrinted.Date
getLastSaved()
Gets a value of LastSaved.String
getManager()
Gets a value of Manager.NullableBool
getMicrosoftProjectServerURL()
Gets a value indicating whether MicrosoftProjectServerURL is set or not.int
getMinutesPerDay()
Gets a value of MinutesPerDay.int
getMinutesPerWeek()
Gets a value of MinutesPerWeek.NullableBool
getMoveCompletedEndsBack()
Gets a value indicating whether MoveCompletedEndsBack is set or not.NullableBool
getMoveCompletedEndsForward()
Gets a value indicating whether MoveCompletedEndsForward is set or not.NullableBool
getMoveRemainingStartsBack()
Gets a value indicating whether MoveRemainingStartsBack is set or not.NullableBool
getMoveRemainingStartsForward()
Gets a value indicating whether MoveRemainingStartsForward is set or not.NullableBool
getMultipleCriticalPaths()
Gets a value indicating whether MultipleCriticalPaths is set or not.String
getName()
Gets a value of Name.NullableBool
getNewTasksAreManual()
Gets a value indicating whether NewTasksAreManual is set or not.NullableBool
getNewTasksEffortDriven()
Gets a value indicating whether NewTasksEffortDriven is set or not.NullableBool
getNewTasksEstimated()
Gets a value indicating whether NewTasksEstimated is set or not.int
getNewTaskStartDate()
Gets a value of NewTaskStartDate.OleObjectCollection
getOleObjects()
Gets a collection containing the instances of theOleObject
class which are linked or embedded to this project file.OutlineCodeDefinitionCollection
getOutlineCodes()
Gets OutlineCodeDefinitionCollection object.int
getPageCount()
Returns page count for the project to be rendered using defaultTimescale
(Days).int
getPageCount(int format, int scale)
Returns page count for the project to be rendered using givenTimescale
andPresentationFormat
.int
getPageCount(SaveOptions saveOptions)
Returns page count for the project to be rendered using givenSaveOptions
.int
getPageCount_PageSize(int pageSize, int scale)
int
getPageCount_PageSize(int pageSize, int scale, Date startDate, Date endDate)
Returns page count for the project to be rendered using givenTimescale
,PresentationFormat
and date range.int
getPageCount_PresentationFormat(int format)
Returns page count for the project to be rendered using defaultTimescale
(Days) and givenPresentationFormat
int
getPageCount_Timescale(int scale)
Returns page count for the project to be rendered using givenTimescale
.TaskLinkCollection
getPredecessors(Task task)
Returns a collection of task links which are predecessors of the specified task.NullableBool
getProjectExternallyEdited()
Gets a value indicating whether ProjectExternallyEdited is set or not.static ProjectFileInfo
getProjectFileInfo(InputStream stream)
Gets project file info from the stream.static ProjectFileInfo
getProjectFileInfo(String filename)
Read project file info from the file.NullableBool
getRemoveFileProperties()
Gets a value indicating whether RemoveFileProperties is set or not.ResourceAssignmentCollection
getResourceAssignments()
Gets ResourceAssignmentCollection object.FilterCollection
getResourceFilters()
Gets all the resource-based filter definitions.GroupCollection
getResourceGroups()
Gets all of the resource-based group definitions.ResourceCollection
getResources()
Gets ResourceCollection object.int
getRevision()
Gets a value of Revision.Task
getRootTask()
Gets the root of the tree of tasks.int
getSaveVersion()
Gets a value of SaveVersion.NullableBool
getScheduleFromStart()
Gets a value indicating whether ScheduleFromStart is set or not.boolean
getShowProjectSummaryTask()
Gets a value indicating whether ShowProjectSummaryTask is set or not.NullableBool
getSplitsInProgressTasks()
Gets a value indicating whether SplitsInProgressTasks is set or not.NullableBool
getSpreadActualCost()
Gets a value indicating whether SpreadActualCost is set or not.NullableBool
getSpreadPercentComplete()
Gets a value indicating whether SpreadPercentComplete is set or not.Date
getStartDate()
Gets a value of StartDate.Date
getStatusDate()
Gets a value of StatusDate.String
getSubject()
Gets a value of Subject.TableCollection
getTables()
Gets a list ofTable
objects.FilterCollection
getTaskFilters()
Gets all the task-based filter definitions.GroupCollection
getTaskGroups()
Gets all the task-based group definitions.TaskLinkCollection
getTaskLinks()
GetsTaskLinkCollection
object.NullableBool
getTaskUpdatesResource()
Gets a value indicating whether TaskUpdatesResource is set or not.String
getTemplate()
Gets a value of Template.Date
getTimescaleFinish()
Gets a value of TimescaleFinish.Date
getTimescaleStart()
Gets a value of TimescaleStart.String
getTitle()
Gets a value of Title.String
getUid()
Gets a value of Uid.NullableBool
getUpdateManuallyScheduledTasksWhenEditingLinks()
Gets a value indicating whether UpdateManuallyScheduledTasksWhenEditingLinks is set or not.VbaProject
getVbaProject()
ViewCollection
getViews()
Gets a list ofView
objects.WBSCodeDefinition
getWBSCodeDefinition()
Gets WBS Code Definition for the project.int
getWeekStartDay()
Gets a value of WeekStartDay.Duration
getWork(double val)
GetsDuration
object with the specifieddouble
value and default work format.int
getWorkFormat()
Gets a value of WorkFormat.void
print()
Prints project to the default printer with default printer settings using the standard (no User Interface) print controller.void
print(PrinterSettings printerSettings)
Prints project according to the specified printer settings using the standard (no User Interface) print controller.void
print(PrinterSettings printerSettings, PrintOptions options)
Prints project according to the specified printer settings and custom save options using the standard (no User Interface) print controller.void
print(PrinterSettings printerSettings, PrintOptions options, String documentName)
Prints project according to the specified printer settings, custom save options and the specified document name using the standard (no User Interface) print controller.void
print(PrinterSettings printerSettings, String documentName)
Prints project according to the specified printer settings using the standard (no User Interface) print controller.void
print(PrintOptions options)
Prints project to the default printer with default printer settings and custom save options using the standard (no User Interface) print controller.void
print(String printerName)
Prints project to the specified printer with default printer settings using the standard (no User Interface) print controller.void
recalculate()
Reschedules all project tasks ids, outline levels, start/finish dates, sets early/late dates, calculates slacks, work and cost fields.void
recalculate(boolean validate)
Reschedules all project tasks ids, outline levels, start/finish dates, sets early/late dates, calculates slacks, work and cost fields with optional validation.void
recalculateResourceFields()
Recalculates Id, Start and Finish of resources.void
recalculateResourceStartFinish()
Recalculates Start and Finish of resources.void
removeInvalidResourceAssignments()
Eliminates invalid resource assignments from the project resource assignments list.void
renumberWBSCode()
Renumber WBS code of all tasks.void
renumberWBSCode(List<Integer> taskIds)
Renumber WBS code of passed tasks.void
rescheduleUncompletedWorkToStartAfter(Date after)
Reschedules uncompleted project work to start after a specified date.void
rescheduleUncompletedWorkToStartAfter(Date after, List<Task> taskCollection)
Reschedules uncompleted work for a specified list of tasks to start after a specified date.void
save(OutputStream stream, int format)
Saves the project data to the stream.void
save(OutputStream stream, MPPSaveOptions options)
Saves the project to a stream using the specified save options.void
save(OutputStream stream, SaveOptions options)
Saves the project to a stream using the specified save options.void
save(String filename)
Saves the project data to the file in mpp format.void
save(String filename, int format)
Saves the project data to the file.void
save(String filename, MPPSaveOptions options)
Saves the document to mpp file format using the specified save options.void
save(String filename, SaveOptions options)
Saves the document to a file using the specified save options.void
saveAsTemplate(OutputStream stream)
Saves the project as a template to a specified stream.void
saveAsTemplate(OutputStream stream, SaveTemplateOptions options)
Saves the project as a template to a specified stream.void
saveAsTemplate(String fileName)
Saves the project as a template to the specified file path.void
saveAsTemplate(String fileName, SaveTemplateOptions options)
Saves the project as a template.void
saveReport(OutputStream stream)
Saves the project overview report to the stream.void
saveReport(OutputStream stream, int reportType)
Saves the project report of the specified type to the specified stream.void
saveReport(String fileName)
Saves the project overview report to PDF file.void
saveReport(String fileName, int reportType)
Saves the project report of the specified type in PDF format to the specified file path.List<Task>
selectAllChildTasks()
Recursively collects all child tasks of the root task.void
set(Key<Date,Integer> key, Date val)
Maps the specified property to the specified value in this container.<T> void
set(Key<T,Integer> key, T val)
Maps the specified property to the specified value in this container.void
setActualsInSync(NullableBool value)
Sets a value indicating whether ActualsInSync is set or not.void
setAdminProject(NullableBool value)
Sets a value indicating whether AdminProject is set or not.void
setAreEditableActualCosts(NullableBool value)
Sets a value indicating whether AreEditableActualCosts is set or not.void
setAuthor(String value)
Sets a value of Author.void
setAutoAddNewResourcesAndTasks(NullableBool value)
Sets a value indicating whether AutoAddNewResourcesAndTasks is set or not.void
setAutolink(NullableBool value)
Sets a value indicating whether Autolink is set or not.void
setBaseline(int baselineType)
Saves baseline fields to the specified baseline for the entire project.void
setBaseline(int baselineType, Iterable<Task> taskCollection)
Saves baseline fields to the specified baseline for the selected tasks.void
setBaselineForEarnedValue(int value)
Sets a value of BaselineForEarnedValue.void
setBaselineSaveTime(int baselineNumber, Date value)
Sets the baseline save time.void
setCalculationMode(int value)
Sets calculation mode of a project.void
setCalendar(Calendar value)
Sets a value of Calendar.void
setCategory(String value)
Sets a value of Category.void
setComments(String value)
Sets a value of Comments.void
setCompany(String value)
Sets a value of Company.void
setCreationDate(Date value)
Sets a value of CreationDate.void
setCriticalSlackLimit(int value)
Sets a value of CriticalSlackLimit.void
setCurrencyCode(String value)
Sets a value of CurrencyCode.void
setCurrencyDigits(int value)
Sets a value of CurrencyDigits.void
setCurrencySymbol(String value)
Sets a value of CurrencySymbol.void
setCurrencySymbolPosition(int value)
Sets a value of CurrencySymbolPosition.void
setCurrentDate(Date value)
Sets a value of CurrentDate.void
setCustomDateFormat(String value)
Sets a value of CustomDateFormat.void
setDateFormat(int value)
Sets a value of DateFormat.void
setDaysPerMonth(int value)
Sets a value of DaysPerMonth.void
setDefaultFinishTime(Date value)
Sets a value of DefaultFinishTime.void
setDefaultFixedCostAccrual(int value)
Sets a value of DefaultFixedCostAccrual.void
setDefaultOvertimeRate(double value)
Sets a value of DefaultOvertimeRate.void
setDefaultStandardRate(double value)
Sets a value of DefaultStandardRate.void
setDefaultStartTime(Date value)
Sets a value of DefaultStartTime.void
setDefaultTaskEVMethod(int value)
Sets a value of DefaultTaskEVMethod.void
setDefaultTaskType(int value)
Sets a value of DefaultTaskType.void
setDefaultView(View value)
Sets default view of the project.void
setDurationFormat(int value)
Sets a value of DurationFormat.void
setEarnedValueMethod(int value)
Sets a value of EarnedValueMethod.void
setExtendedCreationDate(Date value)
Sets a value of ExtendedCreationDate.void
setFinishDate(Date value)
Sets a value of FinishDate.void
setFiscalYearStart(NullableBool value)
Sets a value indicating whether FiscalYearStart is set or not.void
setFyStartDate(int value)
Sets a value of FyStartDate.void
setGuid(UUID value)
Sets a value of Guid.void
setHonorConstraints(NullableBool value)
Sets a value indicating whether HonorConstraints is set or not.void
setHyperlinkBase(String value)
Sets a value of HyperlinkBase.void
setInsertedProjectsLikeSummary(NullableBool value)
Sets a value indicating whether InsertedProjectsLikeSummary is set or not.void
setKeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled(NullableBool value)
Sets a value indicating whether KeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled is set or not.void
setKeywords(String value)
Sets a value of Keywords.void
setLastAuthor(String value)
Sets a value of LastAuthor.void
setLastPrinted(Date value)
Sets a value of LastPrinted.void
setLastSaved(Date value)
Sets a value of LastSaved.void
setManager(String value)
Sets a value of Manager.void
setMicrosoftProjectServerURL(NullableBool value)
Sets a value indicating whether MicrosoftProjectServerURL is set or not.void
setMinutesPerDay(int value)
Sets a value of MinutesPerDay.void
setMinutesPerWeek(int value)
Sets a value of MinutesPerWeek.void
setMoveCompletedEndsBack(NullableBool value)
Sets a value indicating whether MoveCompletedEndsBack is set or not.void
setMoveCompletedEndsForward(NullableBool value)
Sets a value indicating whether MoveCompletedEndsForward is set or not.void
setMoveRemainingStartsBack(NullableBool value)
Sets a value indicating whether MoveRemainingStartsBack is set or not.void
setMoveRemainingStartsForward(NullableBool value)
Sets a value indicating whether MoveRemainingStartsForward is set or not.void
setMultipleCriticalPaths(NullableBool value)
Sets a value indicating whether MultipleCriticalPaths is set or not.void
setName(String value)
Sets a value of Name.void
setNewTasksAreManual(NullableBool value)
Sets a value indicating whether NewTasksAreManual is set or not.void
setNewTasksEffortDriven(NullableBool value)
Sets a value indicating whether NewTasksEffortDriven is set or not.void
setNewTasksEstimated(NullableBool value)
Sets a value indicating whether NewTasksEstimated is set or not.void
setNewTaskStartDate(int value)
Sets a value of NewTaskStartDate.void
setProjectExternallyEdited(NullableBool value)
Sets a value indicating whether ProjectExternallyEdited is set or not.void
setRemoveFileProperties(NullableBool value)
Sets a value indicating whether RemoveFileProperties is set or not.void
setRevision(int value)
Sets a value of Revision.void
setSaveVersion(int value)
Sets a value of SaveVersion.void
setScheduleFromStart(NullableBool value)
Sets a value indicating whether ScheduleFromStart is set or not.void
setShowProjectSummaryTask(boolean value)
Sets a value indicating whether ShowProjectSummaryTask is set or not.void
setSplitsInProgressTasks(NullableBool value)
Sets a value indicating whether SplitsInProgressTasks is set or not.void
setSpreadActualCost(NullableBool value)
Sets a value indicating whether SpreadActualCost is set or not.void
setSpreadPercentComplete(NullableBool value)
Sets a value indicating whether SpreadPercentComplete is set or not.void
setStartDate(Date value)
Sets a value of StartDate.void
setStatusDate(Date value)
Sets a value of StatusDate.void
setSubject(String value)
Sets a value of Subject.void
setTaskUpdatesResource(NullableBool value)
Sets a value indicating whether TaskUpdatesResource is set or not.void
setTemplate(String value)
Sets a value of Template.void
setTimescaleFinish(Date value)
Sets a value of TimescaleFinish.void
setTimescaleStart(Date value)
Sets a value of TimescaleStart.void
setTitle(String value)
Sets a value of Title.void
setUid(String value)
Sets a value of Uid.void
setUpdateManuallyScheduledTasksWhenEditingLinks(NullableBool value)
Sets a value indicating whether UpdateManuallyScheduledTasksWhenEditingLinks is set or not.void
setWBSCodeDefinition(WBSCodeDefinition value)
Sets WBS Code Definition for the project.void
setWeekStartDay(int value)
Sets a value of WeekStartDay.void
setWorkFormat(int value)
Sets a value of WorkFormat.void
updateProjectWorkAsComplete(Date completeThrough, boolean setZeroOrHundredPercentCompleteOnly)
Updates all work as complete through a specified date for the entire project.void
updateProjectWorkAsComplete(Date completeThrough, boolean setZeroOrHundredPercentCompleteOnly, List<Task> taskCollection)
Updates all work as complete through a specified date for the specified list of tasks.
-
-
-
Constructor Detail
-
Project
public Project()
Initializes a new instance of the
Project
class.
-
Project
public Project(String projectTemplate, String protectionPassword)
Initializes a new instance of the
Project
class from a password protected template (existent mpp or mpt file).- Parameters:
projectTemplate
- Path to template to create project from.protectionPassword
- Protection password.
Reading password protected files currently supported for MSP 2003 file format only.
-
Project
public Project(String projectTemplate)
Initializes a new instance of the
Project
class from a template (existent mpp or mpt file).- Parameters:
projectTemplate
- Path to template to create project from.
-
Project
public Project(InputStream stream, PrimaveraReadOptions options)
Initializes a new instance of the
Project
class from the Stream with the specified instance of thePrimaveraReadOptions
class.- Parameters:
stream
- Stream of the ProjectInputStream
classoptions
- the specified instance of thePrimaveraReadOptions
class which allows to customize reading of Primavera formats (XER or XML).
-
Project
public Project(String projectTemplate, ParseErrorCallback parseErrorHandler)
Initializes a new instance of the
Project
class from a template (existent mpp or mpt file).- Parameters:
projectTemplate
- Path to template to create project from.parseErrorHandler
- the specified callback method to handle xml parse errors.
-
Project
public Project(InputStream stream)
Initializes a new instance of the
Project
class from a stream.- Parameters:
stream
-InputStream
to load a template from.
-
Project
public Project(String projectTemplate, PrimaveraReadOptions options)
Initializes a new instance of the
Project
class from a template (existent MPP or MPT file) with the specified instance of thePrimaveraReadOptions
class.- Parameters:
projectTemplate
- Path to template to create project fromoptions
- the specified instance of thePrimaveraReadOptions
class.
-
Project
public Project(DbSettings settings)
Initializes a new instance of the
Project
class to read data from a database which is specified by the instance of theDbSettings
class.- Parameters:
settings
- the specified instance of theDbSettings
class.
-
Project
public Project(InputStream stream, ParseErrorCallback parseErrorHandler)
Initializes a new instance of the
Project
class from a template(existent mpp or mpt file).- Parameters:
stream
-InputStream
to load a template from.parseErrorHandler
- the specified callback method to handle xml parse errors.
-
Project
public Project(InputStream stream, String protectionPassword)
Initializes a new instance of the
Project
class from a template(existent mpp or mpt file).- Parameters:
stream
-InputStream
to load a template from.protectionPassword
- Protection password.
Reading password protected files currently supported for MSP 2003 file format only.
-
Project
public Project(String projectTemplate, LoadOptions options)
Initializes a new instance of the
Project
class from a template (existent mpp or mpt file) with the specified instance of theLoadOptions
class.- Parameters:
projectTemplate
- Path to template to create project fromoptions
- the specified instance of theLoadOptions
class.
-
Project
public Project(InputStream stream, LoadOptions options)
Initializes a new instance of the
Project
class from the Stream with the specified instance of theLoadOptions
class.- Parameters:
stream
- Stream of the ProjectInputStream
classoptions
- the specified instance of theLoadOptions
class
-
-
Method Detail
-
copyTo
public final void copyTo(Project another)
Copies project's main data and properties to another project.
- Parameters:
another
- Another project to copy data to.
-
copyTo
public final void copyTo(Project another, CopyToOptions options)
Copies project's main data and properties to another project.
- Parameters:
another
- Another project to copy data to.options
- Copy options to control copy process.
-
enumerateAllChildTasks
public final Iterable<Task> enumerateAllChildTasks()
Recursively enumerates all project's tasks including root task.
- Returns:
- IEnumerable which can be used to iterate over all project's tasks.
Provides a more lightweight way to iterate over tasks compared toselectAllChildTasks()
method as it does not allocate memory for all tasks.
-
get
public final <T> T get(Key<T,Integer> key)
Returns the value to which the property is mapped in this container.
- Parameters:
key
- the specified property key.Prj
for getting the property key.- Returns:
- the value to which the property is mapped in this container.
-
getActualsInSync
public final NullableBool getActualsInSync()
Gets a value indicating whether ActualsInSync is set or not.
- Returns:
- a value indicating whether ActualsInSync is set or not.
-
setActualsInSync
public final void setActualsInSync(NullableBool value)
Sets a value indicating whether ActualsInSync is set or not.
- Parameters:
value
- a value indicating whether ActualsInSync is set or not.
-
getAdminProject
public final NullableBool getAdminProject()
Gets a value indicating whether AdminProject is set or not.
- Returns:
- a value indicating whether AdminProject is set or not.
-
setAdminProject
public final void setAdminProject(NullableBool value)
Sets a value indicating whether AdminProject is set or not.
- Parameters:
value
- a value indicating whether AdminProject is set or not.
-
getAreEditableActualCosts
public final NullableBool getAreEditableActualCosts()
Gets a value indicating whether AreEditableActualCosts is set or not.
- Returns:
- a value indicating whether AreEditableActualCosts is set or not.
-
setAreEditableActualCosts
public final void setAreEditableActualCosts(NullableBool value)
Sets a value indicating whether AreEditableActualCosts is set or not.
- Parameters:
value
- a value indicating whether AreEditableActualCosts is set or not.
-
getAuthor
public final String getAuthor()
Gets a value of Author.
- Returns:
- a value of Author.
-
setAuthor
public final void setAuthor(String value)
Sets a value of Author.
- Parameters:
value
- a value of Author.
-
getAutoAddNewResourcesAndTasks
public final NullableBool getAutoAddNewResourcesAndTasks()
Gets a value indicating whether AutoAddNewResourcesAndTasks is set or not.
- Returns:
- a value indicating whether AutoAddNewResourcesAndTasks is set or not.
-
setAutoAddNewResourcesAndTasks
public final void setAutoAddNewResourcesAndTasks(NullableBool value)
Sets a value indicating whether AutoAddNewResourcesAndTasks is set or not.
- Parameters:
value
- a value indicating whether AutoAddNewResourcesAndTasks is set or not.
-
getAutolink
public final NullableBool getAutolink()
Gets a value indicating whether Autolink is set or not.
- Returns:
- a value indicating whether Autolink is set or not.
-
setAutolink
public final void setAutolink(NullableBool value)
Sets a value indicating whether Autolink is set or not.
- Parameters:
value
- a value indicating whether Autolink is set or not.
-
getBaselineForEarnedValue
public final int getBaselineForEarnedValue()
Gets a value of BaselineForEarnedValue.
- Returns:
- a value of BaselineForEarnedValue.
-
setBaselineForEarnedValue
public final void setBaselineForEarnedValue(int value)
Sets a value of BaselineForEarnedValue.
- Parameters:
value
- a value of BaselineForEarnedValue.
-
getBaselineSaveTime
public final Date getBaselineSaveTime(int baselineNumber)
Returns the baseline save time. Returns DateTime.MinValue (00:00:00.0000000 UTC, 1st January 0001) if the baseline was not saved.
- Parameters:
baselineNumber
- The baseline's numberBaselineType
.- Returns:
- The baseline's last save date and time.
-
getBuiltInProps
public final BuiltInProjectPropertyCollection getBuiltInProps()
Gets project's built-in properties collection.
- Returns:
- project's built-in properties collection.
-
getCalculationMode
public final int getCalculationMode()
Gets calculation mode of a project. Can be one of the values of
CalculationMode
(getCalculationMode()
/setCalculationMode(int)
) enumeration.- Returns:
- calculation mode of a project.
-
setCalculationMode
public final void setCalculationMode(int value)
Sets calculation mode of a project. Can be one of the values of
CalculationMode
(getCalculationMode()
/setCalculationMode(int)
) enumeration.- Parameters:
value
- calculation mode of a project.
-
getCalendar
public final Calendar getCalendar()
Gets a value of Calendar.
- Returns:
- a value of Calendar.
-
setCalendar
public final void setCalendar(Calendar value)
Sets a value of Calendar.
- Parameters:
value
- a value of Calendar.
-
getCalendars
public final CalendarCollection getCalendars()
Gets
CalendarCollection
object of this Project instance.- Returns:
CalendarCollection
object of this Project instance.
-
getCategory
public final String getCategory()
Gets a value of Category.
- Returns:
- a value of Category.
-
setCategory
public final void setCategory(String value)
Sets a value of Category.
- Parameters:
value
- a value of Category.
-
getComments
public final String getComments()
Gets a value of Comments.
- Returns:
- a value of Comments.
-
setComments
public final void setComments(String value)
Sets a value of Comments.
- Parameters:
value
- a value of Comments.
-
getCompany
public final String getCompany()
Gets a value of Company.
- Returns:
- a value of Company.
-
setCompany
public final void setCompany(String value)
Sets a value of Company.
- Parameters:
value
- a value of Company.
-
getCreationDate
public final Date getCreationDate()
Gets a value of CreationDate.
- Returns:
- a value of CreationDate.
-
setCreationDate
public final void setCreationDate(Date value)
Sets a value of CreationDate.
- Parameters:
value
- a value of CreationDate.
-
getCriticalPath
public final TaskCollection getCriticalPath()
Gets a collection which contains a list of Critical tasks which comprise Critical Path of this project.
- Returns:
- a collection which represents a list of all critical tasks.
This is an O(n) operation, where n is the number of tasks in the project.
-
getCriticalSlackLimit
public final int getCriticalSlackLimit()
Gets a value of CriticalSlackLimit.
- Returns:
- a value of CriticalSlackLimit.
-
setCriticalSlackLimit
public final void setCriticalSlackLimit(int value)
Sets a value of CriticalSlackLimit.
- Parameters:
value
- a value of CriticalSlackLimit.
-
getCurrencyCode
public final String getCurrencyCode()
Gets a value of CurrencyCode.
- Returns:
- a value of CurrencyCode.
-
setCurrencyCode
public final void setCurrencyCode(String value)
Sets a value of CurrencyCode.
- Parameters:
value
- a value of CurrencyCode.
-
getCurrencyDigits
public final int getCurrencyDigits()
Gets a value of CurrencyDigits.
- Returns:
- a value of CurrencyDigits.
-
setCurrencyDigits
public final void setCurrencyDigits(int value)
Sets a value of CurrencyDigits.
- Parameters:
value
- a value of CurrencyDigits.
-
getCurrencySymbol
public final String getCurrencySymbol()
Gets a value of CurrencySymbol.
- Returns:
- a value of CurrencySymbol.
-
setCurrencySymbol
public final void setCurrencySymbol(String value)
Sets a value of CurrencySymbol.
- Parameters:
value
- a value of CurrencySymbol.
-
getCurrencySymbolPosition
public final int getCurrencySymbolPosition()
Gets a value of CurrencySymbolPosition.
- Returns:
- a value of CurrencySymbolPosition.
-
setCurrencySymbolPosition
public final void setCurrencySymbolPosition(int value)
Sets a value of CurrencySymbolPosition.
- Parameters:
value
- a value of CurrencySymbolPosition.
-
getCurrentDate
public final Date getCurrentDate()
Gets a value of CurrentDate.
- Returns:
- a value of CurrentDate.
-
setCurrentDate
public final void setCurrentDate(Date value)
Sets a value of CurrentDate.
- Parameters:
value
- a value of CurrentDate.
-
getCustomDateFormat
public final String getCustomDateFormat()
Gets a value of CustomDateFormat.
- Returns:
- a value of CustomDateFormat.
-
setCustomDateFormat
public final void setCustomDateFormat(String value)
Sets a value of CustomDateFormat.
- Parameters:
value
- a value of CustomDateFormat.
-
getCustomProps
public final CustomProjectPropertyCollection getCustomProps()
Gets project's custom properties collection.
- Returns:
- project's custom properties collection.
-
getDateFormat
public final int getDateFormat()
Gets a value of DateFormat.
- Returns:
- a value of DateFormat.
-
setDateFormat
public final void setDateFormat(int value)
Sets a value of DateFormat.
- Parameters:
value
- a value of DateFormat.
-
getDaysPerMonth
public final int getDaysPerMonth()
Gets a value of DaysPerMonth.
- Returns:
- a value of DaysPerMonth.
-
setDaysPerMonth
public final void setDaysPerMonth(int value)
Sets a value of DaysPerMonth.
- Parameters:
value
- a value of DaysPerMonth.
-
getDefaultFinishTime
public final Date getDefaultFinishTime()
Gets a value of DefaultFinishTime.
- Returns:
- a value of DefaultFinishTime.
-
setDefaultFinishTime
public final void setDefaultFinishTime(Date value)
Sets a value of DefaultFinishTime.
- Parameters:
value
- a value of DefaultFinishTime.
-
getDefaultFixedCostAccrual
public final int getDefaultFixedCostAccrual()
Gets a value of DefaultFixedCostAccrual.
- Returns:
- a value of DefaultFixedCostAccrual.
-
setDefaultFixedCostAccrual
public final void setDefaultFixedCostAccrual(int value)
Sets a value of DefaultFixedCostAccrual.
- Parameters:
value
- a value of DefaultFixedCostAccrual.
-
getDefaultOvertimeRate
public final double getDefaultOvertimeRate()
Gets a value of DefaultOvertimeRate.
- Returns:
- a value of DefaultOvertimeRate.
-
setDefaultOvertimeRate
public final void setDefaultOvertimeRate(double value)
Sets a value of DefaultOvertimeRate.
- Parameters:
value
- a value of DefaultOvertimeRate.
-
getDefaultStandardRate
public final double getDefaultStandardRate()
Gets a value of DefaultStandardRate.
- Returns:
- a value of DefaultStandardRate.
-
setDefaultStandardRate
public final void setDefaultStandardRate(double value)
Sets a value of DefaultStandardRate.
- Parameters:
value
- a value of DefaultStandardRate.
-
getDefaultStartTime
public final Date getDefaultStartTime()
Gets a value of DefaultStartTime.
- Returns:
- a value of DefaultStartTime.
-
setDefaultStartTime
public final void setDefaultStartTime(Date value)
Sets a value of DefaultStartTime.
- Parameters:
value
- a value of DefaultStartTime.
-
getDefaultTaskEVMethod
public final int getDefaultTaskEVMethod()
Gets a value of DefaultTaskEVMethod.
- Returns:
- a value of DefaultTaskEVMethod.
-
setDefaultTaskEVMethod
public final void setDefaultTaskEVMethod(int value)
Sets a value of DefaultTaskEVMethod.
- Parameters:
value
- a value of DefaultTaskEVMethod.
-
getDefaultTaskType
public final int getDefaultTaskType()
Gets a value of DefaultTaskType.
- Returns:
- a value of DefaultTaskType.
-
setDefaultTaskType
public final void setDefaultTaskType(int value)
Sets a value of DefaultTaskType.
- Parameters:
value
- a value of DefaultTaskType.
-
getDefaultView
public final View getDefaultView()
Gets default view of the project.
- Returns:
- default view of the project.
-
setDefaultView
public final void setDefaultView(View value)
Sets default view of the project.
- Parameters:
value
- default view of the project.
-
getDefaultWeekWorkingDays
public final WeekDayCollection getDefaultWeekWorkingDays()
Gets the instance of
WeekDayCollection
class which represents a collection of project default week working days and working times.- Returns:
- The instance of
WeekDayCollection
class which contains a list ofWeekDay
objects.
The data contains only in mpp files (not in xml).
-
getDisplayOptions
public final ProjectDisplayOptions getDisplayOptions()
Gets an instance of the
ProjectDisplayOptions
class.- Returns:
- an instance of the
ProjectDisplayOptions
class.
-
getDuration
public final Duration getDuration(double val)
Gets
Duration
object with the specified number of units and default duration format which is defined in project's settingsPrj.DURATION_FORMAT
.- Parameters:
val
- specified number of units.- Returns:
- Duration object.
-
getDuration
public final Duration getDuration(double val, int timeUnit)
Gets
Duration
object with the specified number ofTimeUnitType
units.- Parameters:
val
- specified number of units.timeUnit
- specified TimeUnitType value.- Returns:
- Duration object.
-
getDurationFormat
public final int getDurationFormat()
Gets a value of DurationFormat.
- Returns:
- a value of DurationFormat.
-
setDurationFormat
public final void setDurationFormat(int value)
Sets a value of DurationFormat.
- Parameters:
value
- a value of DurationFormat.
-
getEarnedValueMethod
public final int getEarnedValueMethod()
Gets a value of EarnedValueMethod.
- Returns:
- a value of EarnedValueMethod.
-
setEarnedValueMethod
public final void setEarnedValueMethod(int value)
Sets a value of EarnedValueMethod.
- Parameters:
value
- a value of EarnedValueMethod.
-
getExtendedAttributes
public final ExtendedAttributeDefinitionCollection getExtendedAttributes()
Gets ExtendedAttributeDefinitionCollection object. The collection of extended attribute (custom fields) definitions associated with a project.
- Returns:
- ExtendedAttributeDefinitionCollection object.
-
getExtendedCreationDate
public final Date getExtendedCreationDate()
Gets a value of ExtendedCreationDate.
- Returns:
- a value of ExtendedCreationDate.
-
setExtendedCreationDate
public final void setExtendedCreationDate(Date value)
Sets a value of ExtendedCreationDate.
- Parameters:
value
- a value of ExtendedCreationDate.
-
getFinishDate
public final Date getFinishDate()
Gets a value of FinishDate.
- Returns:
- a value of FinishDate.
-
setFinishDate
public final void setFinishDate(Date value)
Sets a value of FinishDate.
- Parameters:
value
- a value of FinishDate.
-
getFiscalYearStart
public final NullableBool getFiscalYearStart()
Gets a value indicating whether FiscalYearStart is set or not.
- Returns:
- a value indicating whether FiscalYearStart is set or not.
-
setFiscalYearStart
public final void setFiscalYearStart(NullableBool value)
Sets a value indicating whether FiscalYearStart is set or not.
- Parameters:
value
- a value indicating whether FiscalYearStart is set or not.
-
getFyStartDate
public final int getFyStartDate()
Gets a value of FyStartDate.
- Returns:
- a value of FyStartDate.
-
setFyStartDate
public final void setFyStartDate(int value)
Sets a value of FyStartDate.
- Parameters:
value
- a value of FyStartDate.
-
getGuid
public final UUID getGuid()
Gets a value of Guid.
- Returns:
- a value of Guid.
-
setGuid
public final void setGuid(UUID value)
Sets a value of Guid.
- Parameters:
value
- a value of Guid.
-
getHonorConstraints
public final NullableBool getHonorConstraints()
Gets a value indicating whether HonorConstraints is set or not.
- Returns:
- a value indicating whether HonorConstraints is set or not.
-
setHonorConstraints
public final void setHonorConstraints(NullableBool value)
Sets a value indicating whether HonorConstraints is set or not.
- Parameters:
value
- a value indicating whether HonorConstraints is set or not.
-
getHyperlinkBase
public final String getHyperlinkBase()
Gets a value of HyperlinkBase.
- Returns:
- a value of HyperlinkBase.
-
setHyperlinkBase
public final void setHyperlinkBase(String value)
Sets a value of HyperlinkBase.
- Parameters:
value
- a value of HyperlinkBase.
-
getInsertedProjectsLikeSummary
public final NullableBool getInsertedProjectsLikeSummary()
Gets a value indicating whether InsertedProjectsLikeSummary is set or not.
- Returns:
- a value indicating whether InsertedProjectsLikeSummary is set or not.
-
setInsertedProjectsLikeSummary
public final void setInsertedProjectsLikeSummary(NullableBool value)
Sets a value indicating whether InsertedProjectsLikeSummary is set or not.
- Parameters:
value
- a value indicating whether InsertedProjectsLikeSummary is set or not.
-
getKeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled
public final NullableBool getKeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled()
Gets a value indicating whether KeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled is set or not.
- Returns:
- a value indicating whether KeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled is set or not.
-
setKeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled
public final void setKeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled(NullableBool value)
Sets a value indicating whether KeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled is set or not.
- Parameters:
value
- a value indicating whether KeepTaskOnNearestWorkingTimeWhenMadeAutoScheduled is set or not.
-
getKeywords
public final String getKeywords()
Gets a value of Keywords.
- Returns:
- a value of Keywords.
-
setKeywords
public final void setKeywords(String value)
Sets a value of Keywords.
- Parameters:
value
- a value of Keywords.
-
getLastAuthor
public final String getLastAuthor()
Gets a value of LastAuthor.
- Returns:
- a value of LastAuthor.
-
setLastAuthor
public final void setLastAuthor(String value)
Sets a value of LastAuthor.
- Parameters:
value
- a value of LastAuthor.
-
getLastPrinted
public final Date getLastPrinted()
Gets a value of LastPrinted.
- Returns:
- a value of LastPrinted.
-
setLastPrinted
public final void setLastPrinted(Date value)
Sets a value of LastPrinted.
- Parameters:
value
- a value of LastPrinted.
-
getLastSaved
public final Date getLastSaved()
Gets a value of LastSaved.
- Returns:
- a value of LastSaved.
-
setLastSaved
public final void setLastSaved(Date value)
Sets a value of LastSaved.
- Parameters:
value
- a value of LastSaved.
-
getManager
public final String getManager()
Gets a value of Manager.
- Returns:
- a value of Manager.
-
setManager
public final void setManager(String value)
Sets a value of Manager.
- Parameters:
value
- a value of Manager.
-
getMicrosoftProjectServerURL
public final NullableBool getMicrosoftProjectServerURL()
Gets a value indicating whether MicrosoftProjectServerURL is set or not.
- Returns:
- a value indicating whether MicrosoftProjectServerURL is set or not.
-
setMicrosoftProjectServerURL
public final void setMicrosoftProjectServerURL(NullableBool value)
Sets a value indicating whether MicrosoftProjectServerURL is set or not.
- Parameters:
value
- a value indicating whether MicrosoftProjectServerURL is set or not.
-
getMinutesPerDay
public final int getMinutesPerDay()
Gets a value of MinutesPerDay.
- Returns:
- a value of MinutesPerDay.
-
setMinutesPerDay
public final void setMinutesPerDay(int value)
Sets a value of MinutesPerDay.
- Parameters:
value
- a value of MinutesPerDay.
-
getMinutesPerWeek
public final int getMinutesPerWeek()
Gets a value of MinutesPerWeek.
- Returns:
- a value of MinutesPerWeek.
-
setMinutesPerWeek
public final void setMinutesPerWeek(int value)
Sets a value of MinutesPerWeek.
- Parameters:
value
- a value of MinutesPerWeek.
-
getMoveCompletedEndsBack
public final NullableBool getMoveCompletedEndsBack()
Gets a value indicating whether MoveCompletedEndsBack is set or not.
- Returns:
- a value indicating whether MoveCompletedEndsBack is set or not.
-
setMoveCompletedEndsBack
public final void setMoveCompletedEndsBack(NullableBool value)
Sets a value indicating whether MoveCompletedEndsBack is set or not.
- Parameters:
value
- a value indicating whether MoveCompletedEndsBack is set or not.
-
getMoveCompletedEndsForward
public final NullableBool getMoveCompletedEndsForward()
Gets a value indicating whether MoveCompletedEndsForward is set or not.
- Returns:
- a value indicating whether MoveCompletedEndsForward is set or not.
-
setMoveCompletedEndsForward
public final void setMoveCompletedEndsForward(NullableBool value)
Sets a value indicating whether MoveCompletedEndsForward is set or not.
- Parameters:
value
- a value indicating whether MoveCompletedEndsForward is set or not.
-
getMoveRemainingStartsBack
public final NullableBool getMoveRemainingStartsBack()
Gets a value indicating whether MoveRemainingStartsBack is set or not.
- Returns:
- a value indicating whether MoveRemainingStartsBack is set or not.
-
setMoveRemainingStartsBack
public final void setMoveRemainingStartsBack(NullableBool value)
Sets a value indicating whether MoveRemainingStartsBack is set or not.
- Parameters:
value
- a value indicating whether MoveRemainingStartsBack is set or not.
-
getMoveRemainingStartsForward
public final NullableBool getMoveRemainingStartsForward()
Gets a value indicating whether MoveRemainingStartsForward is set or not.
- Returns:
- a value indicating whether MoveRemainingStartsForward is set or not.
-
setMoveRemainingStartsForward
public final void setMoveRemainingStartsForward(NullableBool value)
Sets a value indicating whether MoveRemainingStartsForward is set or not.
- Parameters:
value
- a value indicating whether MoveRemainingStartsForward is set or not.
-
getMultipleCriticalPaths
public final NullableBool getMultipleCriticalPaths()
Gets a value indicating whether MultipleCriticalPaths is set or not.
- Returns:
- a value indicating whether MultipleCriticalPaths is set or not.
-
setMultipleCriticalPaths
public final void setMultipleCriticalPaths(NullableBool value)
Sets a value indicating whether MultipleCriticalPaths is set or not.
- Parameters:
value
- a value indicating whether MultipleCriticalPaths is set or not.
-
getName
public final String getName()
Gets a value of Name.
- Returns:
- a value of Name.
-
setName
public final void setName(String value)
Sets a value of Name.
- Parameters:
value
- a value of Name.
-
getNewTaskStartDate
public final int getNewTaskStartDate()
Gets a value of NewTaskStartDate.
- Returns:
- a value of NewTaskStartDate.
-
setNewTaskStartDate
public final void setNewTaskStartDate(int value)
Sets a value of NewTaskStartDate.
- Parameters:
value
- a value of NewTaskStartDate.
-
getNewTasksAreManual
public final NullableBool getNewTasksAreManual()
Gets a value indicating whether NewTasksAreManual is set or not.
- Returns:
- a value indicating whether NewTasksAreManual is set or not.
-
setNewTasksAreManual
public final void setNewTasksAreManual(NullableBool value)
Sets a value indicating whether NewTasksAreManual is set or not.
- Parameters:
value
- a value indicating whether NewTasksAreManual is set or not.
-
getNewTasksEffortDriven
public final NullableBool getNewTasksEffortDriven()
Gets a value indicating whether NewTasksEffortDriven is set or not.
- Returns:
- a value indicating whether NewTasksEffortDriven is set or not.
-
setNewTasksEffortDriven
public final void setNewTasksEffortDriven(NullableBool value)
Sets a value indicating whether NewTasksEffortDriven is set or not.
- Parameters:
value
- a value indicating whether NewTasksEffortDriven is set or not.
-
getNewTasksEstimated
public final NullableBool getNewTasksEstimated()
Gets a value indicating whether NewTasksEstimated is set or not.
- Returns:
- a value indicating whether NewTasksEstimated is set or not.
-
setNewTasksEstimated
public final void setNewTasksEstimated(NullableBool value)
Sets a value indicating whether NewTasksEstimated is set or not.
- Parameters:
value
- a value indicating whether NewTasksEstimated is set or not.
-
getOleObjects
public final OleObjectCollection getOleObjects()
Gets a collection containing the instances of the
OleObject
class which are linked or embedded to this project file.
Available for mpp file format only. This collection is read-only except for 'Clear' operation.- Returns:
- a collection containing the instances of the
OleObject
class which are linked or embedded to this project file.
-
getOutlineCodes
public final OutlineCodeDefinitionCollection getOutlineCodes()
Gets OutlineCodeDefinitionCollection object. The collection of outline code definitions associated with a project.
- Returns:
- OutlineCodeDefinitionCollection object.
-
getPageCount
public final int getPageCount(SaveOptions saveOptions)
Returns page count for the project to be rendered using given
SaveOptions
.In this example instance of HtmlSaveOptions and the number of pages in resulting HTML is written to the console.
[C#] Project project = new Project(@"test.mpp"); HtmlSaveOptions saveOptions = new HtmlSaveOptions { IncludeProjectNameInPageHeader = false, IncludeProjectNameInTitle = false, PageSize = PageSize.A4, Timescale = Timescale.Days, StartDate = project.Get(Prj.StartDate).Date, EndDate = project.Get(Prj.FinishDate).Date }; Console.WriteLine(project.GetPageCount(saveOptions));
- Parameters:
saveOptions
- The save options to get page count for.- Returns:
- a page count to be rendered.
-
getPageCount
public final int getPageCount()
Returns page count for the project to be rendered using default
Timescale
(Days).- Returns:
- Page count to be rendered.
-
getPageCount_PresentationFormat
public final int getPageCount_PresentationFormat(int format)
Returns page count for the project to be rendered using default
Timescale
(Days) and givenPresentationFormat
- Parameters:
format
-PresentationFormat
to get page count for.- Returns:
- Page count to be rendered.
-
getPageCount_PageSize
public final int getPageCount_PageSize(int pageSize, int scale, Date startDate, Date endDate)
Returns page count for the project to be rendered using given
Timescale
,PresentationFormat
and date range.
-
getPageCount_PageSize
public final int getPageCount_PageSize(int pageSize, int scale)
-
getPageCount_Timescale
public final int getPageCount_Timescale(int scale)
Returns page count for the project to be rendered using given
Timescale
.- Parameters:
scale
-Timescale
to get page count for.- Returns:
- Page count to be rendered.
-
getPageCount
public final int getPageCount(int format, int scale)
Returns page count for the project to be rendered using given
Timescale
andPresentationFormat
.- Parameters:
format
-PresentationFormat
to get page count for.scale
-Timescale
to get page count for.- Returns:
- Page count to be rendered.
-
getPredecessors
public final TaskLinkCollection getPredecessors(Task task)
Returns a collection of task links which are predecessors of the specified task.
- Parameters:
task
- The task to get predecessors for.- Returns:
- List of predecessors
TaskLink
.
-
getProjectExternallyEdited
public final NullableBool getProjectExternallyEdited()
Gets a value indicating whether ProjectExternallyEdited is set or not.
- Returns:
- a value indicating whether ProjectExternallyEdited is set or not.
-
setProjectExternallyEdited
public final void setProjectExternallyEdited(NullableBool value)
Sets a value indicating whether ProjectExternallyEdited is set or not.
- Parameters:
value
- a value indicating whether ProjectExternallyEdited is set or not.
-
getProjectFileInfo
public static ProjectFileInfo getProjectFileInfo(String filename)
Read project file info from the file.
- Parameters:
filename
- The project filename.- Returns:
- The project file info
ProjectFileInfo
.
-
getProjectFileInfo
public static ProjectFileInfo getProjectFileInfo(InputStream stream)
Gets project file info from the stream.
- Parameters:
stream
- The data stream.- Returns:
- The project file info
ProjectFileInfo
.
-
getRemoveFileProperties
public final NullableBool getRemoveFileProperties()
Gets a value indicating whether RemoveFileProperties is set or not.
- Returns:
- a value indicating whether RemoveFileProperties is set or not.
-
setRemoveFileProperties
public final void setRemoveFileProperties(NullableBool value)
Sets a value indicating whether RemoveFileProperties is set or not.
- Parameters:
value
- a value indicating whether RemoveFileProperties is set or not.
-
getResourceAssignments
public final ResourceAssignmentCollection getResourceAssignments()
Gets ResourceAssignmentCollection object.
- Returns:
- ResourceAssignmentCollection object.
-
getResourceFilters
public final FilterCollection getResourceFilters()
Gets all the resource-based filter definitions. ResourceFilters is a collection of
Filter
objects.- Returns:
- all the resource-based filter definitions.
-
getResourceGroups
public final GroupCollection getResourceGroups()
Gets all of the resource-based group definitions. ResourceGroups is a collection of
Group
objects.- Returns:
- all of the resource-based group definitions.
-
getResources
public final ResourceCollection getResources()
Gets ResourceCollection object.
- Returns:
- ResourceCollection object.
-
getRevision
public final int getRevision()
Gets a value of Revision.
- Returns:
- a value of Revision.
-
setRevision
public final void setRevision(int value)
Sets a value of Revision.
- Parameters:
value
- a value of Revision.
-
getRootTask
public final Task getRootTask()
Gets the root of the tree of tasks.
- Returns:
- the root of the tree of tasks.
-
getSaveVersion
public final int getSaveVersion()
Gets a value of SaveVersion.
- Returns:
- a value of SaveVersion.
-
setSaveVersion
public final void setSaveVersion(int value)
Sets a value of SaveVersion.
- Parameters:
value
- a value of SaveVersion.
-
getScheduleFromStart
public final NullableBool getScheduleFromStart()
Gets a value indicating whether ScheduleFromStart is set or not.
- Returns:
- a value indicating whether ScheduleFromStart is set or not.
-
setScheduleFromStart
public final void setScheduleFromStart(NullableBool value)
Sets a value indicating whether ScheduleFromStart is set or not.
- Parameters:
value
- a value indicating whether ScheduleFromStart is set or not.
-
getShowProjectSummaryTask
public final boolean getShowProjectSummaryTask()
Gets a value indicating whether ShowProjectSummaryTask is set or not.
- Returns:
- a value indicating whether ShowProjectSummaryTask is set or not.
-
setShowProjectSummaryTask
public final void setShowProjectSummaryTask(boolean value)
Sets a value indicating whether ShowProjectSummaryTask is set or not.
- Parameters:
value
- a value indicating whether ShowProjectSummaryTask is set or not.
-
getSplitsInProgressTasks
public final NullableBool getSplitsInProgressTasks()
Gets a value indicating whether SplitsInProgressTasks is set or not.
- Returns:
- a value indicating whether SplitsInProgressTasks is set or not.
-
setSplitsInProgressTasks
public final void setSplitsInProgressTasks(NullableBool value)
Sets a value indicating whether SplitsInProgressTasks is set or not.
- Parameters:
value
- a value indicating whether SplitsInProgressTasks is set or not.
-
getSpreadActualCost
public final NullableBool getSpreadActualCost()
Gets a value indicating whether SpreadActualCost is set or not.
- Returns:
- a value indicating whether SpreadActualCost is set or not.
-
setSpreadActualCost
public final void setSpreadActualCost(NullableBool value)
Sets a value indicating whether SpreadActualCost is set or not.
- Parameters:
value
- a value indicating whether SpreadActualCost is set or not.
-
getSpreadPercentComplete
public final NullableBool getSpreadPercentComplete()
Gets a value indicating whether SpreadPercentComplete is set or not.
- Returns:
- a value indicating whether SpreadPercentComplete is set or not.
-
setSpreadPercentComplete
public final void setSpreadPercentComplete(NullableBool value)
Sets a value indicating whether SpreadPercentComplete is set or not.
- Parameters:
value
- a value indicating whether SpreadPercentComplete is set or not.
-
getStartDate
public final Date getStartDate()
Gets a value of StartDate.
- Returns:
- a value of StartDate.
-
setStartDate
public final void setStartDate(Date value)
Sets a value of StartDate.
- Parameters:
value
- a value of StartDate.
-
getStatusDate
public final Date getStatusDate()
Gets a value of StatusDate.
- Returns:
- a value of StatusDate.
-
setStatusDate
public final void setStatusDate(Date value)
Sets a value of StatusDate.
- Parameters:
value
- a value of StatusDate.
-
getSubject
public final String getSubject()
Gets a value of Subject.
- Returns:
- a value of Subject.
-
setSubject
public final void setSubject(String value)
Sets a value of Subject.
- Parameters:
value
- a value of Subject.
-
getTables
public final TableCollection getTables()
Gets a list of
Table
objects.- Returns:
- a list of
Table
objects.
-
getTaskFilters
public final FilterCollection getTaskFilters()
Gets all the task-based filter definitions. TaskFilters is a collection of
Filter
objects.- Returns:
- all the task-based filter definitions.
-
getTaskGroups
public final GroupCollection getTaskGroups()
Gets all the task-based group definitions. TaskGroups is a collection of
Group
objects.- Returns:
- all the task-based group definitions.
-
getTaskLinks
public final TaskLinkCollection getTaskLinks()
Gets
TaskLinkCollection
object.- Returns:
TaskLinkCollection
object.
-
getTaskUpdatesResource
public final NullableBool getTaskUpdatesResource()
Gets a value indicating whether TaskUpdatesResource is set or not.
- Returns:
- a value indicating whether TaskUpdatesResource is set or not.
-
setTaskUpdatesResource
public final void setTaskUpdatesResource(NullableBool value)
Sets a value indicating whether TaskUpdatesResource is set or not.
- Parameters:
value
- a value indicating whether TaskUpdatesResource is set or not.
-
getTemplate
public final String getTemplate()
Gets a value of Template.
- Returns:
- a value of Template.
-
setTemplate
public final void setTemplate(String value)
Sets a value of Template.
- Parameters:
value
- a value of Template.
-
getTimescaleFinish
public final Date getTimescaleFinish()
Gets a value of TimescaleFinish.
- Returns:
- a value of TimescaleFinish.
-
setTimescaleFinish
public final void setTimescaleFinish(Date value)
Sets a value of TimescaleFinish.
- Parameters:
value
- a value of TimescaleFinish.
-
getTimescaleStart
public final Date getTimescaleStart()
Gets a value of TimescaleStart.
- Returns:
- a value of TimescaleStart.
-
setTimescaleStart
public final void setTimescaleStart(Date value)
Sets a value of TimescaleStart.
- Parameters:
value
- a value of TimescaleStart.
-
getTitle
public final String getTitle()
Gets a value of Title.
- Returns:
- a value of Title.
-
setTitle
public final void setTitle(String value)
Sets a value of Title.
- Parameters:
value
- a value of Title.
-
getUid
public final String getUid()
Gets a value of Uid.
- Returns:
- a value of Uid.
-
setUid
public final void setUid(String value)
Sets a value of Uid.
- Parameters:
value
- a value of Uid.
-
getUpdateManuallyScheduledTasksWhenEditingLinks
public final NullableBool getUpdateManuallyScheduledTasksWhenEditingLinks()
Gets a value indicating whether UpdateManuallyScheduledTasksWhenEditingLinks is set or not.
- Returns:
- a value indicating whether UpdateManuallyScheduledTasksWhenEditingLinks is set or not.
-
setUpdateManuallyScheduledTasksWhenEditingLinks
public final void setUpdateManuallyScheduledTasksWhenEditingLinks(NullableBool value)
Sets a value indicating whether UpdateManuallyScheduledTasksWhenEditingLinks is set or not.
- Parameters:
value
- a value indicating whether UpdateManuallyScheduledTasksWhenEditingLinks is set or not.
-
getVbaProject
public final VbaProject getVbaProject()
Gets an instance of
VbaProject
(getVbaProject()
/setVbaProject(VbaProject)
) class.- Returns:
- an instance of
VbaProject
(getVbaProject()
/setVbaProject(VbaProject)
) class.
-
getViews
public final ViewCollection getViews()
Gets a list of
View
objects.- Returns:
- a list of
View
objects.
-
getWBSCodeDefinition
public final WBSCodeDefinition getWBSCodeDefinition()
Gets WBS Code Definition for the project.
- Returns:
- WBS Code Definition for the project.
-
setWBSCodeDefinition
public final void setWBSCodeDefinition(WBSCodeDefinition value)
Sets WBS Code Definition for the project.
- Parameters:
value
- WBS Code Definition for the project.
-
getWeekStartDay
public final int getWeekStartDay()
Gets a value of WeekStartDay.
- Returns:
- a value of WeekStartDay.
-
setWeekStartDay
public final void setWeekStartDay(int value)
Sets a value of WeekStartDay.
- Parameters:
value
- a value of WeekStartDay.
-
getWork
public final Duration getWork(double val)
Gets
Duration
object with the specifieddouble
value and default work format.- Parameters:
val
- specified double value.- Returns:
- Duration object.
-
getWorkFormat
public final int getWorkFormat()
Gets a value of WorkFormat.
- Returns:
- a value of WorkFormat.
-
setWorkFormat
public final void setWorkFormat(int value)
Sets a value of WorkFormat.
- Parameters:
value
- a value of WorkFormat.
-
print
public final void print()
Prints project to the default printer with default printer settings using the standard (no User Interface) print controller.
-
print
public final void print(PrintOptions options)
Prints project to the default printer with default printer settings and custom save options using the standard (no User Interface) print controller.
- Parameters:
options
- the specified instance of thePrintOptions
class.
-
print
public final void print(String printerName)
Prints project to the specified printer with default printer settings using the standard (no User Interface) print controller.
- Parameters:
printerName
- Specified printer name.
-
print
public final void print(PrinterSettings printerSettings)
Prints project according to the specified printer settings using the standard (no User Interface) print controller.
- Parameters:
printerSettings
- the specified instance of thePrinterSettings
class.
-
print
public final void print(PrinterSettings printerSettings, String documentName)
Prints project according to the specified printer settings using the standard (no User Interface) print controller.
- Parameters:
printerSettings
- the specified instance of thePrinterSettings
class.documentName
- the document name to display (for example, in a print status dialog box or printer queue).
-
print
public final void print(PrinterSettings printerSettings, PrintOptions options)
Prints project according to the specified printer settings and custom save options using the standard (no User Interface) print controller.
- Parameters:
printerSettings
- the specified instance of thePrinterSettings
class.options
- the specified instance of thePrintOptions
class.
-
print
public final void print(PrinterSettings printerSettings, PrintOptions options, String documentName)
Prints project according to the specified printer settings, custom save options and the specified document name using the standard (no User Interface) print controller.
- Parameters:
printerSettings
- the specified instance of thePrinterSettings
class.options
- the specified instance of thePrintOptions
class.documentName
- the document name to display (for example, in a print status dialog box or printer queue).
-
recalculate
public final void recalculate()
Reschedules all project tasks ids, outline levels, start/finish dates, sets early/late dates, calculates slacks, work and cost fields.
-
recalculate
public final void recalculate(boolean validate)
Reschedules all project tasks ids, outline levels, start/finish dates, sets early/late dates, calculates slacks, work and cost fields with optional validation.
- Parameters:
validate
- If true the validation of recalculation will be performed. What data is validated: At the moment only basic validation of task and task link date ranges is implemented. Task's date ranges (e.g. ActualStart - ActualFinish, EarlyStart - EarlyFinish, etc.) as well as Task Links dates will be checked against the date criteria that start date is less or equal than finish date. If any of conditions described above is failed thenRecalculationValidationException
will be thrown.
-
recalculateResourceFields
public final void recalculateResourceFields()
Recalculates Id, Start and Finish of resources.
-
recalculateResourceStartFinish
public final void recalculateResourceStartFinish()
Recalculates Start and Finish of resources.
-
removeInvalidResourceAssignments
public final void removeInvalidResourceAssignments()
Eliminates invalid resource assignments from the project resource assignments list.
MS Project creates an empty resource assignment for each task. Call the method to remove them.
-
renumberWBSCode
public final void renumberWBSCode()
Renumber WBS code of all tasks.
-
renumberWBSCode
public final void renumberWBSCode(List<Integer> taskIds)
Renumber WBS code of passed tasks.
- Parameters:
taskIds
- Task identifiers to renumber WBS codes.
-
rescheduleUncompletedWorkToStartAfter
public final void rescheduleUncompletedWorkToStartAfter(Date after)
Reschedules uncompleted project work to start after a specified date.
- Parameters:
after
- The date to reschedule uncompleted work after.
Ensure that Project.CanSplitsInProgressTasks flag is set to true before using this method.
-
rescheduleUncompletedWorkToStartAfter
public final void rescheduleUncompletedWorkToStartAfter(Date after, List<Task> taskCollection)
Reschedules uncompleted work for a specified list of tasks to start after a specified date.
- Parameters:
after
- The date to reschedule uncompleted work after.taskCollection
- List<Task> of tasks to reschedule uncompleted work for.
Ensure that Project.CanSplitsInProgressTasks flag is set to true before using this method.
-
save
public final void save(String filename, MPPSaveOptions options)
Saves the document to mpp file format using the specified save options.
- Parameters:
filename
- The file name.options
- The save options.
-
save
public final void save(String filename, SaveOptions options)
Saves the document to a file using the specified save options.
- Parameters:
filename
- The file name.options
- The save options.
-
save
public final void save(String filename, int format)
Saves the project data to the file.
- Parameters:
filename
- The file name.format
- The save file format.
-
save
public final void save(String filename)
Saves the project data to the file in mpp format.
- Parameters:
filename
- The file name.
-
save
public final void save(OutputStream stream, SaveOptions options)
Saves the project to a stream using the specified save options.
- Parameters:
stream
- The stream.options
- The save options.
-
save
public void save(OutputStream stream, MPPSaveOptions options)
Saves the project to a stream using the specified save options.
- Parameters:
stream
- The stream.options
- The save options.
-
save
public void save(OutputStream stream, int format)
Saves the project data to the stream.
- Parameters:
stream
- The stream.format
- the specified save file format.SaveFileFormat
-
saveAsTemplate
public void saveAsTemplate(String fileName, SaveTemplateOptions options)
Saves the project as a template.
- Parameters:
fileName
- The file name.options
- the specified save optionsSaveTemplateOptions
.
-
saveAsTemplate
public final void saveAsTemplate(String fileName)
Saves the project as a template to the specified file path.
- Parameters:
fileName
- the specified file name.
-
saveAsTemplate
public final void saveAsTemplate(OutputStream stream)
Saves the project as a template to a specified stream.
- Parameters:
stream
- the specified stream to save the project to.
-
saveAsTemplate
public final void saveAsTemplate(OutputStream stream, SaveTemplateOptions options)
Saves the project as a template to a specified stream.
- Parameters:
stream
- Stream to save the project template to.options
- the specified save optionsSaveTemplateOptions
.
-
saveReport
public final void saveReport(OutputStream stream)
Saves the project overview report to the stream.
- Parameters:
stream
- The stream to save project report to.
-
saveReport
public final void saveReport(String fileName)
Saves the project overview report to PDF file.
- Parameters:
fileName
- The file name.
-
saveReport
public void saveReport(OutputStream stream, int reportType)
Saves the project report of the specified type to the specified stream.
- Parameters:
stream
- the specified stream to save project report to.reportType
- the specified report type.ReportType
-
saveReport
public final void saveReport(String fileName, int reportType)
Saves the project report of the specified type in PDF format to the specified file path.
- Parameters:
fileName
- the specified file name.reportType
- the specified report type.ReportType
-
selectAllChildTasks
public final List<Task> selectAllChildTasks()
Recursively collects all child tasks of the root task.
- Returns:
- The collection of tasks.
-
set
public final <T> void set(Key<T,Integer> key, T val)
Maps the specified property to the specified value in this container.
- Parameters:
key
- the specified property key.Prj
for getting the property key.val
- the value.
-
set
public final void set(Key<Date,Integer> key, Date val)
Maps the specified property to the specified value in this container.
- Parameters:
key
- the specified property key.Prj
for getting the property key.val
- the value.
-
setBaseline
public final void setBaseline(int baselineType)
Saves baseline fields to the specified baseline for the entire project.
- Parameters:
baselineType
- The baseline type to save baseline data to.
-
setBaseline
public final void setBaseline(int baselineType, Iterable<Task> taskCollection)
Saves baseline fields to the specified baseline for the selected tasks.
- Parameters:
baselineType
- The baseline type to save baseline data to.taskCollection
- List of tasks to save baseline data for.
-
setBaselineSaveTime
public final void setBaselineSaveTime(int baselineNumber, Date value)
Sets the baseline save time.
- Parameters:
baselineNumber
- The baseline's numberBaselineType
.value
- The baseline's last save date and time.
Set value to DateTime.MinValue if the baseline was not saved.
-
updateProjectWorkAsComplete
public final void updateProjectWorkAsComplete(Date completeThrough, boolean setZeroOrHundredPercentCompleteOnly)
Updates all work as complete through a specified date for the entire project.
- Parameters:
completeThrough
- The date to update work as completed through.setZeroOrHundredPercentCompleteOnly
- If set to true updates only those tasks as 100% complete whose finish date is before specified complete-through date. Otherwise, calculates a percentage complete value based on scheduled start and complete-through dates.
-
updateProjectWorkAsComplete
public final void updateProjectWorkAsComplete(Date completeThrough, boolean setZeroOrHundredPercentCompleteOnly, List<Task> taskCollection)
Updates all work as complete through a specified date for the specified list of tasks.
- Parameters:
completeThrough
- The date to update work as completed through.setZeroOrHundredPercentCompleteOnly
- If set to true updates only those tasks as 100% complete whose finish date is before specified complete-through date. Otherwise, calculates a percentage complete value based on scheduled start and complete-through dates.taskCollection
- List<Task> of tasks to update work for.
-
-