Let git handle line endings for us.

This commit is contained in:
Tom Page
2016-09-08 16:26:46 +01:00
parent e97f12ebf1
commit 0ef8377861
804 changed files with 102026 additions and 101997 deletions

View File

@@ -1,32 +1,32 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_dod5015.caveat;
/**
* Compatibility Implementation.
* <p>
* Used as a compatibility implementation when migrating from V1.0 to V2.0. RMCustom model still references
* this class implementation, but package has been changed.
*
* @author Roy Wetherall
*/
public class RMListOfValuesConstraint extends org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint
{
// No implementation
}
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_dod5015.caveat;
/**
* Compatibility Implementation.
* <p>
* Used as a compatibility implementation when migrating from V1.0 to V2.0. RMCustom model still references
* this class implementation, but package has been changed.
*
* @author Roy Wetherall
*/
public class RMListOfValuesConstraint extends org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint
{
// No implementation
}

View File

@@ -1,29 +1,29 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm;
/**
* @deprecated as of 2.1 see {@link org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService}
*/
public interface RecordsManagementAdminService
extends org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService
{
}
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm;
/**
* @deprecated as of 2.1 see {@link org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService}
*/
public interface RecordsManagementAdminService
extends org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService
{
}

View File

@@ -1,71 +1,71 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.audit;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction;
import org.alfresco.service.cmr.repository.NodeRef;
/**
* Deprecated records management audit interface methods.
*
* @author Roy Wetherall
* @since 2.1
*/
public interface RecordsManagementAuditServiceDeprecated
{
/**
* @deprecated as of 2.1, see {@link #stop(NodeRef)}
*/
@Deprecated
void stop();
/**
* @deprecated as of 2.1, see {@link #clear(NodeRef)}
*/
@Deprecated
void clear();
/**
* @deprecated as of 2.1, see {@link #isEnabled(NodeRef)}
*/
@Deprecated
boolean isEnabled();
/**
* @deprecated as of 2.1, see {@link #getDateLastStarted(NodeRef)}
*/
@Deprecated
Date getDateLastStarted();
/**
* @deprecated as of 2.1, see {@link #getDateLastStopped(NodeRef)}
*/
Date getDateLastStopped();
/**
* @deprecated as of 2.1
*/
@Deprecated
void auditRMAction(RecordsManagementAction action, NodeRef nodeRef, Map<String, Serializable> parameters);
}
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.audit;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction;
import org.alfresco.service.cmr.repository.NodeRef;
/**
* Deprecated records management audit interface methods.
*
* @author Roy Wetherall
* @since 2.1
*/
public interface RecordsManagementAuditServiceDeprecated
{
/**
* @deprecated as of 2.1, see {@link #stop(NodeRef)}
*/
@Deprecated
void stop();
/**
* @deprecated as of 2.1, see {@link #clear(NodeRef)}
*/
@Deprecated
void clear();
/**
* @deprecated as of 2.1, see {@link #isEnabled(NodeRef)}
*/
@Deprecated
boolean isEnabled();
/**
* @deprecated as of 2.1, see {@link #getDateLastStarted(NodeRef)}
*/
@Deprecated
Date getDateLastStarted();
/**
* @deprecated as of 2.1, see {@link #getDateLastStopped(NodeRef)}
*/
Date getDateLastStopped();
/**
* @deprecated as of 2.1
*/
@Deprecated
void auditRMAction(RecordsManagementAction action, NodeRef nodeRef, Map<String, Serializable> parameters);
}

View File

