info.magnolia.cms.core
Class MetaData

java.lang.Object
  extended by info.magnolia.cms.core.MetaData

public class MetaData
extends Object

Meta data of a content like creation date, modification date, assigned template, ...

Version:
$Id$

Field Summary
static String ACTIVATED
           
static int ACTIVATION_STATUS_ACTIVATED
           
static int ACTIVATION_STATUS_MODIFIED
           
static int ACTIVATION_STATUS_NOT_ACTIVATED
           
static String ACTIVATOR_ID
           
static String AUTHOR_ID
           
static String CREATION_DATE
           
static String DEFAULT_META_NODE
          Name of the Node hosting the MetaData.
static String LAST_ACTION
           
static String LAST_MODIFIED
           
static String TEMPLATE
           
static String TEMPLATE_TYPE
           
static String TITLE
          Top level atoms viewed as metadata of the specified content these must be set by the authoring system itself, but could be changed via custom templates if necessary.
 
Constructor Summary
  MetaData(javax.jcr.Node workingNode)
           
protected MetaData(javax.jcr.Node workingNode, AccessManager ignoredAccessManager)
          Deprecated. since 4.5 use MetaData(Node) instead.
 
Method Summary
 int getActivationStatus()
          Returns one of the ACTIVATION_STATUS_* constants.
 String getActivatorId()
          Part of metadata, last known activator of this node.
 String getAuthorId()
          Part of metadata, last known author of this node.
 boolean getBooleanProperty(String name)
           
 Calendar getCreationDate()
          Part of metadata, get creation date of the current node.
 Calendar getDateProperty(String name)
           
 double getDoubleProperty(String name)
           
 String getHandle()
           
 boolean getIsActivated()
          Part of metadata, get last activated status of the current node.
 String getLabel()
          Part of metadata, same as name of actual storage node.
 Calendar getLastActionDate()
          Part of metadata, get last activated/de- date of the current node.
 long getLongProperty(String name)
           
 Calendar getModificationDate()
          Get last modified date of the node to which this meta data belongs or creation date in case content was not modified since.
 String getStringProperty(String name)
           
 String getTemplate()
          Part of metadata, template which will be used to render content of this node.
 String getTitle()
          Part of metadata , could be used as html header.
 boolean hasProperty(String name)
          Deprecated. since 4.0 - not used
 void removeProperty(String name)
          remove specified property.
 void setActivated()
          Part of metadata, adds activated status of the current node.
 void setActivatorId(String value)
          Part of metadata, current logged-in author who last activated this page.
 void setAuthorId(String value)
          Part of metadata, current logged-in author who did some action on this page.
 void setCreationDate()
          Part of metadata, adds creation date of the current node.
 void setLastActivationActionDate()
          Part of metadata, adds activated date of the current node.
 void setModificationDate()
          Part of metadata, adds modification date of the current node.
 void setProperty(String name, boolean value)
           
 void setProperty(String name, Calendar value)
           
 void setProperty(String name, double value)
           
 void setProperty(String name, long value)
           
 void setProperty(String name, String value)
           
 void setTemplate(String value)
          Part of metadata, template which will be used to render content of this node.
 void setTitle(String value)
          Part of metadata, could be used as html header.
 void setUnActivated()
          Part of metadata, adds activated status of the current node.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TITLE

public static final String TITLE
Top level atoms viewed as metadata of the specified content these must be set by the authoring system itself, but could be changed via custom templates if necessary.

See Also:
Constant Field Values

CREATION_DATE

public static final String CREATION_DATE
See Also:
Constant Field Values

LAST_MODIFIED

public static final String LAST_MODIFIED
See Also:
Constant Field Values

LAST_ACTION

public static final String LAST_ACTION
See Also:
Constant Field Values

AUTHOR_ID

public static final String AUTHOR_ID
See Also:
Constant Field Values

ACTIVATOR_ID

public static final String ACTIVATOR_ID
See Also:
Constant Field Values

TEMPLATE

public static final String TEMPLATE
See Also:
Constant Field Values

TEMPLATE_TYPE

