|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.torque.om.BaseObject
org.tigris.scarab.om.AbstractScarabModule
org.tigris.scarab.om.BaseScarabModule
org.tigris.scarab.om.ScarabModule
The ScarabModule class is the focal point for dealing with Modules. It implements the concept of a Module which is a single module and is the base interface for all Modules. In code, one should never reference ScarabModule directly -- use its Module interface instead. This allows us to swap out Module implementations by modifying the Scarab.properties file.
| Field Summary | |
protected static java.lang.Integer |
ROOT_ID
|
| Fields inherited from class org.tigris.scarab.om.BaseScarabModule |
collAttributeGroups, collGlobalParameters, collIssues, collMITListItems, collNotificationDefaultFilters, collNotificationFilters, collPendingGroupUserRoles, collQuerys, collReports, collRModuleAttributes, collRModuleIssueTypes, collRModuleOptions, collRModuleUserAttributes, collUserVotes |
| Fields inherited from class org.apache.torque.om.BaseObject |
NEW_ID |
| Fields inherited from interface org.tigris.scarab.om.Module |
NAME_DELIMINATOR, NON_USER, USER |
| Fields inherited from interface org.apache.fulcrum.security.entity.Group |
GLOBAL_GROUP_NAME |
| Constructor Summary | |
ScarabModule()
|
|
| Method Summary | |
boolean |
allowsIssues()
Determines whether this module accepts issues. |
int |
compareTo(java.lang.Object obj)
Used for ordering Groups. |
java.lang.String |
getArchiveEmail()
All emails related to this module will have a copy sent to this address. |
java.lang.String[] |
getAutoApprovedRoles()
returns an array of Roles that can be approved without need for moderation. |
java.lang.String |
getCommentRenderingEngine()
Returns the comment rendering engine currently in use. |
java.lang.String |
getHttpDomain()
Get the value of domain. |
int |
getIssueCount(ScarabUser user)
The number of active issues within the module. |
int |
getIssueCount(ScarabUser user,
AttributeOption attributeOption)
The number of active issues within the module. |
Module |
getParent()
Cast the getScarabModuleRelatedByParentId() to a Module |
java.lang.String |
getPort()
Get the value of port. |
org.apache.fulcrum.security.entity.Role |
getRequiredRole()
Returns the required role for *any* access to this module including for requesting roles. |
java.util.List |
getRModuleAttributes(org.apache.torque.util.Criteria crit)
Returns RModuleAttributes associated with this Module. |
java.util.List |
getRModuleIssueTypes()
This method returns a complete list of RModuleIssueTypes which are not deleted, have a IssueType.PARENT_ID of 0 and sorted ascending by PREFERRED_ORDER. |
java.util.List |
getRModuleOptions(org.apache.torque.util.Criteria crit)
Returns associated RModuleOptions. |
java.util.List |
getRoles()
Gets all module roles. |
java.lang.String |
getScarabInstanceId()
Get the value of the Scarab instance id. |
java.lang.String |
getScheme()
Get the value of scheme. |
java.lang.String |
getScriptName()
Get the value of scriptName. |
ScarabUser[] |
getUsers(java.util.List permissions)
Get a list of ScarabUser's that have any of the given
permissions in the given module. |
ScarabUser[] |
getUsers(java.lang.String permission)
Get a list of ScarabUser's that have the given
permission in the given module. |
ScarabPaginatedList |
getUsers(java.lang.String name,
java.lang.String username,
MITList mitList,
int pageNum,
int resultsPerPage,
java.lang.String sortColumn,
java.lang.String sortPolarity,
boolean includeCommitters)
Gets users for a given criteria, starting at a particular offset, for a given length, and have at least one permission that is applicable to user attributes active in the given issue type. |
java.util.List |
getUsers(java.lang.String firstName,
java.lang.String lastName,
java.lang.String username,
java.lang.String email,
IssueType issueType)
Gets users which match all of the given criteria and have at least one permission that is applicable to user attributes active in the given issue type. |
void |
grant(org.apache.fulcrum.security.entity.User user,
org.apache.fulcrum.security.entity.Role role)
Grants a Role in this Group to an User. |
void |
grant(org.apache.fulcrum.security.entity.User user,
org.apache.fulcrum.security.util.RoleSet roleSet)
Grants Roles in this Group to an User. |
boolean |
isIssueReasonRequired()
Provides the flag, wether issue store needs valid reason. |
boolean |
isIssueReasonRequiredInherited()
Determines if the value of isIssueReasonRequired is due to the configuration of this module or inherited from ancestors or default configuration. |
boolean |
registerNeedsRequiredRole()
Checks if an attempt to register a role for this module needs a specific role. returns false, if no role is needed. otherwise return true. |
void |
remove()
Removes a group from the system. |
void |
rename(java.lang.String name)
Renames the group. |
void |
revoke(org.apache.fulcrum.security.entity.User user,
org.apache.fulcrum.security.entity.Role role)
Revokes a Role in this Group from an User. |
void |
revoke(org.apache.fulcrum.security.entity.User user,
org.apache.fulcrum.security.util.RoleSet roleSet)
Revokes Roles in this group from an User. |
void |
save()
Saves the module into the database |
void |
save(java.sql.Connection dbCon)
Saves the module into the database. |
void |
setHttpDomain(java.lang.String v)
Set the value of domain. |
void |
setParent(Module v)
Wrapper method to perform the proper cast to the BaseModule method of the same name. |
void |
setParentId(java.lang.Integer id)
Override method to make sure the module name gets recalculated. |
void |
setPort(java.lang.String v)
Set the value of port. |
void |
setScarabInstanceId(java.lang.String v)
Set the value of Scarab domain name. |
void |
setScheme(java.lang.String v)
Set the value of scheme. |
void |
setScriptName(java.lang.String v)
Set the value of scriptName. |
java.lang.String |
toString()
|
| Methods inherited from class org.apache.torque.om.BaseObject |
equals, equals, getLog, hashCode, isModified, isNew, resetModified, setModified, setNew, setPrimaryKey |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.torque.om.Persistent |
getPrimaryKey, isModified, isNew, save, setModified, setNew, setPrimaryKey, setPrimaryKey |
| Methods inherited from interface org.apache.fulcrum.security.entity.Group |
getName, setName |
| Field Detail |
protected static final java.lang.Integer ROOT_ID
| Constructor Detail |
public ScarabModule()
| Method Detail |
public java.lang.String getHttpDomain()
getHttpDomain in interface Modulepublic void setHttpDomain(java.lang.String v)
setHttpDomain in interface Modulev - Value to assign to domain.public java.lang.String getScarabInstanceId()
getScarabInstanceId in interface Modulepublic void setScarabInstanceId(java.lang.String v)
setScarabInstanceId in interface Modulev - Value to assign to domain.
public java.lang.String getPort()
throws org.apache.torque.TorqueException
getPort in interface Moduleorg.apache.torque.TorqueException
public void setPort(java.lang.String v)
throws org.apache.torque.TorqueException
setPort in interface Modulev - Value to assign to port.
org.apache.torque.TorqueException
public java.lang.String getScheme()
throws org.apache.torque.TorqueException
getScheme in interface Moduleorg.apache.torque.TorqueException
public void setScheme(java.lang.String v)
throws org.apache.torque.TorqueException
setScheme in interface Modulev - Value to assign to scheme.
org.apache.torque.TorqueException
public java.lang.String getScriptName()
throws org.apache.torque.TorqueException
getScriptName in interface Moduleorg.apache.torque.TorqueException
public void setScriptName(java.lang.String v)
throws org.apache.torque.TorqueException
setScriptName in interface Modulev - Value to assign to scriptName.
org.apache.torque.TorqueExceptionpublic ScarabUser[] getUsers(java.lang.String permission)
ModuleScarabUser's that have the given
permission in the given module.
getUsers in interface ModulegetUsers in class AbstractScarabModuleModule.getUsers(String)public ScarabUser[] getUsers(java.util.List permissions)
ModuleScarabUser's that have any of the given
permissions in the given module.
getUsers in interface ModulegetUsers in class AbstractScarabModuleModule.getUsers(List)
public ScarabPaginatedList getUsers(java.lang.String name,
java.lang.String username,
MITList mitList,
int pageNum,
int resultsPerPage,
java.lang.String sortColumn,
java.lang.String sortPolarity,
boolean includeCommitters)
throws org.apache.torque.TorqueException,
com.workingdogs.village.DataSetException
Module
getUsers in interface ModulemitList - MITs to restrict the user's search. If null, it will not be restricted.
org.apache.torque.TorqueException
com.workingdogs.village.DataSetExceptionModule.getUsers(String, String, String, String, IssueType)
public java.util.List getUsers(java.lang.String firstName,
java.lang.String lastName,
java.lang.String username,
java.lang.String email,
IssueType issueType)
throws org.apache.torque.TorqueException
Module
getUsers in interface Moduleorg.apache.torque.TorqueExceptionThis implementation adds wildcard prefix and suffix and performs an SQL
LIKE query for each of the String args that are not null.
WARNING: This is potentially a very EXPENSIVE method.
public void setParent(Module v)
throws org.apache.torque.TorqueException
setParent in interface ModulesetParent in class AbstractScarabModuleorg.apache.torque.TorqueException
public Module getParent()
throws org.apache.torque.TorqueException
getParent in interface ModulegetParent in class AbstractScarabModuleorg.apache.torque.TorqueException
public void setParentId(java.lang.Integer id)
throws org.apache.torque.TorqueException
setParentId in interface ModulesetParentId in class BaseScarabModuleid - a Integer value
org.apache.torque.TorqueException
public java.util.List getRModuleIssueTypes()
throws org.apache.torque.TorqueException
getRModuleIssueTypes in interface ModulegetRModuleIssueTypes in class BaseScarabModuleorg.apache.torque.TorqueException
public int getIssueCount(ScarabUser user,
AttributeOption attributeOption)
throws org.apache.torque.TorqueException,
ScarabException,
com.workingdogs.village.DataSetException
user - a ScarabUser value used to determine if
a count should be given.
int the number of issues entered for the
module unless the user does not have permission to
search for issues in the given module, then a value of 0 will be
returned. if resource limited, this method will return -1.
com.workingdogs.village.DataSetException
java.lang.Exception - if an error occurs
org.apache.torque.TorqueException
ScarabException
public int getIssueCount(ScarabUser user)
throws org.apache.torque.TorqueException,
ScarabException,
com.workingdogs.village.DataSetException
user - a ScarabUser value used to determine if
a count should be given.
int the number of issues entered for the
module unless the user does not have permission to
search for issues in the given module, then a value of 0 will be
returned. if resource limited, this method will return -1.
com.workingdogs.village.DataSetException
java.lang.Exception - if an error occurs
org.apache.torque.TorqueException
ScarabException
public java.util.List getRModuleAttributes(org.apache.torque.util.Criteria crit)
throws org.apache.torque.TorqueException
getRModuleAttributes in interface ModulegetRModuleAttributes in class BaseScarabModuleorg.apache.torque.TorqueException
public java.util.List getRModuleOptions(org.apache.torque.util.Criteria crit)
throws org.apache.torque.TorqueException
getRModuleOptions in interface ModulegetRModuleOptions in class BaseScarabModulecrit - a Criteria value
List value
org.apache.torque.TorqueExceptionpublic boolean allowsIssues()
Module
allowsIssues in interface ModuleallowsIssues in class AbstractScarabModulepublic void save()
save in interface org.apache.torque.om.Persistentsave in class BaseScarabModuleScarabRuntimeException - when a TorqueException is thrown internally.
public void save(java.sql.Connection dbCon)
throws org.apache.torque.TorqueException
save in interface org.apache.torque.om.Persistentsave in class BaseScarabModuledbCon -
org.apache.torque.TorqueException
public void remove()
throws org.apache.fulcrum.security.util.TurbineSecurityException
remove in interface org.apache.fulcrum.security.entity.Grouporg.apache.fulcrum.security.util.TurbineSecurityException - if the Group could not be removed.
public void rename(java.lang.String name)
throws org.apache.fulcrum.security.util.TurbineSecurityException
rename in interface org.apache.fulcrum.security.entity.Groupname - The new Group name.
org.apache.fulcrum.security.util.TurbineSecurityException - if the Group could not be renamed.
public void grant(org.apache.fulcrum.security.entity.User user,
org.apache.fulcrum.security.entity.Role role)
throws org.apache.fulcrum.security.util.TurbineSecurityException
grant in interface org.apache.fulcrum.security.entity.Groupuser - An User.role - A Role.
org.apache.fulcrum.security.util.TurbineSecurityException - if there is a problem while assigning
the Role.
public void grant(org.apache.fulcrum.security.entity.User user,
org.apache.fulcrum.security.util.RoleSet roleSet)
throws org.apache.fulcrum.security.util.TurbineSecurityException
grant in interface org.apache.fulcrum.security.entity.Groupuser - An User.roleSet - A RoleSet.
org.apache.fulcrum.security.util.TurbineSecurityException - if there is a problem while assigning
the Roles.
public void revoke(org.apache.fulcrum.security.entity.User user,
org.apache.fulcrum.security.entity.Role role)
throws org.apache.fulcrum.security.util.TurbineSecurityException
revoke in interface org.apache.fulcrum.security.entity.Groupuser - An User.role - A Role.
org.apache.fulcrum.security.util.TurbineSecurityException - if there is a problem while unassigning
the Role.
public void revoke(org.apache.fulcrum.security.entity.User user,
org.apache.fulcrum.security.util.RoleSet roleSet)
throws org.apache.fulcrum.security.util.TurbineSecurityException
revoke in interface org.apache.fulcrum.security.entity.Groupuser - An User.roleSet - a RoleSet.
org.apache.fulcrum.security.util.TurbineSecurityException - if there is a problem while unassigning
the Roles.public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.ComparablecompareTo in class AbstractScarabModuleobj - The Object to compare to.
public java.lang.String getArchiveEmail()
getArchiveEmail in interface ModulegetArchiveEmail in class BaseScarabModulepublic java.lang.String[] getAutoApprovedRoles()
public boolean isIssueReasonRequired()
isIssueReasonRequired in interface Modulepublic boolean isIssueReasonRequiredInherited()
isIssueReasonRequiredInherited in interface Modulepublic boolean registerNeedsRequiredRole()
public org.apache.fulcrum.security.entity.Role getRequiredRole()
getRequiredRole in interface Modulepublic java.lang.String getCommentRenderingEngine()
getCommentRenderingEngine in interface Module
public java.util.List getRoles()
throws org.apache.torque.TorqueException
getRoles in interface Moduleorg.apache.torque.TorqueExceptionpublic java.lang.String toString()
toString in interface ModuletoString in class BaseScarabModule
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||