com.arsdigita.cms.dispatcher
Class Resource

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.cms.dispatcher.Resource

public class Resource
extends com.arsdigita.domain.DomainObject

An instance of a ResourceType.

Version:
$Revision: #8 $ $DateTime: 2004/04/07 16:07:11 $
Author:
Michael Pih (pihman@arsdigita.com)

Field Summary
static String BASE_DATA_OBJECT_TYPE
           
static String versionId
           
 
Constructor Summary
Resource()
           
Resource(com.arsdigita.persistence.DataObject obj)
           
Resource(com.arsdigita.persistence.OID oid)
           
Resource(String type)
           
 
Method Summary
protected static Resource create(ResourceType type, String className)
          Creates a new resource object.
 ResourceMapping createInstance(BigDecimal sectionId, String url)
          Creates a new resource object.
 ResourceMapping createInstance(ContentSection section, String url)
          Creates a new resource object.
static Resource findResource(ContentSection section, String url)
           
 String getClassName()
           
 BigDecimal getID()
           
 ResourceType getType()
           
 void setClassName(String s)
           
 void setType(ResourceType t)
           
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, beforeSave, clear, delete, disconnect, equals, get, getBaseDataObjectType, getObjectType, getOID, getSession, hashCode, initialize, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
See Also:
Constant Field Values
Constructor Detail

Resource

public Resource()

Resource

public Resource(String type)

Resource

public Resource(com.arsdigita.persistence.OID oid)
         throws com.arsdigita.domain.DataObjectNotFoundException

Resource

public Resource(com.arsdigita.persistence.DataObject obj)
Method Detail

getID

public BigDecimal getID()

getClassName

public String getClassName()

setClassName

public void setClassName(String s)

getType

public ResourceType getType()

setType

public void setType(ResourceType t)

create

protected static Resource create(ResourceType type,
                                 String className)
Creates a new resource object. Use this method by calling createInstance() from an instance of a ResourceType.

Parameters:
type - The resource type object
className - The Java class that implements this resource
Returns:
The new resource

createInstance

public ResourceMapping createInstance(ContentSection section,
                                      String url)
Creates a new resource object.

Parameters:
section - The content section
url - The URL (relative to the content section) identifying the resource
Returns:
The new resource mapping

createInstance

public ResourceMapping createInstance(BigDecimal sectionId,
                                      String url)
Creates a new resource object.

Parameters:
sectionId - The content section ID
url - The URL (relative to the content section) identifying the resource
Returns:
The new resource mapping

findResource

public static Resource findResource(ContentSection section,
                                    String url)
                             throws com.arsdigita.domain.DataObjectNotFoundException
Throws:
com.arsdigita.domain.DataObjectNotFoundException


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 19 2004:2352 UTC