public class OAuthPersistenceUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CHUNK_LENGTH |
| Modifier and Type | Method and Description |
|---|---|
static int |
getChunkLength(org.exoplatform.container.xml.InitParams params)
Parse chunkLength from value params (same code used in all processors)
|
static String |
getLongAttribute(org.exoplatform.services.organization.UserProfile userProfile,
String attributePrefix,
boolean useSuffixInFirstAttribute)
Get very long attribute.
|
static void |
removeLongAttribute(org.exoplatform.services.organization.UserProfile userProfile,
String attributePrefix,
boolean useSuffixInFirstAttribute)
Remove very long attribute.
|
static void |
saveLongAttribute(String longAttribute,
org.exoplatform.services.organization.UserProfile userProfile,
String attributePrefix,
boolean useSuffixInFirstAttribute,
int lengthOfOneChunk)
Save some potentially long attribute (For example OAuth accessToken) into given UserProfile.
|
public static final int DEFAULT_CHUNK_LENGTH
public static void saveLongAttribute(String longAttribute, org.exoplatform.services.organization.UserProfile userProfile, String attributePrefix, boolean useSuffixInFirstAttribute, int lengthOfOneChunk)
longAttribute - long attribute to saveuserProfile - user profile where attribute will be savedattributePrefix - prefix to save. For example if prefix is "myPrefix" then longAttribute will be saved into chunks (attributes)
like "myPrefix.1", "myPrefix.2", ... etc.useSuffixInFirstAttribute - Whether to use suffix in very first attribute. If true, the first attribute will be "myPrefix.1". If false, it will be just "myPrefix".
The only point of this parameter is backwards compatibilitylengthOfOneChunk - length of single chunkpublic static void removeLongAttribute(org.exoplatform.services.organization.UserProfile userProfile,
String attributePrefix,
boolean useSuffixInFirstAttribute)
saveLongAttribute(String, UserProfile, String, boolean, int)public static String getLongAttribute(org.exoplatform.services.organization.UserProfile userProfile, String attributePrefix, boolean useSuffixInFirstAttribute)
saveLongAttribute(String, UserProfile, String, boolean, int)public static int getChunkLength(org.exoplatform.container.xml.InitParams params)
Copyright © 2017 JBoss by Red Hat. All Rights Reserved.