Unsolved
This post is more than 5 years old
7 Posts
0
3446
June 15th, 2010 01:00
detect default retention (using XAM)
Hi all,
In order to find out which documents are past their retention period, I'm duplicating the chosen retention policy into my application (note: I only use 'base' retentions for the moment, not 'event' retentions).
However, it's also possible for users to do a checkin without choosing a specific "base retention duration" (i.e. a time in milliseconds) or a specific "base retention policy" (e.g. "1day", "1hr", "CBR_EMail", ...). In that case, Centera will apply the default retention to the checked in content.
As such, I need to detect what Centera considers to be the default retention, so that I can associate, within my application, that default retention to the checked in content.
From reading the documentation, it seems like the default retention is "the first entry in XAM_RETENTION_DURATION_POLICY_LIST". So the way I'm detecting the default retention is this:
XIterator xIterator = xSystem.openFieldIterator(XSystem.XAM_RETENTION_DURATION_POLICY_LIST);
String defaultRetentionName = (String) xIterator.next();
xIterator.close();
String defaultRetentionJavaName = xSystem.getString(defaultRetentionName);
However, I'm a bit uncertain about that code, since I don't know for certain what the default retention policy is for the US2 machine. According to that code, it's "0seconds", but I don't know if it's correct.
There are also some things which are unclear to me:
1) All of this implies that there will always be a default retention, is this correct? I was under the impression that this wasn't the case.
2) This also implies that the default retention will always be a base policy (e.g. "1day", "1hr", "CBR_EMail", ...) and never a base duration (i.e. a time in milliseconds), is this true?
3) Does "XAM_RETENTION_DURATION_POLICY_LIST" only contain "base" retentions, or does it also contain "event" retentions?
4) Can XSystem.XAM_MANAGEMENT_POLICY_DEFAULT (which contains the value ".xsystem.management.policy.default") be used in some way to detect the default policy in a better way?
Many thanks for your help,
Ludovic