@@ -1,39 +1,39 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.compatibility;
import org.alfresco.module.org_alfresco_module_rm.dod5015.DOD5015Model;
import org.alfresco.service.namespace.QName;
/**
* RM 1.0 compatibility model
*
* @author Roy Wetherall
*/
public interface CompatibilityModel extends DOD5015Model
{
// Record series DOD type
public static final QName TYPE_RECORD_SERIES = QName.createQName(DOD_URI, "recordSeries");
// V1.0 custom property aspect names
public static final String NAME_CUSTOM_RECORD_PROPERTIES = "customRecordProperties";
public static final String NAME_CUSTOM_RECORD_FOLDER_PROPERTIES = "customRecordFolderProperties";
public static final String NAME_CUSTOM_RECORD_CATEGORY_PROPERTIES = "customRecordCategoryProperties";
public static final String NAME_CUSTOM_RECORD_SERIES_PROPERTIES = "customRecordSeriesProperties";
}
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.compatibility;
import org.alfresco.module.org_alfresco_module_rm.dod5015.DOD5015Model;
import org.alfresco.service.namespace.QName;
/**
* RM 1.0 compatibility model
*
* @author Roy Wetherall
*/
public interface CompatibilityModel extends DOD5015Model
{
// Record series DOD type
public static final QName TYPE_RECORD_SERIES = QName.createQName(DOD_URI, "recordSeries");
// V1.0 custom property aspect names
public static final String NAME_CUSTOM_RECORD_PROPERTIES = "customRecordProperties";
public static final String NAME_CUSTOM_RECORD_FOLDER_PROPERTIES = "customRecordFolderProperties";
public static final String NAME_CUSTOM_RECORD_CATEGORY_PROPERTIES = "customRecordCategoryProperties";
public static final String NAME_CUSTOM_RECORD_SERIES_PROPERTIES = "customRecordSeriesProperties";
}

View File

