org.exoplatform.commons.model.impl
Class AbtractBaseObject

java.lang.Object
  extended by org.exoplatform.commons.model.impl.AbtractBaseObject
All Implemented Interfaces:
org.exoplatform.commons.api.event.data.BaseObject
Direct Known Subclasses:
AbstractFile

public abstract class AbtractBaseObject
extends Object
implements org.exoplatform.commons.api.event.data.BaseObject

Created by The eXo Platform SARL Author : Dang Van Minh minh.dang@exoplatform.com Oct 25, 2012 3:26:08 PM


Field Summary
protected  boolean isSystem
           
protected static org.exoplatform.services.log.Log LOG
           
protected  String path
           
protected  String UUID
           
protected  String workspace
           
 
Constructor Summary
AbtractBaseObject(String workspace, String path)
           
AbtractBaseObject(String workspace, String path, boolean isSystem)
           
 
Method Summary
 Calendar getCreatedDate()
          Get Object created date
 String getCreator()
          Get Object Creator
protected  javax.jcr.Node getJCRNode()
           
 Calendar getLastModifiedDate()
          Get Object last modified date
 String getLastModifier()
           
 List<String> getMixinTypes()
          Get Object mixin types
 String getName()
          Get object name
abstract  String getObjectType()
           
 String getOwner()
           
 String getPath()
          Get Object path
 String getPrimaryType()
          Get Object Primary Type
 String getRating()
           
protected  javax.jcr.Session getSession()
           
 List<String> getTags()
           
 String getTitle()
           
 String getUUID()
          Get Object UUID
 String getWorkspace()
          Get workspace name where stored current object.
 void save()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.exoplatform.services.log.Log LOG

workspace

protected String workspace

path

protected String path

UUID

protected String UUID

isSystem

protected boolean isSystem
Constructor Detail

AbtractBaseObject

public AbtractBaseObject(String workspace,
                         String path)

AbtractBaseObject

public AbtractBaseObject(String workspace,
                         String path,
                         boolean isSystem)
Method Detail

getName

public String getName()
Get object name

Specified by:
getName in interface org.exoplatform.commons.api.event.data.BaseObject
Returns:

getPath

public String getPath()
Get Object path

Specified by:
getPath in interface org.exoplatform.commons.api.event.data.BaseObject
Returns:

getCreatedDate

public Calendar getCreatedDate()
Get Object created date

Specified by:
getCreatedDate in interface org.exoplatform.commons.api.event.data.BaseObject
Returns:
Throws:
javax.jcr.RepositoryException
javax.jcr.PathNotFoundException
javax.jcr.ValueFormatException

getLastModifiedDate

public Calendar getLastModifiedDate()
Get Object last modified date

Specified by:
getLastModifiedDate in interface org.exoplatform.commons.api.event.data.BaseObject
Returns:
Throws:
javax.jcr.RepositoryException
javax.jcr.PathNotFoundException
javax.jcr.ValueFormatException

getCreator

public String getCreator()
Get Object Creator

Returns:
Throws:
javax.jcr.RepositoryException
javax.jcr.PathNotFoundException

getPrimaryType

public String getPrimaryType()
Get Object Primary Type

Specified by:
getPrimaryType in interface org.exoplatform.commons.api.event.data.BaseObject
Returns:
Throws:
javax.jcr.RepositoryException
javax.jcr.PathNotFoundException

getMixinTypes

public List<String> getMixinTypes()
Get Object mixin types

Specified by:
getMixinTypes in interface org.exoplatform.commons.api.event.data.BaseObject
Throws:
javax.jcr.RepositoryException
javax.jcr.PathNotFoundException

getWorkspace

public String getWorkspace()
Get workspace name where stored current object.

Specified by:
getWorkspace in interface org.exoplatform.commons.api.event.data.BaseObject
Returns:
Name of Workspace

getUUID

public String getUUID()
Get Object UUID

Specified by:
getUUID in interface org.exoplatform.commons.api.event.data.BaseObject
Returns:
UUID of current Object
Throws:
javax.jcr.RepositoryException
javax.jcr.PathNotFoundException
javax.jcr.UnsupportedRepositoryOperationException

getSession

protected javax.jcr.Session getSession()
                                throws javax.jcr.LoginException,
                                       javax.jcr.NoSuchWorkspaceException,
                                       javax.jcr.RepositoryException
Returns:
Throws:
javax.jcr.RepositoryException
javax.jcr.NoSuchWorkspaceException
javax.jcr.LoginException

save

public void save()
Specified by:
save in interface org.exoplatform.commons.api.event.data.BaseObject
Throws:
javax.jcr.RepositoryException
javax.jcr.NoSuchWorkspaceException
javax.jcr.LoginException
javax.jcr.nodetype.NoSuchNodeTypeException
javax.jcr.lock.LockException
javax.jcr.version.VersionException
javax.jcr.InvalidItemStateException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.ItemExistsException
javax.jcr.AccessDeniedException

getTitle

public String getTitle()
Specified by:
getTitle in interface org.exoplatform.commons.api.event.data.BaseObject

getLastModifier

public String getLastModifier()
Specified by:
getLastModifier in interface org.exoplatform.commons.api.event.data.BaseObject

getOwner

public String getOwner()
Specified by:
getOwner in interface org.exoplatform.commons.api.event.data.BaseObject

getTags

public List<String> getTags()
Specified by:
getTags in interface org.exoplatform.commons.api.event.data.BaseObject

getRating

public String getRating()
Specified by:
getRating in interface org.exoplatform.commons.api.event.data.BaseObject

getObjectType

public abstract String getObjectType()
Returns:

getJCRNode

protected javax.jcr.Node getJCRNode()
Returns:


Copyright © 2013 eXo Platform SAS. All Rights Reserved.