/** * Returns the fully qualified name of the organizational unit.<p> * * @return the fully qualified name of the organizational unit */ public String getOufqn() { return m_project.getOuFqn(); }
/** * Returns whether only a single OU is visible to the current user.<p> * * @param projects the selectable projects * * @return <code>true</code> if only a single OU is visible to the current user */ private static boolean isSingleOu(List<CmsProject> projects) { String ouFqn = null; for (CmsProject project : projects) { if (project.isOnlineProject()) { // skip the online project continue; } if (ouFqn == null) { // set the first ou ouFqn = project.getOuFqn(); } else if (!ouFqn.equals(project.getOuFqn())) { // break if one different ou is found return false; } } return true; }
/** * Checks if the current user has management access to the current project.<p> * * @param context the current request context * * @return <code>true</code>, if the user has management access to the current project */ public boolean isManagerOfProject(CmsRequestContext context) { try { return getAllManageableProjects( context, readOrganizationalUnit(context, context.currentProject().getOuFqn()), false).contains(context.currentProject()); } catch (CmsException e) { // should never happen if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage(), e); } return false; } }
/** * Checks if the current user has management access to the current project.<p> * * @param context the current request context * * @return <code>true</code>, if the user has management access to the current project */ public boolean isManagerOfProject(CmsRequestContext context) { try { return getAllManageableProjects( context, readOrganizationalUnit(context, context.getCurrentProject().getOuFqn()), false).contains(context.getCurrentProject()); } catch (CmsException e) { // should never happen if (LOG.isErrorEnabled()) { LOG.error(e.getLocalizedMessage(), e); } return false; } }
stmt.setLong(10, currentProject.getDateCreated()); stmt.setInt(11, currentProject.getType().getMode()); stmt.setString(12, CmsOrganizationalUnit.SEPARATOR + currentProject.getOuFqn()); stmt.executeUpdate();
stmt.setLong(10, currentProject.getDateCreated()); stmt.setInt(11, currentProject.getType().getMode()); stmt.setString(12, CmsOrganizationalUnit.SEPARATOR + currentProject.getOuFqn()); stmt.executeUpdate();
/** * Returns the description of the parent ou.<p> * * @return the description of the parent ou */ public String getAssignedOu() { try { CmsOrganizationalUnit ou; if (!isNewProject()) { ou = OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), m_project.getOuFqn()); } else { ou = OpenCms.getRoleManager().getOrgUnitsForRole(getCms(), CmsRole.PROJECT_MANAGER, true).get(0); } return ou.getDisplayName(getLocale()); } catch (CmsException e) { return null; } }
m_driverManager.readOrganizationalUnit(dbc, project.getOuFqn()), false).contains(project); } catch (CmsException e) {
m_driverManager.readOrganizationalUnit(dbc, project.getOuFqn()), false).contains(project); } catch (CmsException e) {
item.set( LIST_COLUMN_ORGUNIT, OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), project.getOuFqn()).getDisplayName( getLocale())); try {
&& OpenCms.getOrgUnitManager().getAllAccessibleProjects( cms, project.getOuFqn(), false).contains(project)) { targetProject = project;
if (OpenCms.getOrgUnitManager().getAllAccessibleProjects(cms, project.getOuFqn(), false).contains( project)) {
if (OpenCms.getOrgUnitManager().getAllAccessibleProjects(cms, project.getOuFqn(), false).contains( project)) {
try { CmsProject project = newCms.readProject(settings.getStartProject()); if (getOrgUnitManager().getAllAccessibleProjects(newCms, project.getOuFqn(), false).contains( project)) {
try { CmsOrganizationalUnit ou; ou = OpenCms.getOrgUnitManager().readOrganizationalUnit(cms, m_project.getOuFqn()); m_fieldOU.setValue(ou.getDisplayName(UI.getCurrent().getLocale())); } catch (CmsException e) {
hp.setDateCreated(currentProject.getDateCreated()); hp.setProjectType(currentProject.getType().getMode()); hp.setProjectOu(CmsOrganizationalUnit.SEPARATOR + currentProject.getOuFqn());