ID of new content items in a folder effect.

In working with a FolderContent effect, I’m trying to obtain information about a content item which being added to the folder.

I’m obtaining the new folder relationship as:

    // context is the IPSExecutionContext which is passed into the effect
    PSRelationship originating = context.getOriginatingRelationship();

And then retrieving the content ID via:

    int contentId = originating.getDependent().getId();

According to the documentation, getId() should be returning -1 if the content item hasn’t been assigned an ID yet.

If I create the item via Content Explorer’s New Item menu entry, contentId has a valid ID and I can load the underlying PSItem. Likewise, if I use Create | Create Translation, that also returns a valid ID.

From this I infer that the new content item is created before my Effect is triggered.

But if I create a new content item via Copy and then Paste | As New Copy, the value I retrieve for the content ID is Integer.MAX_VALUE. (We don’t anticipate that becoming a valid ID for another 35,000 years. :rolleyes:)

Q1: I assume this is a flag value; can anybody tell me what it means?
Q2: How can I obtain the PSItem for the copy?

Seems like I can’t even register an effect without hitting this error message:

PSRelationshipEffectsValidator] Found the following registered relationship effect(s) that need to be updated. This configuration cannot be saved until these relationship effects are updated. Please refer to the Release Notes. Class: com.percussion.forum.PercussionFolderContent Effect Name(s): [PercussionFolderEffect]

I haven’t experimented with Relationship Effects to answer your questions, but I figured I could at least dedicate some time into the area to see if I could provide any help.

NVM: It was a false-positive. Still getting this error message.