Package io.jans.scim.util
Class ServiceUtil
java.lang.Object
io.jans.scim.util.ServiceUtil
- All Implemented Interfaces:
Serializable
User: Dejan Maric
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteGroupFromPerson(JansGroup group, String dn) Delete a Group from a Personstatic com.fasterxml.jackson.databind.ObjectMappervoidgroupMembersAdder(JansCustomPerson gluuPerson, String dn) Adds a person to a groupiterableToString(Iterable<?> list) voidpersonMembersAdder(JansGroup gluuGroup, String dn) Adds a group to a person's memberOfstatic byte[]readFully(InputStream is) Read all bytes from the supplied input stream.static StringsaveRandomFile(byte[] array, String baseDir, String extension) Save file with random name with provided base directory and extension.
-
Constructor Details
-
ServiceUtil
public ServiceUtil()
-
-
Method Details
-
deleteGroupFromPerson
Delete a Group from a Person- Throws:
Exception
-
iterableToString
-
personMembersAdder
Adds a group to a person's memberOf- Throws:
Exception
-
groupMembersAdder
Adds a person to a group- Throws:
Exception
-
saveRandomFile
public static String saveRandomFile(byte[] array, String baseDir, String extension) throws IOException Save file with random name with provided base directory and extension.- Parameters:
array- binary content of file.baseDir- Write to directory.extension- Filename extension.- Returns:
- Return full path
- Throws:
IOException
-
getObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
readFully
Read all bytes from the supplied input stream. Closes the input stream.- Parameters:
is- Input stream- Returns:
- All bytes
- Throws:
IOException- If an I/O problem occurs
-