# Interface: com.pnfsoftware.jeb.core.IRuntimeProject

A runtime project represents a loaded instance of a JEB project.

## Static Field: AlwaysProcessDuplicateInputs
Type: `java.lang.String`

Constant value: `AlwaysProcessDuplicateInputs`
Description: Project property

## Static Field: ArtifactProcessingDepth
Type: `java.lang.String`

Constant value: `ArtifactProcessingDepth`
Description: Project property

## Static Field: CompressPersistedProject
Type: `java.lang.String`

Constant value: `CompressPersistedProject`
Description: Project property

## Static Field: PersistArtifactFiles
Type: `java.lang.String`

Constant value: `PersistArtifactFiles`
Description: Project property

## Static Field: PersistenceStrategy
Type: `java.lang.String`

Constant value: `PersistenceStrategy`
Description: Project property: 0=default \(full\); 1=full; 2=quick.

## Method: close

Description: Close this project. This method should not be called directly; to close a project, use the [managing context's unload\(\)](IEnginesContext#unloadProject(String)) method.

## Method: destroyUnit
- parameter: `unit`, type: `com.pnfsoftware.jeb.core.units.IUnit`
- return type: `boolean`

Description: This method is used to destroy a unit living in this project. All sub\-units will be destroyed as well.
parameter: unit: unit to destroy
return: success indicator

## Method: findUnit
- parameter: `unitClazz`, type: `java.lang.Class<T>`
- return type: `T`

Description: Convenience method used to retrieve a unit of the project by its class type. The first retrieved unit is returned.
parameter: unitClazz: [unit](IUnit) type
return: a unit or null

## Method: findUnits
- parameter: `unitClazz`, type: `java.lang.Class<T>`
- return type: `java.util.List<T>`

Description: Convenience method used to retrieve units of the project by their class type.
parameter: unitClazz: [unit](IUnit) type
return: a list of units, potentially empty

## Method: finishArtifactProcessing
- parameter: `a`, type: `com.pnfsoftware.jeb.core.ILiveArtifact`

Description: If the artifacts were [processed](#processArtifact(IArtifact, String, boolean, boolean)) with `doNoProcessUnit` set to true, this method may be called afterward to finish processing to process all top\-level units yielded by the artifact.
parameter: a: live artifact resulting from a call to `process(...)`

## Method: getArtifactCount
- return type: `int`

Description: Retrieve the count of artifacts living in this project.
return: artifact count

## Method: getBookmarkManager
- return type: `com.pnfsoftware.jeb.core.BookmarkManager`

Description: Get the bookmark manager.
return: bookmark manager

## Method: getCreationTimestamp
- return type: `long`

Description: Retrieve the project creation timestamp.
return: unix timestamp in milliseconds

## Method: getEnginesContext
- return type: `com.pnfsoftware.jeb.core.IEnginesContext`

Description: Retrieve the JEB Engines context that's managing this project.
return: owning engines context

## Method: getInputRecords
- return type: `java.util.List<? extends com.pnfsoftware.jeb.core.IInputRecord>`

Description: Retrieve the list of inputs processed into the project. Those inputs may or may no longer be present as artifacts.
return: processed input records

## Method: getKey
- return type: `java.lang.String`

Description: Retrieve this project key, used to uniquely identify a project within an [IEnginesContext](IEnginesContext).
return: project key

## Method: getLiveArtifact
- parameter: `index`, type: `int`
- return type: `com.pnfsoftware.jeb.core.ILiveArtifact`

Description: Retrieve a live artifact by index.
parameter: index: artifact index
return: live artifact at the requested index

## Method: getLiveArtifacts
- return type: `java.util.List<com.pnfsoftware.jeb.core.ILiveArtifact>`

Description: Retrieve the list of artifacts managed by this project.
return: live artifacts managed by this project

## Method: getName
- return type: `java.lang.String`

Description: Set this project name.
return: project name

## Method: getNotes
- return type: `java.lang.String`

Description: Retrieve the user notes.
return: project notes

## Method: getPersistenceKey
- return type: `java.lang.String`

Description: Retrieve the project persistence key. The persistence key may be different from the actual project key. It indicates the location of the persisted database.
return: persistence key

## Method: getPersistenceStrategy
- return type: `int`

Description: This convenience routine is used to retrieve the JDB2 [#PersistenceStrategy](#PersistenceStrategy) currently used by this project.
return: persistence strategy value

## Method: getProcessor
- return type: `com.pnfsoftware.jeb.core.units.IUnitProcessor`

Description: Retrieve the processor \(parser\) used by this project to process input data and generate units.
return: unit processor

## Method: getPropertyDefinitionManager
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyDefinitionManager`

Description: Get the PDM of this project. Each project has it own PDM.
return: project property\-definition manager

## Method: getPropertyManager
- return type: `com.pnfsoftware.jeb.core.properties.IPropertyManager`

Description: Get the PM of this project. Each project has its own PM.
return: project property manager

## Method: getRecordedTimestamp
- return type: `long`

Description: Retrieve the last time this project was saved to JDB2.
return: unix timestamp in milliseconds; 0 if the project was never saved         \([#isReloaded()](#isReloaded()) would also return false\)

## Method: getUptime
- return type: `long`

Description: Retrieve the duration this project has been opened JEB since it's been last opened.
return: duration in milliseconds

## Method: hasLiveArtifacts
- return type: `boolean`

Description: Determine whether the project currently contains live artifacts.
return: true if at least one live artifact is present

## Method: isClosed
- return type: `boolean`

Description: Determine whether this project has been closed.
return: true if the project is closed

## Method: isReloaded
- return type: `boolean`

Description: Determine whether this project is new \(it was created\), or was reloaded from a JDB2 database.
return: true if the project was reloaded from persisted data

## Method: processArtifact
- parameter: `file`, type: `java.io.File`
- return type: `com.pnfsoftware.jeb.core.ILiveArtifact`

Description: Process a file artifact into this project.
parameter: file: input file
return: an artifact living in the project, likely to hold one or more parent [unit](IUnit)s
throws: on artifact\-processing error

## Method: processArtifact
- parameter: `artifact`, type: `com.pnfsoftware.jeb.core.IArtifact`
- return type: `com.pnfsoftware.jeb.core.ILiveArtifact`

Description: Process an artifact into this project.
parameter: artifact: an [Artifact](Artifact), likely backed by a [file](FileInput)
return: an artifact living in the project, likely to hold one or more parent [unit](IUnit)s

## Method: processArtifact
- parameter: `artifact`, type: `com.pnfsoftware.jeb.core.IArtifact`
- parameter: `wantedType`, type: `java.lang.String`
- parameter: `softDelegation`, type: `boolean`
- parameter: `doNotProcessUnit`, type: `boolean`
- return type: `com.pnfsoftware.jeb.core.ILiveArtifact`

Description: Process an artifact into this project.
parameter: artifact: an [Artifact](Artifact), likely backed by a [file](FileInput)
parameter: wantedType: leave null to let the parser determine the type of artifact; see            [IUnitProcessor](IUnitProcessor) for details
parameter: softDelegation: prefer soft delegation and avoid creating generic unit if the input            type was undetermined; see [IUnitProcessor](IUnitProcessor) for details
parameter: doNotProcessUnit: set to true to skip unit processing \(the yielded unit, if any, would            simply be created\)
return: an artifact living in the project, likely to hold one or more parent [unit](IUnit)s

## Method: setName
- parameter: `name`, type: `java.lang.String`

Description: Retrieve this project name.
parameter: name: project name

## Method: setNotes
- parameter: `notes`, type: `java.lang.String`

Description: Set or update the user notes.
parameter: notes: project notes

## Method: setPersistenceStrategy
- parameter: `strategy`, type: `int`

Description: This convenience routine is used to set the JDB2 [#PersistenceStrategy](#PersistenceStrategy) currently used by this project.
parameter: strategy: persistence strategy value

