Class ServiceUtil

java.lang.Object
io.jans.scim.util.ServiceUtil
All Implemented Interfaces:
Serializable

@ApplicationScoped public class ServiceUtil extends Object implements Serializable
User: Dejan Maric
See Also:
  • Constructor Details

    • ServiceUtil

      public ServiceUtil()
  • Method Details

    • deleteGroupFromPerson

      public void deleteGroupFromPerson(JansGroup group, String dn) throws Exception
      Delete a Group from a Person
      Throws:
      Exception
    • iterableToString

      public String iterableToString(Iterable<?> list)
    • personMembersAdder

      public void personMembersAdder(JansGroup gluuGroup, String dn) throws Exception
      Adds a group to a person's memberOf
      Throws:
      Exception
    • groupMembersAdder

      public void groupMembersAdder(JansCustomPerson gluuPerson, String dn) throws Exception
      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

      public static byte[] readFully(InputStream is) throws IOException
      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