com.dotmarketing.business
Interface IdentifierAPI

All Known Implementing Classes:
IdentifierAPIImpl

public interface IdentifierAPI


Method Summary
 Identifier createNew(Versionable asset, Treeable parent)
           
 Identifier createNew(Versionable asset, Treeable parent, java.lang.String existingId)
           
 void delete(Identifier identifier)
          This method WILL delete the identifier and all related versonable assets from the DB.
 Identifier find(Host host, java.lang.String uri)
          Will take a host and uri and return its identifier from cache or db.
 Identifier find(java.lang.String id)
          Will take a String from an identifiers id and return its identifier from cache or db.
 Identifier find(Versionable versionable)
          Will take a Versionable and return its identifier from cache or db.
 java.util.List<Identifier> findByParentPath(java.lang.String hostId, java.lang.String parent_path)
          Finds identifiers with the specified parent path and host id
 java.util.List<Identifier> findByURIPattern(java.lang.String assetType, java.lang.String uri, boolean hasLive, boolean onlyDeleted, boolean include, Host host)
          Will look for all identifiers matting a URI pattern
 java.util.List<Identifier> findByURIPattern(java.lang.String assetType, java.lang.String uri, boolean hasLive, boolean onlyDeleted, boolean include, Host host, java.util.Date startDate, java.util.Date endDate)
          Will look for all identifiers matting a URI pattern
 Identifier findFromInode(java.lang.String inode)
          Will take a String from an inode id and return its identifier from cache or db.
 boolean isIdentifier(java.lang.String identifierInode)
          This method WILL HIT the DB.
 Identifier loadFromCache(Host host, java.lang.String uri)
          Will take a host and uri and return its identifier from cache or null if not found This will never hit the db
 Identifier loadFromCache(java.lang.String id)
          Will take a string and return its identifier from cache or null if not found.
 Identifier loadFromCache(Versionable asset)
          Will take a versionable and return its identifier from cache or null if not found This will never hit the db
 Identifier loadFromDb(java.lang.String id)
          Will take a string and return its identifier from db or null if not found.
 Identifier save(Identifier identifier)
          This method WILL Save to the DB.
 void updateIdentifierURI(Versionable webasset, Folder folder)
           
 

Method Detail

findByURIPattern

java.util.List<Identifier> findByURIPattern(java.lang.String assetType,
                                            java.lang.String uri,
                                            boolean hasLive,
                                            boolean onlyDeleted,
                                            boolean include,
                                            Host host)
                                            throws DotDataException
Will look for all identifiers matting a URI pattern

Parameters:
uri - Can contain a * at the beginning or end
include - Should find all that match pattern if true or all that do not match pattern if false
assetType -
hasLive -
onlyDeleted - only pull deleted records
host -
startDate - use to search between dates
endDate -
Returns:
Throws:
DotDataException

findByURIPattern

java.util.List<Identifier> findByURIPattern(java.lang.String assetType,
                                            java.lang.String uri,
                                            boolean hasLive,
                                            boolean onlyDeleted,
                                            boolean include,
                                            Host host,
                                            java.util.Date startDate,
                                            java.util.Date endDate)
                                            throws DotDataException
Will look for all identifiers matting a URI pattern

Parameters:
uri - Can contain a * at the beginning or end
include - Should find all that match pattern if true or all that do not match pattern if false
assetType -
hasLive -
onlyDeleted - only pull deleted records
host -
startDate -
endDate -
Returns:
Throws:
DotDataException

findFromInode

Identifier findFromInode(java.lang.String inode)
                         throws DotDataException
Will take a String from an inode id and return its identifier from cache or db. If cache miss this will always hit the db

Parameters:
inode -
Returns:
Throws:
DotDataException
DotStateException - if no identifier can be found from passed in inode

find

Identifier find(java.lang.String id)
                throws DotDataException
Will take a String from an identifiers id and return its identifier from cache or db. If cache miss this will always hit the db

Parameters:
id -
Returns:
Identifier
Throws:
DotDataException
DotStateException - if no identifier can be found from passed in id

find

Identifier find(Versionable versionable)
                throws DotDataException,
                       DotStateException
Will take a Versionable and return its identifier from cache or db. If cache miss this will always hit the db

Parameters:
versionable -
Returns:
Identifier
Throws:
DotDataException
DotStateException

find

Identifier find(Host host,
                java.lang.String uri)
                throws DotDataException,
                       DotStateException
Will take a host and uri and return its identifier from cache or db. If cache miss this will always hit the db

Parameters:
versionable -
Returns:
Identifier
Throws:
DotDataException
DotStateException

loadFromCache

Identifier loadFromCache(Host host,
                         java.lang.String uri)
                         throws DotDataException,
                                DotStateException
Will take a host and uri and return its identifier from cache or null if not found This will never hit the db

Parameters:
host -
uri -
Returns:
Identifier
Throws:
DotDataException
DotStateException

loadFromCache

Identifier loadFromCache(Versionable asset)
                         throws DotDataException,
                                DotStateException
Will take a versionable and return its identifier from cache or null if not found This will never hit the db

Parameters:
versionable -
Returns:
Identifier
Throws:
DotDataException
DotStateException

loadFromCache

Identifier loadFromCache(java.lang.String id)
                         throws DotDataException
Will take a string and return its identifier from cache or null if not found. This will never hit the db

Parameters:
versionable -
Returns:
Identifier
Throws:
DotDataException
DotStateException

loadFromDb

Identifier loadFromDb(java.lang.String id)
                      throws DotDataException,
                             DotStateException
Will take a string and return its identifier from db or null if not found. This method WILL HIT the DB.

Parameters:
id -
Returns:
Identifier
Throws:
DotDataException
DotStateException

isIdentifier

boolean isIdentifier(java.lang.String identifierInode)
                     throws DotDataException
This method WILL HIT the DB.

Returns:
boolean
Throws:
DotDataException

save

Identifier save(Identifier identifier)
                throws DotDataException
This method WILL Save to the DB.

Returns:
boolean
Throws:
DotDataException

delete

void delete(Identifier identifier)
            throws DotDataException
This method WILL delete the identifier and all related versonable assets from the DB.

Throws:
DotDataException

createNew

Identifier createNew(Versionable asset,
                     Treeable parent)
                     throws DotDataException
Parameters:
asset -
parent -
Returns:
Throws:
DotDataException

createNew

Identifier createNew(Versionable asset,
                     Treeable parent,
                     java.lang.String existingId)
                     throws DotDataException
Throws:
DotDataException

updateIdentifierURI

void updateIdentifierURI(Versionable webasset,
                         Folder folder)
                         throws DotDataException
Parameters:
webasset -
folder -
Throws:
DotDataException

findByParentPath

java.util.List<Identifier> findByParentPath(java.lang.String hostId,
                                            java.lang.String parent_path)
                                            throws DotHibernateException
Finds identifiers with the specified parent path and host id

Parameters:
hostId -
parent_path -
Returns:
Throws:
DotHibernateException


Copyright © 2013 dotCMS Inc. All Rights Reserved.