org.alfresco.repo.domain.patch
Interface PatchDAO

All Known Implementing Classes:
AbstractPatchDAOImpl, PatchDAOImpl, PatchDAOImpl.Oracle, PatchDAOImpl.PostgreSQL

public interface PatchDAO

Additional DAO services for patches

Since:
3.2

Nested Class Summary
static interface PatchDAO.StringHandler
          A callback handler for iterating over the string results
 
Method Summary
 int addSizeCurrentProp()
          Add a cm:sizeCurrent property to person nodes that don't have it.
 int deleteAclMembersForAcls(java.util.List aclIds)
           
 int deleteAcls(java.util.List aclIds)
           
 int deleteDanglingAces()
           
 java.util.List getAclsThatInheritFromNonPrimaryParent()
          Get acls that do not inherit from the primary parent.
 java.util.List getAclsThatInheritWithInheritanceUnset()
          Get acls that inherit with inheritance unset
 java.util.List getAuthoritiesWithNonUtf8Crcs()
           
 long getAVMNodesCountWhereNewInStore()
           
 java.util.List getAvmNodesWithOldContentProperties(java.lang.Long minNodeId, java.lang.Long maxNodeId)
           
 int getChildAssocCount()
           
 java.util.List getChildAssocsForCrcFix(java.lang.Long minAssocId, java.lang.Long stopAtAssocId, long rangeMultiplier, long maxIdRange, int maxResults)
          The results map contains:
 long getCountNodesWithAspects(java.util.Set qnames)
           
 java.util.List getDefiningAclsThatDoNotInheritCorrectlyFromThePrimaryParent()
          Get defining acls with inheritance issues
 long getDmNodeCount()
          How many DM nodes are there?
 long getDmNodeCountWithNewACLs(java.lang.Long above)
          How many DM nodes are three with new ACls (to track patch progress)
 java.util.List getEmptyGUIDS(int count)
           
 long getMaxAclId()
          Get the max acl id
 long getMaxAdmNodeID()
           
 long getMaxAvmNodeID()
           
 java.lang.Long getMaxChildAssocId()
           
 java.util.List getNodesOfTypeWithNamePattern(org.alfresco.service.namespace.QName typeQName, java.lang.String namePattern)
          Query for a list of nodes that have a given type and share the same name pattern (SQL LIKE syntax)
 java.util.List getNullVersionLayeredDirectories(int count)
           
 java.util.List getNullVersionLayeredFiles(int count)
           
 java.util.List getOldAttrCustomNames()
          Get custom global attribute names (if any)
 java.util.List getSharedAclsThatDoNotInheritCorrectlyFromTheirDefiningAcl()
          Get shared acls that do not inherit correctly from the defining acl
 java.util.List getSharedAclsThatDoNotInheritCorrectlyFromThePrimaryParent()
          Get shared acls with inheritance issues
 void migrateOldAttrAVMLocks(org.apache.ibatis.session.ResultHandler resultHandler)
          Migrate old AVM Lock attributes (if any)
 void migrateOldAttrChainingURS(org.apache.ibatis.session.ResultHandler resultHandler)
          Migrate old Chaining User Registry Synchronizer attributes (if any)
 void migrateOldAttrDropTables()
          Drop old attribute alf_*attribute* tables
 void migrateOldAttrPropertyBackedBeans(org.apache.ibatis.session.ResultHandler resultHandler)
          Migrate old Property-Backed Bean attributes (if any)
 void migrateOldAttrTenants(org.apache.ibatis.session.ResultHandler resultHandler)
          Migrate old Tenant attributes (if any)
 java.util.List selectAllAclIds()
           
 java.util.List selectNonDanglingAclIds()
           
 void updateAdmV31ContentProperties(java.lang.Long minNodeId, java.lang.Long maxNodeId)
          Migrates DM content properties from the old V3.1 format (String-based ContentData.toString()) to the new V3.2 format (ID based storage using ContentDataDAO).
 int updateAVMNodesNullifyAcl(java.util.List nodeIds)
           
 int updateAVMNodesSetAcl(long aclId, java.util.List nodeIds)
           
 int updateChildAssocCrc(java.lang.Long assocId, java.lang.Long childNodeNameCrc, java.lang.Long qnameCrc)
           
 int updateContentMimetypeIds(java.lang.Long oldMimetypeId, java.lang.Long newMimetypeId)
          Update all alf_content_data mimetype references.
 

Method Detail

getAVMNodesCountWhereNewInStore

long getAVMNodesCountWhereNewInStore()

getEmptyGUIDS

java.util.List getEmptyGUIDS(int count)

getNullVersionLayeredDirectories

java.util.List getNullVersionLayeredDirectories(int count)

getNullVersionLayeredFiles

java.util.List getNullVersionLayeredFiles(int count)

getMaxAvmNodeID

long getMaxAvmNodeID()

getAvmNodesWithOldContentProperties

java.util.List getAvmNodesWithOldContentProperties(java.lang.Long minNodeId,
                                                   java.lang.Long maxNodeId)

updateAVMNodesNullifyAcl

int updateAVMNodesNullifyAcl(java.util.List nodeIds)

updateAVMNodesSetAcl

int updateAVMNodesSetAcl(long aclId,
                         java.util.List nodeIds)

getMaxAdmNodeID

long getMaxAdmNodeID()

updateAdmV31ContentProperties

void updateAdmV31ContentProperties(java.lang.Long minNodeId,
                                   java.lang.Long maxNodeId)
