info.magnolia.jcr.util
Class NodeTypes.Activatable

java.lang.Object
  extended by info.magnolia.jcr.util.NodeTypes.Activatable
Enclosing class:
NodeTypes

public static class NodeTypes.Activatable
extends Object

Represents the mixin mgnl:activatable.


Field Summary
static String ACTIVATION_STATUS
           
static int ACTIVATION_STATUS_ACTIVATED
           
static int ACTIVATION_STATUS_MODIFIED
           
static int ACTIVATION_STATUS_NOT_ACTIVATED
           
static String LAST_ACTIVATED
           
static String LAST_ACTIVATED_BY
           
static String NAME
           
 
Constructor Summary
NodeTypes.Activatable()
           
 
Method Summary
static int getActivationStatus(javax.jcr.Node node)
          Returns the activation status of the node.
static Calendar getLastActivated(javax.jcr.Node node)
          Returns the date when the node was last activated or null if no activation date has been stored on the node.
static String getLastActivatedBy(javax.jcr.Node node)
          Returns the name of the user that last activated the node or null if no activating user has been stored on the node.
static boolean isActivated(javax.jcr.Node node)
          Returns true if the node has been activated.
static void update(javax.jcr.Node node, String userName, boolean isActivated)
          Sets the name of the user that performed the most recent activation as well as to current time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

LAST_ACTIVATED

public static final String LAST_ACTIVATED
See Also:
Constant Field Values

LAST_ACTIVATED_BY

public static final String LAST_ACTIVATED_BY
See Also:
Constant Field Values

ACTIVATION_STATUS

public static final String ACTIVATION_STATUS
See Also:
Constant Field Values

ACTIVATION_STATUS_NOT_ACTIVATED

public static final int ACTIVATION_STATUS_NOT_ACTIVATED
See Also:
Constant Field Values

ACTIVATION_STATUS_MODIFIED

public static final int ACTIVATION_STATUS_MODIFIED
See Also:
Constant Field Values

ACTIVATION_STATUS_ACTIVATED

public static final int ACTIVATION_STATUS_ACTIVATED
See Also:
Constant Field Values
Constructor Detail

NodeTypes.Activatable

public NodeTypes.Activatable()
Method Detail

getActivationStatus

public static int getActivationStatus(javax.jcr.Node node)
                               throws javax.jcr.RepositoryException
Returns the activation status of the node. Returns one of the constants:

Throws:
javax.jcr.RepositoryException

isActivated

public static boolean isActivated(javax.jcr.Node node)
                           throws javax.jcr.RepositoryException
Returns true if the node has been activated.

Throws:
javax.jcr.RepositoryException

getLastActivated

public static Calendar getLastActivated(javax.jcr.Node node)
                                 throws javax.jcr.RepositoryException
Returns the date when the node was last activated or null if no activation date has been stored on the node.

Throws:
javax.jcr.RepositoryException

getLastActivatedBy

public static String getLastActivatedBy(javax.jcr.Node node)
                                 throws javax.jcr.RepositoryException
Returns the name of the user that last activated the node or null if no activating user has been stored on the node.

Throws:
javax.jcr.RepositoryException

update

public static void update(javax.jcr.Node node,
                          String userName,
                          boolean isActivated)
                   throws javax.jcr.RepositoryException
Sets the name of the user that performed the most recent activation as well as to current time.

Throws:
javax.jcr.RepositoryException


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.