Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.channels.groupsmanager
Class Utility

    java.lang.Object
      org.jasig.portal.channels.groupsmanager.Utility

All Implemented Interfaces:
  GroupsManagerConstants

    public class Utility

extends java.lang.Object
implements GroupsManagerConstants

A class holding utility functions used by the Groups Manager channel.

Version:
  $Revision: 1.23 $
Author:
  Don Fracapane

Field Summary
`private static org.apache.commons.logging.Log` | `log`

Fields inherited from interface org.jasig.portal.channels.groupsmanager.GroupsManagerConstants
`ADD_REMOVE_PERMISSION, ASSIGN_PERMISSION, BASE_PACKAGE, BROWSE_MODE, COMMANDS_PACKAGE, CREATE_PERMISSION, DELETE_PERMISSION, EDIT_MODE, ENTITY_CLASSNAME, ENTITY_TAGNAME, GROUP_CLASSNAME, GROUP_TAGNAME, GROUPS_PACKAGE, MEMBERS_ONLY_MODE, OWNER, PROPERTIES_TAGNAME, ROOT_GROUP_DESCRIPTION, ROOT_GROUP_TITLE, SECURITY_PACKAGE, SELECT_MODE, SELECT_PERMISSION, UPDATE_PERMISSION, VIEW_PERMISSION, WRAPPERS_PACKAGE`

Constructor Summary
`Utility()` Creates new Utility

Method Summary
`static boolean` | `areEqual(java.lang.String one, java.lang.String two)` Compares 2 strings to determine if they are functionally the same.
`static boolean` | `hasValue(java.lang.Object o)` Determines if an object has a value other than null or blank.
`static boolean` | `hasValue(java.lang.Object o, java.lang.String test)` Determines if an object has a value other than null or blank and is equal to the test parameter.
`static void` | `logMessage(java.lang.String msgTypeStr, java.lang.String msg)` This method will prints to the log when an exception is not passed.
`static void` | `logMessage(java.lang.String msgTypeStr, java.lang.String msg, java.lang.Throwable th)` An attempt to extract all calls to logger to expedite assumed future upgrades.
`static boolean` | `notEmpty(java.lang.String aString)` Answers if testString has a value other that null and "".
`static java.lang.String` | `parseStringDelimitedBy(java.lang.String fromDelim, java.lang.String source, java.lang.String toDelim)` Extracts the value of a key sandwiched by delimiters from a string.
`static void` | `printDoc(org.w3c.dom.Document aDoc, java.lang.String aMessage)` Prints a Document.
`static void` | `printElement(org.w3c.dom.Element anElem, java.lang.String aMessage)` Prints an Element.
`static IGroupMember` | `retrieveGroupMemberForKeyAndType(java.lang.String key, java.lang.String type)` Retrieves a Group Member for the provided key and of the provided type.
`static java.lang.String` | `toString(org.w3c.dom.Document aDoc)` Represents a document as a string.
`static java.lang.String` | `translateKeytoID(java.lang.String grpKey, CGroupsManagerUnrestrictedSessionData sd)` given a group key, return an xml group id that matches it in the provided document

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    private static final org.apache.commons.logging.Log log

Constructor Detail

### Utility

    public Utility()

  Creates new Utility

Method Detail

### areEqual

    public static boolean areEqual(java.lang.String one,
                                   java.lang.String two)

  Compares 2 strings to determine if they are functionally the same. For this method null is the same as "".

  Parameters:
    `one` - String
    `two` - String
  Returns:
    an `boolean` object

### notEmpty

    public static boolean notEmpty(java.lang.String aString)

  Answers if testString has a value other that null and "".

  Parameters:
    `aString` - String
  Returns:
    an `boolean` object

### logMessage

    public static void logMessage(java.lang.String msgTypeStr,
                                  java.lang.String msg)

  This method will prints to the log when an exception is not passed.

  Parameters:
    `msgTypeStr` - String
    `msg` - String

### logMessage

    public static void logMessage(java.lang.String msgTypeStr,
                                  java.lang.String msg,
                                  java.lang.Throwable th)

  An attempt to extract all calls to logger to expedite assumed future upgrades.

  Parameters:
    `msgTypeStr` - String
    `msg` - String
    `th` - Throwable

### parseStringDelimitedBy

    public static java.lang.String parseStringDelimitedBy(java.lang.String fromDelim,
                                                          java.lang.String source,
                                                          java.lang.String toDelim)

  Extracts the value of a key sandwiched by delimiters from a string.

  Parameters:
    `fromDelim` -
    `source` -
    `toDelim` -
  Returns:
    an `String` object

### printDoc

    public static void printDoc(org.w3c.dom.Document aDoc,
                                java.lang.String aMessage)

  Prints a Document. Used for debugging.

  Parameters:
    `aDoc` -
    `aMessage` -

### printElement

    public static void printElement(org.w3c.dom.Element anElem,
                                    java.lang.String aMessage)

  Prints an Element. Used for debugging.

  Parameters:
    `anElem` -
    `aMessage` -

### retrieveGroupMemberForKeyAndType

    public static IGroupMember retrieveGroupMemberForKeyAndType(java.lang.String key,
                                                                java.lang.String type)

  Retrieves a Group Member for the provided key and of the provided type.

  Parameters:
    `key` -
    `type` -
  Returns:
    an `IGroupMember` object

### toString

    public static java.lang.String toString(org.w3c.dom.Document aDoc)

  Represents a document as a string.

  Parameters:
    `aDoc` -
  Returns:
    the document serialized out as a human-readable String

### translateKeytoID

    public static java.lang.String translateKeytoID(java.lang.String grpKey,
                                                    CGroupsManagerUnrestrictedSessionData sd)

  given a group key, return an xml group id that matches it in the provided document

  Parameters:
    `grpKey` - String
    `sd` - CGroupsManagerUnrestrictedSessionData
  Returns:
    an `String` object

### hasValue

    public static boolean hasValue(java.lang.Object o)

  Determines if an object has a value other than null or blank.

  Parameters:
    `o` - Object
  Returns:
    boolean

### hasValue

    public static boolean hasValue(java.lang.Object o,
                                   java.lang.String test)

  Determines if an object has a value other than null or blank and is equal to the test parameter.

  Parameters:
    `o` - Object
    `test` - String
  Returns:
    boolean

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD