Search in sources :

Example 1 with AttributeFlag

use of com.zimbra.cs.account.AttributeFlag in project zm-mailbox by Zimbra.

the class EphemeralAttributesTest method initEphemeralAttributes.

private static void initEphemeralAttributes() throws Exception {
    Set<AttributeClass> requiredIn = Sets.newHashSet(AttributeClass.account);
    Set<AttributeFlag> flags = Sets.newHashSet(AttributeFlag.ephemeral, AttributeFlag.dynamic, AttributeFlag.expirable);
    AttributeInfo ai1 = new AttributeInfo(Provisioning.A_zimbraAuthTokens, 1, null, 0, null, AttributeType.TYPE_ASTRING, null, "", true, null, null, AttributeCardinality.multi, requiredIn, null, flags, null, null, null, null, null, "auth tokens", null, null, null);
    AttributeInfo ai2 = new AttributeInfo(Provisioning.A_zimbraCsrfTokenData, 1, null, 0, null, AttributeType.TYPE_ASTRING, null, "", true, null, null, AttributeCardinality.multi, requiredIn, null, flags, null, null, null, null, null, "csrf tokens", null, null, null);
    AttributeInfo ai3 = new AttributeInfo(Provisioning.A_zimbraLastLogonTimestamp, 1, null, 0, null, AttributeType.TYPE_GENTIME, null, "", true, null, null, AttributeCardinality.single, requiredIn, null, flags, null, null, null, null, null, "last logon timestamp", null, null, null);
    AttributeInfo ai4 = new AttributeInfo(Provisioning.A_zimbraAppSpecificPassword, 1, null, 0, null, AttributeType.TYPE_ASTRING, null, "", true, null, null, AttributeCardinality.single, requiredIn, null, flags, null, null, null, null, null, "app-specific passwords", null, null, null);
    AttributeManager am = new AttributeManager();
    am.addAttribute(ai1);
    am.addAttribute(ai2);
    am.addAttribute(ai3);
    am.addAttribute(ai4);
}
Also used : AttributeFlag(com.zimbra.cs.account.AttributeFlag) AttributeInfo(com.zimbra.cs.account.AttributeInfo) AttributeManager(com.zimbra.cs.account.AttributeManager) AttributeClass(com.zimbra.cs.account.AttributeClass)

Aggregations

AttributeClass (com.zimbra.cs.account.AttributeClass)1 AttributeFlag (com.zimbra.cs.account.AttributeFlag)1 AttributeInfo (com.zimbra.cs.account.AttributeInfo)1 AttributeManager (com.zimbra.cs.account.AttributeManager)1