@@ -1,206 +1,206 @@
/*
* Copyright (C) 2005-2012 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.security;
import java.util.Set;
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
import org.alfresco.module.org_alfresco_module_rm.model.security.ModelSecurityService;
import org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
/**
* Records management permission service interface
*
* @author Roy Wetherall
*
* @deprecated As of release 2.1, replaced by {@link ModelSecurityService}, {@link FilePlanRoleService} and {@link FilePlanPermissionService}
*/
public interface RecordsManagementSecurityService
{
/**
* Creates the initial set of default roles for a root records management node
*
* @param rmRootNode root node
*
* @deprecated As of release 2.1, operation no longer supported
*/
@Deprecated
void bootstrapDefaultRoles(NodeRef rmRootNode);
/**
* Returns the name of the container group for all roles of a specified file
* plan.
*
* @param filePlan file plan node reference
* @return String group name
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#getAllRolesContainerGroup(NodeRef)}
*/
@Deprecated
String getAllRolesContainerGroup(NodeRef filePlan);
/**
* Get all the available roles for the given records management root node
*
* @param rmRootNode root node
* @return {@link Set}<{@link Role}> all roles for a given root node
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#getRoles(NodeRef)}
*/
@Deprecated
Set<Role> getRoles(NodeRef rmRootNode);
/**
* Gets the roles for a given user
*
* @param rmRootNode
* @param user
* @return
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#getRolesByUser(NodeRef, String)}
*/
@Deprecated
Set<Role> getRolesByUser(NodeRef rmRootNode, String user);
/**
* Get a role by name
*
* @param rmRootNode
* @param role
* @return
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#getRole(NodeRef, String)}
*/
@Deprecated
Role getRole(NodeRef rmRootNode, String role);
/**
* Indicate whether a role exists for a given records management root node
* @param rmRootNode
* @param role
* @return
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#existsRole(NodeRef, String)}
*/
@Deprecated
boolean existsRole(NodeRef rmRootNode, String role);
/**
* Determines whether the given user has the RM Admin role
*
* @param rmRootNode RM root node
* @param user user name to check
* @return true if the user has the RM Admin role, false otherwise
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#hasRMAdminRole(NodeRef, String)}
*/
@Deprecated
boolean hasRMAdminRole(NodeRef rmRootNode, String user);
/**
* Create a new role
*
* @param rmRootNode
* @param role
* @param roleDisplayLabel
* @param capabilities
* @return
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#createRole(NodeRef, String, String, Set)}
*/
@Deprecated
Role createRole(NodeRef rmRootNode, String role, String roleDisplayLabel, Set<Capability> capabilities);
/**
* Update an existing role
*
* @param rmRootNode
* @param role
* @param roleDisplayLabel
* @param capabilities
* @return
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#updateRole(NodeRef, String, String, Set)}
*/
@Deprecated
Role updateRole(NodeRef rmRootNode, String role, String roleDisplayLabel, Set<Capability> capabilities);
/**
* Delete a role
*
* @param rmRootNode
* @param role
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#deleteRole(NodeRef, String)}
*/
@Deprecated
void deleteRole(NodeRef rmRootNode, String role);
/**
* Assign a role to an authority
*
* @param authorityName
* @param rmRootNode
* @param role
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#assignRoleToAuthority(NodeRef, String, String)}
*/
@Deprecated
void assignRoleToAuthority(NodeRef rmRootNode, String role, String authorityName);
/**
* Sets a permission on a RM object. Assumes allow is true. Cascades permission down to record folder.
* Cascades ReadRecord up to file plan.
*
* @param nodeRef node reference
* @param authority authority
* @param permission permission
*
* @deprecated As of release 2.1, replaced by {@link FilePlanPermissionService#setPermission(NodeRef, String, String)}
*/
@Deprecated
void setPermission(NodeRef nodeRef, String authority, String permission);
/**
* Deletes a permission from a RM object. Cascades removal down to record folder.
*
* @param nodeRef node reference
* @param authority authority
* @param permission permission
*
* @deprecated As of release 2.1, replaced by {@link FilePlanPermissionService#deletePermission(NodeRef, String, String)}
*/
@Deprecated
void deletePermission(NodeRef nodeRef, String authority, String permission);
/**
* @return {@link Set}<{@link QName}> protected aspect names
* @deprecated As of release 2.1, replaced by {@link ModelSecurityService#getProtectedAspects}
*/
@Deprecated
Set<QName> getProtectedAspects();
/**
* @return {@link Set}<{@link QName}> protected properties
* @deprecated As of release 2.1, replaced by {@link ModelSecurityService#getProtectedProperties}
*/
Set<QName> getProtectedProperties();
}
/*
* Copyright (C) 2005-2012 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.security;
import java.util.Set;
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
import org.alfresco.module.org_alfresco_module_rm.model.security.ModelSecurityService;
import org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
/**
* Records management permission service interface
*
* @author Roy Wetherall
*
* @deprecated As of release 2.1, replaced by {@link ModelSecurityService}, {@link FilePlanRoleService} and {@link FilePlanPermissionService}
*/
public interface RecordsManagementSecurityService
{
/**
* Creates the initial set of default roles for a root records management node
*
* @param rmRootNode root node
*
* @deprecated As of release 2.1, operation no longer supported
*/
@Deprecated
void bootstrapDefaultRoles(NodeRef rmRootNode);
/**
* Returns the name of the container group for all roles of a specified file
* plan.
*
* @param filePlan file plan node reference
* @return String group name
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#getAllRolesContainerGroup(NodeRef)}
*/
@Deprecated
String getAllRolesContainerGroup(NodeRef filePlan);
/**
* Get all the available roles for the given records management root node
*
* @param rmRootNode root node
* @return {@link Set}<{@link Role}> all roles for a given root node
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#getRoles(NodeRef)}
*/
@Deprecated
Set<Role> getRoles(NodeRef rmRootNode);
/**
* Gets the roles for a given user
*
* @param rmRootNode
* @param user
* @return
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#getRolesByUser(NodeRef, String)}
*/
@Deprecated
Set<Role> getRolesByUser(NodeRef rmRootNode, String user);
/**
* Get a role by name
*
* @param rmRootNode
* @param role
* @return
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#getRole(NodeRef, String)}
*/
@Deprecated
Role getRole(NodeRef rmRootNode, String role);
/**
* Indicate whether a role exists for a given records management root node
* @param rmRootNode
* @param role
* @return
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#existsRole(NodeRef, String)}
*/
@Deprecated
boolean existsRole(NodeRef rmRootNode, String role);
/**
* Determines whether the given user has the RM Admin role
*
* @param rmRootNode RM root node
* @param user user name to check
* @return true if the user has the RM Admin role, false otherwise
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#hasRMAdminRole(NodeRef, String)}
*/
@Deprecated
boolean hasRMAdminRole(NodeRef rmRootNode, String user);
/**
* Create a new role
*
* @param rmRootNode
* @param role
* @param roleDisplayLabel
* @param capabilities
* @return
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#createRole(NodeRef, String, String, Set)}
*/
@Deprecated
Role createRole(NodeRef rmRootNode, String role, String roleDisplayLabel, Set<Capability> capabilities);
/**
* Update an existing role
*
* @param rmRootNode
* @param role
* @param roleDisplayLabel
* @param capabilities
* @return
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#updateRole(NodeRef, String, String, Set)}
*/
@Deprecated
Role updateRole(NodeRef rmRootNode, String role, String roleDisplayLabel, Set<Capability> capabilities);
/**
* Delete a role
*
* @param rmRootNode
* @param role
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#deleteRole(NodeRef, String)}
*/
@Deprecated
void deleteRole(NodeRef rmRootNode, String role);
/**
* Assign a role to an authority
*
* @param authorityName
* @param rmRootNode
* @param role
*
* @deprecated As of release 2.1, replaced by {@link FilePlanRoleService#assignRoleToAuthority(NodeRef, String, String)}
*/
@Deprecated
void assignRoleToAuthority(NodeRef rmRootNode, String role, String authorityName);
/**
* Sets a permission on a RM object. Assumes allow is true. Cascades permission down to record folder.
* Cascades ReadRecord up to file plan.
*
* @param nodeRef node reference
* @param authority authority
* @param permission permission
*
* @deprecated As of release 2.1, replaced by {@link FilePlanPermissionService#setPermission(NodeRef, String, String)}
*/
@Deprecated
void setPermission(NodeRef nodeRef, String authority, String permission);
/**
* Deletes a permission from a RM object. Cascades removal down to record folder.
*
* @param nodeRef node reference
* @param authority authority
* @param permission permission
*
* @deprecated As of release 2.1, replaced by {@link FilePlanPermissionService#deletePermission(NodeRef, String, String)}
*/
@Deprecated
void deletePermission(NodeRef nodeRef, String authority, String permission);
/**
* @return {@link Set}<{@link QName}> protected aspect names
* @deprecated As of release 2.1, replaced by {@link ModelSecurityService#getProtectedAspects}
*/
@Deprecated
Set<QName> getProtectedAspects();
/**
* @return {@link Set}<{@link QName}> protected properties
* @deprecated As of release 2.1, replaced by {@link ModelSecurityService#getProtectedProperties}
*/
Set<QName> getProtectedProperties();
}

