com.aliyun.svideosdk.common.struct.project

## Class AliyunEditorProject

- java.lang.Object
- - com.aliyun.svideosdk.common.struct.project.AliyunEditorProject

-     public class AliyunEditorProject
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.text.SimpleDateFormat` | `DATE_FORMAT`
    `static java.lang.String` | `DRAFT_DIR` The draft list dir.
    `Timeline` | `mTimeline` the project timeline
    `static java.lang.String` | `PROJECT_FILENAME` The project config name.
    `static int` | `PROJECT_VERSION` The current version.
    `static java.lang.String` | `TEMPLATE_DRAFT_DIR` The template draft list dir.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AliyunEditorProject()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAction(ActionBase action)` Add the action.
    `void` | `addAnimationFilter(Filter filter)` Adds an animated filter.
    `void` | `addAudioTrackClip(AudioTrackClip audioTrackClip)` Add the audio clip.
    `void` | `addEffect(int targetId, Effect effect)` Adds the effect.
    `void` | `addPasterTrack(PasterTrack pasterTrack)` Adds the paster track.
    `void` | `addTimeFilter(TimeFilter timeFilter)` Add the time filter.
    `void` | `clearAnimationFilters()` clear the animated filter.
    `void` | `clearColorEffect()` clear the color filter.
    `void` | `clearEffectTrack(EffectTrack.Type type)` Clear the effect track of the specified type
    `void` | `clearMusic()` Clear the music effect.
    `void` | `clearRollCaptionTrack()` Clear the roll caption track.
    `void` | `clearTimeFilters()` Clear the time filter.
    `java.util.List<Filter>` | `getAllAnimationFilters()` Gets the all animated filter.
    `java.util.List<TimeFilter>` | `getAllTimeFilters()` Gets the all time filter.
    `int` | `getAudioId()` Gets the id of the last added music effect.
    `AudioTrackClip` | `getAudioTrackClipById(int clipId)` Gets the audio clip of the specified id.
    `PaintTrack` | `getCanvasTrack()` Gets the canvas track.
    `Filter` | `getColorEffect()` Gets the color filter.
    `Config` | `getConfig()` Gets the project configuration.
    `Source` | `getCover()` Gets the project cover resource.
    `java.lang.String` | `getCreationTime()` Gets the project creation time.
    `float` | `getDuration()` Gets the timeline duration.
    `java.lang.String` | `getModifiedTime()`
    `MVFilter` | `getMVEffect()` Gets the MV filter.
    `PasterTrack` | `getPasterTrackByID(int id)` Gets the paster track of the specified id.
    `java.util.List<PasterTrack>` | `getPasterTrackByType(PasterTrack.Type type)` Gets the paster track of the specified type.
    `java.io.File` | `getProjectDir()`
    `java.io.File` | `getProjectFile()`
    `static java.io.File` | `getProjectFile(java.io.File dir)`
    `java.lang.String` | `getProjectId()` Gets the project id.
    `java.lang.String` | `getRequestID()`
    `long` | `getResourceSize()` Gets the project resource size.
    `RollCaptionTrack` | `getRollCaptionTrack()` Gets the roll caption track.
    `TailWaterMark` | `getTailWaterMark()` Gets the tail watermark.
    `Source` | `getTemplate()` Gets the template source.
    `Timeline` | `getTimeline()` Gets the project timeline.
    `java.lang.String` | `getTitle()` Gets the project title.
    `Uri` | `getUri()`
    `int` | `getVersion()` Gets the project configuration version.
    `VideoTrackClip` | `getVideoTrackClipById(int clipId)` Gets the video clip of the specified id.
    `WaterMark` | `getWaterMark()` Gets the watermark.
    `boolean` | `isCustomCover()` Gets the whether to customize the cover.
    `void` | `refreshTimeLine()` refresh timeline
    `void` | `removeActionById(int id)` Remove the action of the specified id.
    `void` | `removeAnimationFilter(int id)` Remove the animated filter.
    `void` | `removeAudioTrackClip(int clipId)` Remove the audio clip of the specified id.
    `void` | `removeCanvasTrack()` Remove the canvas track.
    `void` | `removeEffect(int targetId, Effect effect)` Remove the effect.
    `void` | `removePasterTrack(int id)` Remove the paster track of the specified id.
    `void` | `removeTimeFilter(int id)` Remove the time filter of the specified id.
    `void` | `removeVideoTrackClip(int clipId)` Remove the audio clip of the specified id.
    `void` | `setCanvasTrack(PaintTrack paintTrack)` Sets the canvas track.
    `void` | `setColorEffect(Filter filter)` Sets the color filter.
    `void` | `setCover(Source cover)` Sets the project cover resource.
    `void` | `setCreationTime(java.lang.String creationTime)` Sets the project creation time.
    `void` | `setCustomCover(boolean customCover)` Sets the whether to customize the cover.
    `void` | `setDenoise(int id, int denoiseWeight)` Sets denoises an audio stream.
    `void` | `setDuration(float duration)` Sets the timeline duration.
    `void` | `setLutEffect(Filter filter)` Sets the color filter.
    `void` | `setModifiedTime(java.lang.String modifiedTime)` Gets the latest modification time of the project.
    `void` | `setMusicWeight(int id, int weight)` Sets the mixing weight of an audio stream.
    `void` | `setMVEffect(MVFilter filter)` Sets the MV filter.
    `void` | `setProjectDir(java.io.File dir, java.io.File file)`
    `void` | `setProjectId(java.lang.String projectId)` Sets the project id.
    `void` | `setRequestID(java.lang.String requestID)`
    `void` | `setResourceSize(long resourceSize)` Gets the project resource size.
    `void` | `setRollCaptionTrack(RollCaptionTrack rollCaptionTrack)` Sets the roll caption track.
    `void` | `setTailWaterMark(TailWaterMark tailWaterMark)` Sets the tail watermark.
    `void` | `setTemplate(Source template)` Sets the project template.
    `void` | `setTitle(java.lang.String title)` Sets the project title.
    `void` | `setVersion(int version)` Sets the project configuration version.
    `void` | `setWaterMark(WaterMark waterMark)` Sets the watermark.
    `void` | `updateAnimationFilter(EffectFilter filter)` Update the animated filter.
    `void` | `updateFileSize()`
    `void` | `updateTransition(int clipId, TransitionBase transitionBase)` Update the transition config.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DATE_FORMAT

          public static final java.text.SimpleDateFormat DATE_FORMAT

    - #### DRAFT_DIR

          public static final java.lang.String DRAFT_DIR

      The draft list dir.
      See Also:
        Constant Field Values

    - #### TEMPLATE_DRAFT_DIR

          public static final java.lang.String TEMPLATE_DRAFT_DIR

      The template draft list dir.
      See Also:
        Constant Field Values

    - #### PROJECT_FILENAME

          public static final java.lang.String PROJECT_FILENAME

      The project config name.
      See Also:
        Constant Field Values

    - #### PROJECT_VERSION

          public static final int PROJECT_VERSION

      The current version.
      See Also:
        Constant Field Values

    - #### mTimeline

          public Timeline mTimeline

      the project timeline

  - ### Constructor Detail

    - #### AliyunEditorProject

          public AliyunEditorProject()

  - ### Method Detail

    - #### getRequestID

          public java.lang.String getRequestID()

    - #### setRequestID

          public void setRequestID(java.lang.String requestID)

    - #### getUri

          public Uri getUri()

    - #### getProjectFile

          public static java.io.File getProjectFile(java.io.File dir)

    - #### getProjectDir

          public java.io.File getProjectDir()

    - #### setProjectDir

          public void setProjectDir(java.io.File dir,
                                    java.io.File file)

    - #### getProjectFile

          public java.io.File getProjectFile()

    - #### updateFileSize

          public void updateFileSize()

    - #### getVersion

          public int getVersion()

      Gets the project configuration version.
      Returns:
        version

    - #### setVersion

          public void setVersion(int version)

      Sets the project configuration version.
      Parameters:
        `version` - version

    - #### getProjectId

          public java.lang.String getProjectId()

      Gets the project id.
      Returns:
        project id

    - #### setProjectId

          public void setProjectId(java.lang.String projectId)

      Sets the project id.
      Parameters:
        `projectId` - project id

    - #### getTemplate

          public Source getTemplate()

      Gets the template source. Added in v3.27.0
      Returns:
        template

    - #### setTemplate

          public void setTemplate(Source template)

      Sets the project template. Added in v3.27.0
      Parameters:
        `template` - template

    - #### getTitle

          public java.lang.String getTitle()

      Gets the project title.
      Returns:
        title

    - #### setTitle

          public void setTitle(java.lang.String title)

      Sets the project title.
      Parameters:
        `title` - title

    - #### getCreationTime

          public java.lang.String getCreationTime()

      Gets the project creation time.
      Returns:
        creation time

    - #### setCreationTime

          public void setCreationTime(java.lang.String creationTime)

      Sets the project creation time.
      Parameters:
        `creationTime` - creation time

    - #### getModifiedTime

          public java.lang.String getModifiedTime()

    - #### setModifiedTime

          public void setModifiedTime(java.lang.String modifiedTime)

      Gets the latest modification time of the project.
      Parameters:
        `modifiedTime` - modification time

    - #### getTimeline

          public Timeline getTimeline()

      Gets the project timeline.
      Returns:
        timeline

    - #### getDuration

          public float getDuration()

      Gets the timeline duration. Unit: second. Accurate to 4 decimal places.
      Returns:
        the timeline duration

    - #### setDuration

          public void setDuration(float duration)

      Sets the timeline duration. Unit: second. Accurate to 4 decimal places.
      Parameters:
        `duration` - the timeline duration

    - #### getResourceSize

          public long getResourceSize()

      Gets the project resource size. Unit: KB.
      Returns:
        resource size

    - #### setResourceSize

          public void setResourceSize(long resourceSize)

      Gets the project resource size. Unit: KB.
      Parameters:
        `resourceSize` - resource size

    - #### getCover

          public Source getCover()

      Gets the project cover resource.
      Returns:
        cover

    - #### setCover

          public void setCover(Source cover)

      Sets the project cover resource.
      Parameters:
        `cover` - resource

    - #### isCustomCover

          public boolean isCustomCover()

      Gets the whether to customize the cover. Added in v3.25.0
      Returns:
        is custom cover

    - #### setCustomCover

          public void setCustomCover(boolean customCover)

      Sets the whether to customize the cover. Added in v3.25.0
      Parameters:
        `customCover` - is custom cover

    - #### getConfig

          public Config getConfig()

      Gets the project configuration.
      Returns:
        config

    - #### getVideoTrackClipById

          public VideoTrackClip getVideoTrackClipById(int clipId)

      Gets the video clip of the specified id.
      Parameters:
        `clipId` - clip id
      Returns:
        video clip

    - #### removeVideoTrackClip

          public void removeVideoTrackClip(int clipId)

      Remove the audio clip of the specified id.
      Parameters:
        `clipId` - clip id

    - #### getAudioTrackClipById

          public AudioTrackClip getAudioTrackClipById(int clipId)

      Gets the audio clip of the specified id.
      Parameters:
        `clipId` - clip id
      Returns:
        audio clip

    - #### addAudioTrackClip

          public void addAudioTrackClip(AudioTrackClip audioTrackClip)

      Add the audio clip.
      Parameters:
        `audioTrackClip` - audio clip

    - #### removeAudioTrackClip

          public void removeAudioTrackClip(int clipId)

      Remove the audio clip of the specified id.
      Parameters:
        `clipId` - clip id

    - #### clearMusic

          public void clearMusic()

      Clear the music effect.

    - #### getAudioId

          public int getAudioId()

      Gets the id of the last added music effect.
      Returns:
        id

    - #### addAction

          public void addAction(ActionBase action)

      Add the action.
      Parameters:
        `action` - action

    - #### removeActionById

          public void removeActionById(int id)

      Remove the action of the specified id.
      Parameters:
        `id` - id

    - #### setMusicWeight

          public void setMusicWeight(int id,
                                     int weight)

      Sets the mixing weight of an audio stream.
      Parameters:
        `id` - id
        `weight` - mixing weight

    - #### setDenoise

          public void setDenoise(int id,
                                 int denoiseWeight)

      Sets denoises an audio stream.
      Parameters:
        `id` - id
        `denoiseWeight` - 0:close 100:max

    - #### addEffect

          public void addEffect(int targetId,
                                Effect effect)

      Adds the effect.
      Parameters:
        `targetId` - target id
        `effect` - effect

    - #### removeEffect

          public void removeEffect(int targetId,
                                   Effect effect)

      Remove the effect.
      Parameters:
        `targetId` - target id
        `effect` - effect

    - #### setColorEffect

          public void setColorEffect(Filter filter)

      Sets the color filter.
      Parameters:
        `filter` - color filter

    - #### clearColorEffect

          public void clearColorEffect()

      clear the color filter.

    - #### setLutEffect

          public void setLutEffect(Filter filter)

      Sets the color filter.
      Parameters:
        `filter` - color filter

    - #### getColorEffect

          public Filter getColorEffect()

      Gets the color filter.
      Returns:
        color filter

    - #### clearEffectTrack

          public void clearEffectTrack(EffectTrack.Type type)

      Clear the effect track of the specified type
      Parameters:
        `type` - type

    - #### setMVEffect

          public void setMVEffect(MVFilter filter)

      Sets the MV filter.
      Parameters:
        `filter` - MV filter

    - #### getMVEffect

          public MVFilter getMVEffect()

      Gets the MV filter.
      Returns:
        MV filter

    - #### setCanvasTrack

          public void setCanvasTrack(PaintTrack paintTrack)

      Sets the canvas track.
      Parameters:
        `paintTrack` - canvas track

    - #### getCanvasTrack

          public PaintTrack getCanvasTrack()

      Gets the canvas track.
      Returns:
        canvas track

    - #### removeCanvasTrack

          public void removeCanvasTrack()

      Remove the canvas track.

    - #### setWaterMark

          public void setWaterMark(WaterMark waterMark)

      Sets the watermark.
      Parameters:
        `waterMark` - watermark

    - #### getWaterMark

          public WaterMark getWaterMark()

      Gets the watermark.
      Returns:
        watermark

    - #### setTailWaterMark

          public void setTailWaterMark(TailWaterMark tailWaterMark)

      Sets the tail watermark.
      Parameters:
        `tailWaterMark` - tail watermark

    - #### getTailWaterMark

          public TailWaterMark getTailWaterMark()

      Gets the tail watermark.
      Returns:
        tail watermark

    - #### getRollCaptionTrack

          public RollCaptionTrack getRollCaptionTrack()

      Gets the roll caption track.
      Returns:
        roll caption track

    - #### setRollCaptionTrack

          public void setRollCaptionTrack(RollCaptionTrack rollCaptionTrack)

      Sets the roll caption track.
      Parameters:
        `rollCaptionTrack` - roll caption track

    - #### clearRollCaptionTrack

          public void clearRollCaptionTrack()

      Clear the roll caption track.

    - #### updateTransition

          public void updateTransition(int clipId,
                                       TransitionBase transitionBase)

      Update the transition config.
      Parameters:
        `clipId` - clip id
        `transitionBase` - transition

    - #### addAnimationFilter

          public void addAnimationFilter(Filter filter)

      Adds an animated filter.
      Parameters:
        `filter` - animated filter

    - #### getAllAnimationFilters

          public java.util.List<Filter> getAllAnimationFilters()

      Gets the all animated filter.
      Returns:
        all animated filter

    - #### updateAnimationFilter

          public void updateAnimationFilter(EffectFilter filter)

      Update the animated filter.
      Parameters:
        `filter` - animated filter

    - #### removeAnimationFilter

          public void removeAnimationFilter(int id)

      Remove the animated filter.
      Parameters:
        `id` - id

    - #### clearAnimationFilters

          public void clearAnimationFilters()

      clear the animated filter.

    - #### addTimeFilter

          public void addTimeFilter(TimeFilter timeFilter)

      Add the time filter.
      Parameters:
        `timeFilter` - time filter

    - #### getAllTimeFilters

          public java.util.List<TimeFilter> getAllTimeFilters()

      Gets the all time filter.
      Returns:

    - #### removeTimeFilter

          public void removeTimeFilter(int id)

      Remove the time filter of the specified id.
      Parameters:
        `id` -

    - #### clearTimeFilters

          public void clearTimeFilters()

      Clear the time filter.

    - #### addPasterTrack

          public void addPasterTrack(PasterTrack pasterTrack)

      Adds the paster track.
      Parameters:
        `pasterTrack` - paster track

    - #### removePasterTrack

          public void removePasterTrack(int id)

      Remove the paster track of the specified id.
      Parameters:
        `id` - id

    - #### getPasterTrackByID

          public PasterTrack getPasterTrackByID(int id)

      Gets the paster track of the specified id.
      Parameters:
        `id` - id
      Returns:
        paster track

    - #### getPasterTrackByType

          public java.util.List<PasterTrack> getPasterTrackByType(PasterTrack.Type type)

      Gets the paster track of the specified type.
      Parameters:
        `type` - type
      Returns:
        paster track list

    - #### refreshTimeLine

          public void refreshTimeLine()

      refresh timeline