de.esprit.netsuite.server.util

## Class ServerUtil

- java.lang.Object
- - de.esprit.netsuite.server.util.ServerUtil

-     public class ServerUtil
      extends java.lang.Object

  This class is a collection of server specific utility methods
  Author:
    Rainer Buesch

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DBTimestamp` | `calculateNextProcessStart(java.sql.Timestamp configTs, long delayMillis)` Add repeat delay until startTime is in the future
    `static <T extends AliveBusinessObject> T` | `createAboInstanceFor(java.lang.Object context, java.lang.Class aboClass)` Creates an ABO instance of the given aboClass type using the given context.
    `static java.io.File` | `createFileAbsolute(java.io.File rootDir, java.io.File relBaseDir, java.lang.String fileName)` Creates the absolute path for a server file by prepending the serverRootDir.
    `static java.io.File` | `createFileAbsolute(ServerContext serverCtx, java.io.File relBaseDir, java.lang.String fileName)`
    `static java.io.File` | `createFileRelative(java.io.File relBaseDir, java.lang.String fileName)` Creates the relative path for a server file by prepending the relBaseDir, if any.
    `static java.lang.String` | `encryptPassword(java.lang.String rawPassword)`
    `static void` | `fireMeterAbo(ServerContext serverCtx, AbstractLoadMeterABO abo, int value)`
    `static boolean` | `isAsyncUserAgent(Agent agent)`
    `static boolean` | `isChunkOfSequencedAgent(Agent agent)`
    `static boolean` | `isLastAgentOfSequence(Agent agent)`
    `static boolean` | `isSequencedAgent(Agent agent)`
    `static boolean` | `isSyncUserAgent(Agent agent)`
    `static boolean` | `isUserAgent(Agent agent)`
    `static void` | `retriggerAgentLock(Agent agent)`
    `static void` | `tryReleaseAgentLock(Agent agent)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### isLastAgentOfSequence

          public static boolean isLastAgentOfSequence(Agent agent)

    - #### isSequencedAgent

          public static boolean isSequencedAgent(Agent agent)

    - #### isChunkOfSequencedAgent

          public static boolean isChunkOfSequencedAgent(Agent agent)

    - #### retriggerAgentLock

          public static void retriggerAgentLock(Agent agent)

    - #### createFileAbsolute

          public static java.io.File createFileAbsolute(ServerContext serverCtx,
                                        java.io.File relBaseDir,
                                        java.lang.String fileName)

    - #### createFileAbsolute

          public static java.io.File createFileAbsolute(java.io.File rootDir,
                                        java.io.File relBaseDir,
                                        java.lang.String fileName)

      Creates the absolute path for a server file by prepending the serverRootDir.

    - #### createFileRelative

          public static java.io.File createFileRelative(java.io.File relBaseDir,
                                        java.lang.String fileName)

      Creates the relative path for a server file by prepending the relBaseDir, if any.

    - #### tryReleaseAgentLock

          public static void tryReleaseAgentLock(Agent agent)

    - #### fireMeterAbo

          public static void fireMeterAbo(ServerContext serverCtx,
                          AbstractLoadMeterABO abo,
                          int value)

    - #### isAsyncUserAgent

          public static boolean isAsyncUserAgent(Agent agent)

    - #### isSyncUserAgent

          public static boolean isSyncUserAgent(Agent agent)

    - #### isUserAgent

          public static boolean isUserAgent(Agent agent)

    - #### calculateNextProcessStart

          public static DBTimestamp calculateNextProcessStart(java.sql.Timestamp configTs,
                                              long delayMillis)

      Add repeat delay until startTime is in the future

    - #### encryptPassword

          public static java.lang.String encryptPassword(java.lang.String rawPassword)
                                                  throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### createAboInstanceFor

          public static <T extends AliveBusinessObject> T createAboInstanceFor(java.lang.Object context,
                                                               java.lang.Class aboClass)
                                                                    throws java.lang.Exception

      Creates an ABO instance of the given aboClass type using the given context.
      Parameters:
        `context` - is either a subclass of `ClientContext` or `ServerContext`
      Throws:
        `java.lang.Exception`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.