An XSystem, by design, always adds default retention to an XSet if the application does not do so.
This will be added as the base retention scheme - the value can be obtained from such an XSet via the .xset.retention.base.duration field. It can also be found as the value of the com.emc.centera.capabilities.retention.default field on the XSystem.
This value equates to the default retention period that has been configured on the cluster for the home pool of the XSystem (determined by the credentials used to authenticate, either via a PEA file or username / secret pair).
I take it, then, that the solution I posted was incorrect?
I did think about just creating a new xset and extracting the duration out of that, but the problem I see with .xset.retention.base.duration is that it returns a time in milliseconds. However, the default policy will be a policy name, not a duration, right?
Suppose I checkin new content, and the default retention policy is "email_retention". At the time I store my content, the policy "email_retention" equates to 2 months, so I store the milliseconds for 2 months in my application. However, if the policy "email_retention" is then modified to equate 3 months, my application will still think it needs to be stored for 2 months, which is incorrect.
As far as I can see, there's no way to extract the policy name out of an xset. I will look into "com.emc.centera.capabilities.retention.default", but that's a Centera-specific field, and I'd like to keep my application as XAM-compatible as possible :-)
Is there no other way to solve this correctly with XAM?
System.out.println("Default Centera retention policy's name found: " + defaultRetentionName); }
But unfortunately, the openFieldIterator line throws this exception: org.snia.xam.FieldDoesNotExistException: xam/field not found
Am I doing something wrong?
Also, any pointer to a more XAM-compliant way of solving this would be very much appreciated (if that exists).
I'm also still not sure whether my initial solution is incorrect: according to the manual, I think it should work to use the first policy returned by this FieldIterator:
gstuartemc
2 Intern
•
417 Posts
1
June 15th, 2010 06:00
An XSystem, by design, always adds default retention to an XSet if the application does not do so.
This will be added as the base retention scheme - the value can be obtained from such an XSet via the .xset.retention.base.duration field. It can also be found as the value of the com.emc.centera.capabilities.retention.default field on the XSystem.
This value equates to the default retention period that has been configured on the cluster for the home pool of the XSystem (determined by the credentials used to authenticate, either via a PEA file or username / secret pair).
Ludovic Aelbrec
7 Posts
0
June 16th, 2010 00:00
Thank you Graham.
I take it, then, that the solution I posted was incorrect?
I did think about just creating a new xset and extracting the duration out of that, but the problem I see with .xset.retention.base.duration is that it returns a time in milliseconds. However, the default policy will be a policy name, not a duration, right?
Suppose I checkin new content, and the default retention policy is "email_retention". At the time I store my content, the policy "email_retention" equates to 2 months, so I store the milliseconds for 2 months in my application. However, if the policy "email_retention" is then modified to equate 3 months, my application will still think it needs to be stored for 2 months, which is incorrect.
As far as I can see, there's no way to extract the policy name out of an xset. I will look into "com.emc.centera.capabilities.retention.default", but that's a Centera-specific field, and I'd like to keep my application as XAM-compatible as possible :-)
Is there no other way to solve this correctly with XAM?
Thanks,
Ludovic
Ludovic Aelbrec
7 Posts
0
June 17th, 2010 02:00
I tried to extract the value of "com.emc.centera.capabilities.retention.default" like this:
XIterator xIterator = xSystem.openFieldIterator("com.emc.centera.capabilities.retention.default");
while (xIterator.hasNext())
{
String defaultRetentionName = (String) xIterator.next();
System.out.println("Default Centera retention policy's name found: " + defaultRetentionName);
}
But unfortunately, the openFieldIterator line throws this exception: org.snia.xam.FieldDoesNotExistException: xam/field not found
Am I doing something wrong?
Also, any pointer to a more XAM-compliant way of solving this would be very much appreciated (if that exists).
I'm also still not sure whether my initial solution is incorrect: according to the manual, I think it should work to use the first policy returned by this FieldIterator:
xSystem.openFieldIterator(XSystem.XAM_RETENTION_DURATION_POLICY_LIST);
Thanks in advance for any help,
Ludovic