View File

@@ -1,221 +1,221 @@
/*
* Copyright (C) 2005-2012 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.security;
import java.util.Set;
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.module.org_alfresco_module_rm.model.security.ModelSecurityService;
import org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
/**
* Records management permission service implementation
*
* @author Roy Wetherall
*/
@SuppressWarnings("deprecation")
public class RecordsManagementSecurityServiceImpl implements RecordsManagementSecurityService,
RecordsManagementModel
{
/** Model security service */
private ModelSecurityService modelSecurityService;
/** File plan role service */
private FilePlanRoleService filePlanRoleService;
/** File plan permission service */
private FilePlanPermissionService filePlanPermissionService;
/**
* @param modelSecurityService model security service
*/
public void setModelSecurityService(ModelSecurityService modelSecurityService)
{
this.modelSecurityService = modelSecurityService;
}
/**
* @param filePlanRoleService file plan role service
*/
public void setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
{
this.filePlanRoleService = filePlanRoleService;
}
/**
* @param filePlanPermissionService file plan permission service
*/
public void setFilePlanPermissionService(FilePlanPermissionService filePlanPermissionService)
{
this.filePlanPermissionService = filePlanPermissionService;
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getProtectedAspects()
*/
@Deprecated
@Override
public Set<QName> getProtectedAspects()
{
return modelSecurityService.getProtectedAspects();
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getProtectedProperties()
*/
@Deprecated
@Override
public Set<QName> getProtectedProperties()
{
return modelSecurityService.getProtectedProperties();
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#assignRoleToAuthority(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String)
*/
@Deprecated
@Override
public void assignRoleToAuthority(NodeRef rmRootNode, String role, String authorityName)
{
filePlanRoleService.assignRoleToAuthority(rmRootNode, role, authorityName);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#bootstrapDefaultRoles(org.alfresco.service.cmr.repository.NodeRef)
*/
@Deprecated
@Override
public void bootstrapDefaultRoles(NodeRef rmRootNode)
{
throw new UnsupportedOperationException("This method is no longer supported.");
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#createRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String, java.util.Set)
*/
@Deprecated
@Override
public Role createRole(NodeRef rmRootNode, String role, String roleDisplayLabel, Set<Capability> capabilities)
{
return Role.toRole(filePlanRoleService.createRole(rmRootNode, role, roleDisplayLabel, capabilities));
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#deleteRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Deprecated
@Override
public void deleteRole(NodeRef rmRootNode, String role)
{
filePlanRoleService.deleteRole(rmRootNode, role);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#existsRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Deprecated
@Override
public boolean existsRole(NodeRef rmRootNode, String role)
{
return filePlanRoleService.existsRole(rmRootNode, role);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getAllRolesContainerGroup(org.alfresco.service.cmr.repository.NodeRef)
*/
@Deprecated
@Override
public String getAllRolesContainerGroup(NodeRef filePlan)
{
return filePlanRoleService.getAllRolesContainerGroup(filePlan);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Deprecated
@Override
public Role getRole(NodeRef rmRootNode, String role)
{
return Role.toRole(filePlanRoleService.getRole(rmRootNode, role));
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getRoles(org.alfresco.service.cmr.repository.NodeRef)
*/
@Deprecated
@Override
public Set<Role> getRoles(NodeRef rmRootNode)
{
return Role.toRoleSet(filePlanRoleService.getRoles(rmRootNode));
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getRolesByUser(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Deprecated
@Override
public Set<Role> getRolesByUser(NodeRef rmRootNode, String user)
{
return Role.toRoleSet(filePlanRoleService.getRolesByUser(rmRootNode, user));
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#hasRMAdminRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Deprecated
@Override
public boolean hasRMAdminRole(NodeRef rmRootNode, String user)
{
return filePlanRoleService.hasRMAdminRole(rmRootNode, user);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#updateRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String, java.util.Set)
*/
@Deprecated
@Override
public Role updateRole(NodeRef rmRootNode, String role, String roleDisplayLabel, Set<Capability> capabilities)
{
return updateRole(rmRootNode, role, roleDisplayLabel, capabilities);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#deletePermission(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String)
*/
@Deprecated
@Override
public void deletePermission(NodeRef nodeRef, String authority, String permission)
{
filePlanPermissionService.deletePermission(nodeRef, authority, permission);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#setPermission(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String)
*/
@Deprecated
@Override
public void setPermission(NodeRef nodeRef, String authority, String permission)
{
filePlanPermissionService.setPermission(nodeRef, authority, permission);
}
}
/*
* Copyright (C) 2005-2012 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.security;
import java.util.Set;
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
import org.alfresco.module.org_alfresco_module_rm.model.security.ModelSecurityService;
import org.alfresco.module.org_alfresco_module_rm.role.FilePlanRoleService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
/**
* Records management permission service implementation
*
* @author Roy Wetherall
*/
@SuppressWarnings("deprecation")
public class RecordsManagementSecurityServiceImpl implements RecordsManagementSecurityService,
RecordsManagementModel
{
/** Model security service */
private ModelSecurityService modelSecurityService;
/** File plan role service */
private FilePlanRoleService filePlanRoleService;
/** File plan permission service */
private FilePlanPermissionService filePlanPermissionService;
/**
* @param modelSecurityService model security service
*/
public void setModelSecurityService(ModelSecurityService modelSecurityService)
{
this.modelSecurityService = modelSecurityService;
}
/**
* @param filePlanRoleService file plan role service
*/
public void setFilePlanRoleService(FilePlanRoleService filePlanRoleService)
{
this.filePlanRoleService = filePlanRoleService;
}
/**
* @param filePlanPermissionService file plan permission service
*/
public void setFilePlanPermissionService(FilePlanPermissionService filePlanPermissionService)
{
this.filePlanPermissionService = filePlanPermissionService;
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getProtectedAspects()
*/
@Deprecated
@Override
public Set<QName> getProtectedAspects()
{
return modelSecurityService.getProtectedAspects();
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getProtectedProperties()
*/
@Deprecated
@Override
public Set<QName> getProtectedProperties()
{
return modelSecurityService.getProtectedProperties();
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#assignRoleToAuthority(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String)
*/
@Deprecated
@Override
public void assignRoleToAuthority(NodeRef rmRootNode, String role, String authorityName)
{
filePlanRoleService.assignRoleToAuthority(rmRootNode, role, authorityName);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#bootstrapDefaultRoles(org.alfresco.service.cmr.repository.NodeRef)
*/
@Deprecated
@Override
public void bootstrapDefaultRoles(NodeRef rmRootNode)
{
throw new UnsupportedOperationException("This method is no longer supported.");
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#createRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String, java.util.Set)
*/
@Deprecated
@Override
public Role createRole(NodeRef rmRootNode, String role, String roleDisplayLabel, Set<Capability> capabilities)
{
return Role.toRole(filePlanRoleService.createRole(rmRootNode, role, roleDisplayLabel, capabilities));
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#deleteRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Deprecated
@Override
public void deleteRole(NodeRef rmRootNode, String role)
{
filePlanRoleService.deleteRole(rmRootNode, role);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#existsRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Deprecated
@Override
public boolean existsRole(NodeRef rmRootNode, String role)
{
return filePlanRoleService.existsRole(rmRootNode, role);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getAllRolesContainerGroup(org.alfresco.service.cmr.repository.NodeRef)
*/
@Deprecated
@Override
public String getAllRolesContainerGroup(NodeRef filePlan)
{
return filePlanRoleService.getAllRolesContainerGroup(filePlan);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Deprecated
@Override
public Role getRole(NodeRef rmRootNode, String role)
{
return Role.toRole(filePlanRoleService.getRole(rmRootNode, role));
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getRoles(org.alfresco.service.cmr.repository.NodeRef)
*/
@Deprecated
@Override
public Set<Role> getRoles(NodeRef rmRootNode)
{
return Role.toRoleSet(filePlanRoleService.getRoles(rmRootNode));
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#getRolesByUser(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Deprecated
@Override
public Set<Role> getRolesByUser(NodeRef rmRootNode, String user)
{
return Role.toRoleSet(filePlanRoleService.getRolesByUser(rmRootNode, user));
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#hasRMAdminRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
*/
@Deprecated
@Override
public boolean hasRMAdminRole(NodeRef rmRootNode, String user)
{
return filePlanRoleService.hasRMAdminRole(rmRootNode, user);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#updateRole(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String, java.util.Set)
*/
@Deprecated
@Override
public Role updateRole(NodeRef rmRootNode, String role, String roleDisplayLabel, Set<Capability> capabilities)
{
return updateRole(rmRootNode, role, roleDisplayLabel, capabilities);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#deletePermission(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String)
*/
@Deprecated
@Override
public void deletePermission(NodeRef nodeRef, String authority, String permission)
{
filePlanPermissionService.deletePermission(nodeRef, authority, permission);
}
/**
* @see org.alfresco.module.org_alfresco_module_rm.security.RecordsManagementSecurityService#setPermission(org.alfresco.service.cmr.repository.NodeRef, java.lang.String, java.lang.String)
*/
@Deprecated
@Override
public void setPermission(NodeRef nodeRef, String authority, String permission)
{
filePlanPermissionService.setPermission(nodeRef, authority, permission);
}
}

View File

@@ -1,64 +1,64 @@
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.security;
import java.util.HashSet;
import java.util.Set;
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
/**
* Records management role class
*
* @author Roy Wetherall
*
* @deprecated As of release 2.1, see {@link org.alfresco.module.org_alfresco_module_rm.role.Role}
*/
public class Role extends org.alfresco.module.org_alfresco_module_rm.role.Role
{
/**
* Compatibility method
*/
public static Role toRole(org.alfresco.module.org_alfresco_module_rm.role.Role role)
{
return new Role(role.getName(), role.getDisplayLabel(), role.getCapabilities(), role.getRoleGroupName());
}
/**
* Compatibility method
*/
public static Set<Role> toRoleSet(Set<org.alfresco.module.org_alfresco_module_rm.role.Role> roles)
{
Set<Role> result = new HashSet<Role>(roles.size());
for (org.alfresco.module.org_alfresco_module_rm.role.Role role : roles)
{
result.add(Role.toRole(role));
}
return result;
}
/**
* Constructor
*/
@Deprecated
public Role(String name, String displayLabel, Set<Capability> capabilities, String roleGroupName)
{
super(name, displayLabel, capabilities, roleGroupName);
}
}
/*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.module.org_alfresco_module_rm.security;
import java.util.HashSet;
import java.util.Set;
import org.alfresco.module.org_alfresco_module_rm.capability.Capability;
/**
* Records management role class
*
* @author Roy Wetherall
*
* @deprecated As of release 2.1, see {@link org.alfresco.module.org_alfresco_module_rm.role.Role}
*/
public class Role extends org.alfresco.module.org_alfresco_module_rm.role.Role
{
/**
* Compatibility method
*/
public static Role toRole(org.alfresco.module.org_alfresco_module_rm.role.Role role)
{
return new Role(role.getName(), role.getDisplayLabel(), role.getCapabilities(), role.getRoleGroupName());
}
/**
* Compatibility method
*/
public static Set<Role> toRoleSet(Set<org.alfresco.module.org_alfresco_module_rm.role.Role> roles)
{
Set<Role> result = new HashSet<Role>(roles.size());
for (org.alfresco.module.org_alfresco_module_rm.role.Role role : roles)
{
result.add(Role.toRole(role));
}
return result;
}
/**
* Constructor
*/
@Deprecated
public Role(String name, String displayLabel, Set<Capability> capabilities, String roleGroupName)
{
super(name, displayLabel, capabilities, roleGroupName);
}
}