Migrates DM content properties from the old V3.1 format (String-based ContentData.toString()) to the new V3.2 format (ID based storage using ContentDataDAO).

Parameters:
minNodeId - the inclusive node ID to limit the updates to
maxNodeId - the exclusive node ID to limit the updates to

updateContentMimetypeIds

int updateContentMimetypeIds(java.lang.Long oldMimetypeId,
                             java.lang.Long newMimetypeId)
Update all alf_content_data mimetype references.

Parameters:
oldMimetypeId - the ID to search for
newMimetypeId - the ID to change to
Returns:
the number of rows affected

addSizeCurrentProp

int addSizeCurrentProp()
Add a cm:sizeCurrent property to person nodes that don't have it.


getMaxAclId

long getMaxAclId()
Get the max acl id

Returns:
- max acl id

getDmNodeCount

long getDmNodeCount()
How many DM nodes are there?

Returns:
- the count

getDmNodeCountWithNewACLs

long getDmNodeCountWithNewACLs(java.lang.Long above)
How many DM nodes are three with new ACls (to track patch progress)

Parameters:
above -
Returns:
- the count

selectAllAclIds

java.util.List selectAllAclIds()

selectNonDanglingAclIds

java.util.List selectNonDanglingAclIds()

deleteDanglingAces

int deleteDanglingAces()

deleteAcls

int deleteAcls(java.util.List aclIds)

deleteAclMembersForAcls

int deleteAclMembersForAcls(java.util.List aclIds)

getAuthoritiesWithNonUtf8Crcs

java.util.List getAuthoritiesWithNonUtf8Crcs()
Returns:
Returns the names of authorities with incorrect CRC values

getChildAssocCount

int getChildAssocCount()
Returns:
Returns the number child association rows

getMaxChildAssocId

java.lang.Long getMaxChildAssocId()
Returns:
Returns the maximum child assoc ID or 0 if there are none

getChildAssocsForCrcFix

java.util.List getChildAssocsForCrcFix(java.lang.Long minAssocId,
                                       java.lang.Long stopAtAssocId,
                                       long rangeMultiplier,
                                       long maxIdRange,
                                       int maxResults)
The results map contains:
 
        
        
        
        
        
        
        
       ]]>
 

Parameters:
minAssocId - the minimum child assoc ID
stopAtAssocId - the child assoc ID to stop at i.e. once this ID has been reached, pull back no results
rangeMultiplier - the ration of IDs to actual rows (how many IDs to select to get a row)
maxIdRange - the largest ID range to use for selects. Normally, the ID range should be allowed to grow in accordance with the general distribution of rows, but if memory problems are encountered, then the range will need to be set down.
maxResults - the number of child associations to fetch
Returns:
Returns child associations that need fixing

updateChildAssocCrc

int updateChildAssocCrc(java.lang.Long assocId,
                        java.lang.Long childNodeNameCrc,
                        java.lang.Long qnameCrc)

getNodesOfTypeWithNamePattern

java.util.List getNodesOfTypeWithNamePattern(org.alfresco.service.namespace.QName typeQName,
                                             java.lang.String namePattern)
Query for a list of nodes that have a given type and share the same name pattern (SQL LIKE syntax)

Parameters:
typeQName - the node type
namePattern - the SQL LIKE pattern
Returns:
Returns the node ID and node name

migrateOldAttrTenants

void migrateOldAttrTenants(org.apache.ibatis.session.ResultHandler resultHandler)
Migrate old Tenant attributes (if any)


migrateOldAttrAVMLocks

void migrateOldAttrAVMLocks(org.apache.ibatis.session.ResultHandler resultHandler)
Migrate old AVM Lock attributes (if any)


migrateOldAttrPropertyBackedBeans

void migrateOldAttrPropertyBackedBeans(org.apache.ibatis.session.ResultHandler resultHandler)
Migrate old Property-Backed Bean attributes (if any)


migrateOldAttrChainingURS

void migrateOldAttrChainingURS(org.apache.ibatis.session.ResultHandler resultHandler)
Migrate old Chaining User Registry Synchronizer attributes (if any)


migrateOldAttrDropTables

void migrateOldAttrDropTables()
Drop old attribute alf_*attribute* tables


getOldAttrCustomNames

java.util.List getOldAttrCustomNames()
Get custom global attribute names (if any)


getSharedAclsThatDoNotInheritCorrectlyFromThePrimaryParent

java.util.List getSharedAclsThatDoNotInheritCorrectlyFromThePrimaryParent()
Get shared acls with inheritance issues


getDefiningAclsThatDoNotInheritCorrectlyFromThePrimaryParent

java.util.List getDefiningAclsThatDoNotInheritCorrectlyFromThePrimaryParent()
Get defining acls with inheritance issues


getAclsThatInheritFromNonPrimaryParent

java.util.List getAclsThatInheritFromNonPrimaryParent()
Get acls that do not inherit from the primary parent.


getAclsThatInheritWithInheritanceUnset

java.util.List getAclsThatInheritWithInheritanceUnset()
Get acls that inherit with inheritance unset


getSharedAclsThatDoNotInheritCorrectlyFromTheirDefiningAcl

java.util.List getSharedAclsThatDoNotInheritCorrectlyFromTheirDefiningAcl()
Get shared acls that do not inherit correctly from the defining acl


getCountNodesWithAspects

long getCountNodesWithAspects(java.util.Set qnames)
Parameters:
qnames - the qnames to search for
Returns:
Returns a count of the number of nodes that have either of the aspects


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.