public static final String TEMPLATE_TYPE
See Also:
Constant Field Values

ACTIVATED

public static final String ACTIVATED
See Also:
Constant Field Values

DEFAULT_META_NODE

public static final String DEFAULT_META_NODE
Name of the Node hosting the MetaData.

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

MetaData

protected MetaData(javax.jcr.Node workingNode,
                   AccessManager ignoredAccessManager)
Deprecated. since 4.5 use MetaData(Node) instead.

Parameters:
workingNode - current Node on which MetaData is requested
ignoredAccessManager - no longer required hence use other constructor.

MetaData

public MetaData(javax.jcr.Node workingNode)
Parameters:
workingNode - current Node on which MetaData is requested
Method Detail

getHandle

public String getHandle()
                 throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getLabel

public String getLabel()
Part of metadata, same as name of actual storage node. This value is unique at the hierarchy level context.

Returns:
String value of the requested metadata

getTitle

public String getTitle()
Part of metadata , could be used as html header.

Returns:
String value of the requested metadata

setTitle

public void setTitle(String value)
Part of metadata, could be used as html header.

Parameters:
value -

setCreationDate

public void setCreationDate()
Part of metadata, adds creation date of the current node.


getCreationDate

public Calendar getCreationDate()
Part of metadata, get creation date of the current node.

Returns:
Calendar

setActivated

public void setActivated()
Part of metadata, adds activated status of the current node.


setUnActivated

public void setUnActivated()
Part of metadata, adds activated status of the current node.


getIsActivated

public boolean getIsActivated()
Part of metadata, get last activated status of the current node.

Returns:
Calendar

getActivationStatus

public int getActivationStatus()
Returns one of the ACTIVATION_STATUS_* constants.


setLastActivationActionDate

public void setLastActivationActionDate()
Part of metadata, adds activated date of the current node.


getLastActionDate

public Calendar getLastActionDate()
Part of metadata, get last activated/de- date of the current node.

Returns:
Calendar

setModificationDate

public void setModificationDate()
Part of metadata, adds modification date of the current node.


getModificationDate

public Calendar getModificationDate()
Get last modified date of the node to which this meta data belongs or creation date in case content was not modified since.

Returns:
Calendar when last modification date can't be found.

getAuthorId

public String getAuthorId()
Part of metadata, last known author of this node.

Returns:
String value of the requested metadata

setAuthorId

public void setAuthorId(String value)
Part of metadata, current logged-in author who did some action on this page.

Parameters:
value -

getActivatorId

public String getActivatorId()
Part of metadata, last known activator of this node.

Returns:
String value of the requested metadata

setActivatorId

public void setActivatorId(String value)
Part of metadata, current logged-in author who last activated this page.

Parameters:
value -

getTemplate

public String getTemplate()
Part of metadata, template which will be used to render content of this node.

Returns:
String value of the requested metadata

setTemplate

public void setTemplate(String value)
Part of metadata, template which will be used to render content of this node.

Parameters:
value -

setProperty

public void setProperty(String name,
                        String value)

setProperty

public void setProperty(String name,
                        long value)

setProperty

public void setProperty(String name,
                        double value)

setProperty

public void setProperty(String name,
                        boolean value)

setProperty

public void setProperty(String name,
                        Calendar value)

getBooleanProperty

public boolean getBooleanProperty(String name)

getDoubleProperty

public double getDoubleProperty(String name)

getLongProperty

public long getLongProperty(String name)

getStringProperty

public String getStringProperty(String name)

getDateProperty

public Calendar getDateProperty(String name)

removeProperty

public void removeProperty(String name)
                    throws javax.jcr.PathNotFoundException,
                           javax.jcr.RepositoryException
remove specified property.

Parameters:
name - of the property to be removed
Throws:
javax.jcr.PathNotFoundException - if property does not exist
javax.jcr.RepositoryException - if unable to remove

hasProperty

@Deprecated
public boolean hasProperty(String name)
Deprecated. since 4.0 - not used

check if property exists.

Parameters:
name -
Returns:
true if the specified property exist

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.