mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Let git handle line endings for us.
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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-2014 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
|
||||
}
|
||||
|
@@ -1,29 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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-2014 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
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -1,299 +1,299 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.transfer.TransferService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Records management service interface.
|
||||
*
|
||||
* Allows simple creation, manipulation and querying of records management components.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @deprecated as of 2.2
|
||||
*/
|
||||
public interface RecordsManagementService
|
||||
{
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlan(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isFilePlanComponent(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlanComponentKind(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
FilePlanComponentKind getFilePlanComponentKind(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlanComponentKindFromType(QName)}
|
||||
*/
|
||||
@Deprecated
|
||||
FilePlanComponentKind getFilePlanComponentKindFromType(QName type);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlanContainer(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordsManagementContainer(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlan(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isFilePlan(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isRecordCategory(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordCategory(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolder(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordFolder(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.2, see {@link TransferService#isTransfer(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isTransfer(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.2, see {@link RecordService#isMetadataStub(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isMetadataStub(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.2, see {@link DispositionService#isDisposableItemCutoff(NodeRef)}
|
||||
*/
|
||||
boolean isCutoff(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getNodeRefPath(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getNodeRefPath(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlan(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef getFilePlan(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlans()}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getFilePlans();
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, QName)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createFilePlan(NodeRef parent, String name, QName type);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createFilePlan(NodeRef parent, String name, QName type, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createFilePlan(NodeRef parent, String name);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, Map)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createFilePlan(NodeRef parent, String name, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getAllContained(NodeRef, boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getAllContained(NodeRef recordCategory, boolean deep);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getAllContained(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getAllContained(NodeRef recordCategory);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordCategories(NodeRef, boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getContainedRecordCategories(NodeRef recordCategory, boolean deep);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordCategories(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getContainedRecordCategories(NodeRef recordCategory);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordCategories(NodeRef, boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getContainedRecordFolders(NodeRef container, boolean deep);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordFolders(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getContainedRecordFolders(NodeRef container);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, QName)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordCategory(NodeRef parent, String name, QName type);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordCategory(NodeRef parent, String name, QName type, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordCategory(NodeRef parent, String name);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, Map)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordCategory(NodeRef parent, String name, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolderDeclared(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordFolderDeclared(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolderClosed(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordFolderClosed(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, QName)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordFolder(NodeRef rmContainer, String name, QName type);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordFolder(NodeRef rmContainer, String name, QName type, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordFolder(NodeRef parent, String name);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, Map)
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordFolder(NodeRef parent, String name, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordService#getRecords(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getRecords(NodeRef recordFolder);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#getRecordFolders(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getRecordFolders(NodeRef record);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, replaced by {@link RecordService#getRecordMetaDataAspects()}
|
||||
*/
|
||||
@Deprecated
|
||||
Set<QName> getRecordMetaDataAspects();
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, replaced by {@link RecordService#isDeclared(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordDeclared(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.1, replaced by {@link FreezeService#isHold(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isHold(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.1, replaced by {@link FreezeService#isFrozen(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isFrozen(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.1, replaced by {@link FreezeService#hasFrozenChildren(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean hasFrozenChildren(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, replaced by {@link RecordService#isRecord(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecord(NodeRef nodeRef);
|
||||
}
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.transfer.TransferService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Records management service interface.
|
||||
*
|
||||
* Allows simple creation, manipulation and querying of records management components.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @deprecated as of 2.2
|
||||
*/
|
||||
public interface RecordsManagementService
|
||||
{
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlan(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isFilePlanComponent(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlanComponentKind(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
FilePlanComponentKind getFilePlanComponentKind(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlanComponentKindFromType(QName)}
|
||||
*/
|
||||
@Deprecated
|
||||
FilePlanComponentKind getFilePlanComponentKindFromType(QName type);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlanContainer(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordsManagementContainer(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlan(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isFilePlan(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isRecordCategory(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordCategory(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolder(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordFolder(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.2, see {@link TransferService#isTransfer(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isTransfer(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.2, see {@link RecordService#isMetadataStub(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isMetadataStub(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.2, see {@link DispositionService#isDisposableItemCutoff(NodeRef)}
|
||||
*/
|
||||
boolean isCutoff(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getNodeRefPath(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getNodeRefPath(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlan(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef getFilePlan(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlans()}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getFilePlans();
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, QName)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createFilePlan(NodeRef parent, String name, QName type);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createFilePlan(NodeRef parent, String name, QName type, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createFilePlan(NodeRef parent, String name);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, Map)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createFilePlan(NodeRef parent, String name, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getAllContained(NodeRef, boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getAllContained(NodeRef recordCategory, boolean deep);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getAllContained(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getAllContained(NodeRef recordCategory);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordCategories(NodeRef, boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getContainedRecordCategories(NodeRef recordCategory, boolean deep);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordCategories(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getContainedRecordCategories(NodeRef recordCategory);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordCategories(NodeRef, boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getContainedRecordFolders(NodeRef container, boolean deep);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordFolders(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getContainedRecordFolders(NodeRef container);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, QName)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordCategory(NodeRef parent, String name, QName type);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordCategory(NodeRef parent, String name, QName type, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordCategory(NodeRef parent, String name);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, Map)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordCategory(NodeRef parent, String name, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolderDeclared(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordFolderDeclared(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolderClosed(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordFolderClosed(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, QName)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordFolder(NodeRef rmContainer, String name, QName type);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordFolder(NodeRef rmContainer, String name, QName type, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String)}
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordFolder(NodeRef parent, String name);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, Map)
|
||||
*/
|
||||
@Deprecated
|
||||
NodeRef createRecordFolder(NodeRef parent, String name, Map<QName, Serializable> properties);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordService#getRecords(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getRecords(NodeRef recordFolder);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#getRecordFolders(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
List<NodeRef> getRecordFolders(NodeRef record);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, replaced by {@link RecordService#getRecordMetaDataAspects()}
|
||||
*/
|
||||
@Deprecated
|
||||
Set<QName> getRecordMetaDataAspects();
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, replaced by {@link RecordService#isDeclared(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecordDeclared(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.1, replaced by {@link FreezeService#isHold(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isHold(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.1, replaced by {@link FreezeService#isFrozen(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isFrozen(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @since 2.0
|
||||
* @deprecated As of 2.1, replaced by {@link FreezeService#hasFrozenChildren(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean hasFrozenChildren(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, replaced by {@link RecordService#isRecord(NodeRef)}
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isRecord(NodeRef nodeRef);
|
||||
}
|
||||
|
@@ -1,495 +1,495 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.transfer.TransferService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Records management service implementation.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @deprecated as of 2.2
|
||||
*/
|
||||
public class RecordsManagementServiceImpl extends ServiceBaseImpl
|
||||
implements RecordsManagementService,
|
||||
RecordsManagementModel
|
||||
{
|
||||
/** Store that the RM roots are contained within */
|
||||
@SuppressWarnings("unused")
|
||||
@Deprecated
|
||||
private StoreRef defaultStoreRef = StoreRef.STORE_REF_WORKSPACE_SPACESSTORE;
|
||||
|
||||
/** Service registry */
|
||||
private RecordsManagementServiceRegistry serviceRegistry;
|
||||
|
||||
/**
|
||||
* Set the service registry service
|
||||
*
|
||||
* @param serviceRegistry service registry
|
||||
*/
|
||||
public void setRecordsManagementServiceRegistry(RecordsManagementServiceRegistry serviceRegistry)
|
||||
{
|
||||
// Internal ops use the unprotected services from the voter (e.g. nodeService)
|
||||
this.serviceRegistry = serviceRegistry;
|
||||
this.dictionaryService = serviceRegistry.getDictionaryService();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the default RM store reference
|
||||
* @param defaultStoreRef store reference
|
||||
*/
|
||||
@Deprecated
|
||||
public void setDefaultStoreRef(StoreRef defaultStoreRef)
|
||||
{
|
||||
this.defaultStoreRef = defaultStoreRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return File plan service
|
||||
*/
|
||||
private FilePlanService getFilePlanService()
|
||||
{
|
||||
return serviceRegistry.getFilePlanService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Record Folder Service
|
||||
*/
|
||||
private RecordFolderService getRecordFolderService()
|
||||
{
|
||||
return serviceRegistry.getRecordFolderService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Record Service
|
||||
*/
|
||||
private RecordService getRecordService()
|
||||
{
|
||||
return serviceRegistry.getRecordService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Freeze Service
|
||||
*/
|
||||
private FreezeService getFreezeService()
|
||||
{
|
||||
return serviceRegistry.getFreezeService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Disposition Service
|
||||
*/
|
||||
private DispositionService getDispositionService()
|
||||
{
|
||||
return serviceRegistry.getDispositionService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Transfer service
|
||||
*/
|
||||
private TransferService getTransferService()
|
||||
{
|
||||
return serviceRegistry.getTransferService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlanComponent(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isFilePlanComponent(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().isFilePlanComponent(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlanComponentKind(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public FilePlanComponentKind getFilePlanComponentKind(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().getFilePlanComponentKind(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlanComponentKindFromType(QName)}
|
||||
*/
|
||||
@Override
|
||||
public FilePlanComponentKind getFilePlanComponentKindFromType(QName type)
|
||||
{
|
||||
return getFilePlanService().getFilePlanComponentKindFromType(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlanContainer(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordsManagementContainer(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().isFilePlanContainer(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlan(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isFilePlan(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().isFilePlan(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isRecordCategory(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordCategory(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().isRecordCategory(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolder(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordFolder(NodeRef nodeRef)
|
||||
{
|
||||
return getRecordFolderService().isRecordFolder(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link TransferService#isTransfer(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isTransfer(NodeRef nodeRef)
|
||||
{
|
||||
return getTransferService().isTransfer(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordService#isMetadataStub(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isMetadataStub(NodeRef nodeRef)
|
||||
{
|
||||
return getRecordService().isMetadataStub(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link DispositionService#isDisposableItemCutoff(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isCutoff(NodeRef nodeRef)
|
||||
{
|
||||
return getDispositionService().isDisposableItemCutoff(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated as of 2.1, see {@link FilePlanService#getNodeRefPath(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getNodeRefPath(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().getNodeRefPath(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlan(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef getFilePlan(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().getFilePlan(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlans()}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getFilePlans()
|
||||
{
|
||||
return new ArrayList<NodeRef>(getFilePlanService().getFilePlans());
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, QName)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createFilePlan(NodeRef parent, String name, QName type)
|
||||
{
|
||||
return getFilePlanService().createFilePlan(parent, name, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createFilePlan(NodeRef parent, String name, QName type, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getFilePlanService().createFilePlan(parent, name, type, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createFilePlan(NodeRef parent, String name)
|
||||
{
|
||||
return getFilePlanService().createFilePlan(parent, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, Map)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createFilePlan(NodeRef parent, String name, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getFilePlanService().createFilePlan(parent, name, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getAllContained(NodeRef, boolean)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getAllContained(NodeRef container, boolean deep)
|
||||
{
|
||||
return getFilePlanService().getAllContained(container, deep);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getAllContained(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getAllContained(NodeRef container)
|
||||
{
|
||||
return getFilePlanService().getAllContained(container);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordCategories(NodeRef, boolean)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getContainedRecordCategories(NodeRef container, boolean deep)
|
||||
{
|
||||
return getFilePlanService().getContainedRecordCategories(container, deep);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordCategories(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getContainedRecordCategories(NodeRef container)
|
||||
{
|
||||
return getFilePlanService().getContainedRecordCategories(container);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordFolders(NodeRef, boolean)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getContainedRecordFolders(NodeRef container, boolean deep)
|
||||
{
|
||||
return getFilePlanService().getContainedRecordFolders(container, deep);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordFolders(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getContainedRecordFolders(NodeRef container)
|
||||
{
|
||||
return getFilePlanService().getContainedRecordFolders(container);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, QName)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordCategory(NodeRef parent, String name, QName type)
|
||||
{
|
||||
return getFilePlanService().createRecordCategory(parent, name, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordCategory(NodeRef parent, String name, QName type, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getFilePlanService().createRecordCategory(parent, name, type, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordCategory(NodeRef parent, String name)
|
||||
{
|
||||
return getFilePlanService().createRecordCategory(parent, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, Map)}
|
||||
*/
|
||||
public NodeRef createRecordCategory(NodeRef parent, String name, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getFilePlanService().createRecordCategory(parent, name, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolderDeclared(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordFolderDeclared(NodeRef recordFolder)
|
||||
{
|
||||
return getRecordFolderService().isRecordFolderDeclared(recordFolder);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolderClosed(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordFolderClosed(NodeRef nodeRef)
|
||||
{
|
||||
return getRecordFolderService().isRecordFolderClosed(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, QName)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordFolder(NodeRef parent, String name, QName type)
|
||||
{
|
||||
return getRecordFolderService().createRecordFolder(parent, name, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordFolder(NodeRef rmContainer, String name, QName type, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getRecordFolderService().createRecordFolder(rmContainer, name, type, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordFolder(NodeRef rmContrainer, String name)
|
||||
{
|
||||
return getRecordFolderService().createRecordFolder(rmContrainer, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, Map)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordFolder(NodeRef parent, String name, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getRecordFolderService().createRecordFolder(parent, name, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordService#getRecords(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getRecords(NodeRef recordFolder)
|
||||
{
|
||||
return getRecordService().getRecords(recordFolder);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#getRecordFolders(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getRecordFolders(NodeRef record)
|
||||
{
|
||||
return getRecordFolderService().getRecordFolders(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link RecordService#getRecordMetaDataAspects()}
|
||||
*/
|
||||
@Override
|
||||
public Set<QName> getRecordMetaDataAspects()
|
||||
{
|
||||
return getRecordService().getRecordMetaDataAspects();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link RecordService#isDeclared(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordDeclared(NodeRef nodeRef)
|
||||
{
|
||||
return getRecordService().isDeclared(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FreezeService#isHold(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isHold(NodeRef nodeRef)
|
||||
{
|
||||
return getFreezeService().isHold(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FreezeService#isFrozen(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isFrozen(NodeRef nodeRef)
|
||||
{
|
||||
return getFreezeService().isFrozen(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FreezeService#hasFrozenChildren(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean hasFrozenChildren(NodeRef nodeRef)
|
||||
{
|
||||
return getFreezeService().hasFrozenChildren(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link RecordService#isRecord(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecord(NodeRef nodeRef)
|
||||
{
|
||||
return getRecordService().isRecord(nodeRef);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanComponentKind;
|
||||
import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.freeze.FreezeService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.transfer.TransferService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.util.ServiceBaseImpl;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* Records management service implementation.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @deprecated as of 2.2
|
||||
*/
|
||||
public class RecordsManagementServiceImpl extends ServiceBaseImpl
|
||||
implements RecordsManagementService,
|
||||
RecordsManagementModel
|
||||
{
|
||||
/** Store that the RM roots are contained within */
|
||||
@SuppressWarnings("unused")
|
||||
@Deprecated
|
||||
private StoreRef defaultStoreRef = StoreRef.STORE_REF_WORKSPACE_SPACESSTORE;
|
||||
|
||||
/** Service registry */
|
||||
private RecordsManagementServiceRegistry serviceRegistry;
|
||||
|
||||
/**
|
||||
* Set the service registry service
|
||||
*
|
||||
* @param serviceRegistry service registry
|
||||
*/
|
||||
public void setRecordsManagementServiceRegistry(RecordsManagementServiceRegistry serviceRegistry)
|
||||
{
|
||||
// Internal ops use the unprotected services from the voter (e.g. nodeService)
|
||||
this.serviceRegistry = serviceRegistry;
|
||||
this.dictionaryService = serviceRegistry.getDictionaryService();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the default RM store reference
|
||||
* @param defaultStoreRef store reference
|
||||
*/
|
||||
@Deprecated
|
||||
public void setDefaultStoreRef(StoreRef defaultStoreRef)
|
||||
{
|
||||
this.defaultStoreRef = defaultStoreRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return File plan service
|
||||
*/
|
||||
private FilePlanService getFilePlanService()
|
||||
{
|
||||
return serviceRegistry.getFilePlanService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Record Folder Service
|
||||
*/
|
||||
private RecordFolderService getRecordFolderService()
|
||||
{
|
||||
return serviceRegistry.getRecordFolderService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Record Service
|
||||
*/
|
||||
private RecordService getRecordService()
|
||||
{
|
||||
return serviceRegistry.getRecordService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Freeze Service
|
||||
*/
|
||||
private FreezeService getFreezeService()
|
||||
{
|
||||
return serviceRegistry.getFreezeService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Disposition Service
|
||||
*/
|
||||
private DispositionService getDispositionService()
|
||||
{
|
||||
return serviceRegistry.getDispositionService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Transfer service
|
||||
*/
|
||||
private TransferService getTransferService()
|
||||
{
|
||||
return serviceRegistry.getTransferService();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlanComponent(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isFilePlanComponent(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().isFilePlanComponent(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlanComponentKind(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public FilePlanComponentKind getFilePlanComponentKind(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().getFilePlanComponentKind(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlanComponentKindFromType(QName)}
|
||||
*/
|
||||
@Override
|
||||
public FilePlanComponentKind getFilePlanComponentKindFromType(QName type)
|
||||
{
|
||||
return getFilePlanService().getFilePlanComponentKindFromType(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlanContainer(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordsManagementContainer(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().isFilePlanContainer(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isFilePlan(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isFilePlan(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().isFilePlan(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#isRecordCategory(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordCategory(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().isRecordCategory(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolder(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordFolder(NodeRef nodeRef)
|
||||
{
|
||||
return getRecordFolderService().isRecordFolder(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link TransferService#isTransfer(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isTransfer(NodeRef nodeRef)
|
||||
{
|
||||
return getTransferService().isTransfer(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordService#isMetadataStub(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isMetadataStub(NodeRef nodeRef)
|
||||
{
|
||||
return getRecordService().isMetadataStub(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link DispositionService#isDisposableItemCutoff(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isCutoff(NodeRef nodeRef)
|
||||
{
|
||||
return getDispositionService().isDisposableItemCutoff(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated as of 2.1, see {@link FilePlanService#getNodeRefPath(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getNodeRefPath(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().getNodeRefPath(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlan(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef getFilePlan(NodeRef nodeRef)
|
||||
{
|
||||
return getFilePlanService().getFilePlan(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getFilePlans()}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getFilePlans()
|
||||
{
|
||||
return new ArrayList<NodeRef>(getFilePlanService().getFilePlans());
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, QName)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createFilePlan(NodeRef parent, String name, QName type)
|
||||
{
|
||||
return getFilePlanService().createFilePlan(parent, name, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createFilePlan(NodeRef parent, String name, QName type, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getFilePlanService().createFilePlan(parent, name, type, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createFilePlan(NodeRef parent, String name)
|
||||
{
|
||||
return getFilePlanService().createFilePlan(parent, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createFilePlan(NodeRef, String, Map)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createFilePlan(NodeRef parent, String name, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getFilePlanService().createFilePlan(parent, name, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getAllContained(NodeRef, boolean)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getAllContained(NodeRef container, boolean deep)
|
||||
{
|
||||
return getFilePlanService().getAllContained(container, deep);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getAllContained(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getAllContained(NodeRef container)
|
||||
{
|
||||
return getFilePlanService().getAllContained(container);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordCategories(NodeRef, boolean)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getContainedRecordCategories(NodeRef container, boolean deep)
|
||||
{
|
||||
return getFilePlanService().getContainedRecordCategories(container, deep);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordCategories(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getContainedRecordCategories(NodeRef container)
|
||||
{
|
||||
return getFilePlanService().getContainedRecordCategories(container);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordFolders(NodeRef, boolean)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getContainedRecordFolders(NodeRef container, boolean deep)
|
||||
{
|
||||
return getFilePlanService().getContainedRecordFolders(container, deep);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#getContainedRecordFolders(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getContainedRecordFolders(NodeRef container)
|
||||
{
|
||||
return getFilePlanService().getContainedRecordFolders(container);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, QName)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordCategory(NodeRef parent, String name, QName type)
|
||||
{
|
||||
return getFilePlanService().createRecordCategory(parent, name, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordCategory(NodeRef parent, String name, QName type, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getFilePlanService().createRecordCategory(parent, name, type, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordCategory(NodeRef parent, String name)
|
||||
{
|
||||
return getFilePlanService().createRecordCategory(parent, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FilePlanService#createRecordCategory(NodeRef, String, Map)}
|
||||
*/
|
||||
public NodeRef createRecordCategory(NodeRef parent, String name, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getFilePlanService().createRecordCategory(parent, name, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolderDeclared(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordFolderDeclared(NodeRef recordFolder)
|
||||
{
|
||||
return getRecordFolderService().isRecordFolderDeclared(recordFolder);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#isRecordFolderClosed(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordFolderClosed(NodeRef nodeRef)
|
||||
{
|
||||
return getRecordFolderService().isRecordFolderClosed(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, QName)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordFolder(NodeRef parent, String name, QName type)
|
||||
{
|
||||
return getRecordFolderService().createRecordFolder(parent, name, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, QName, Map)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordFolder(NodeRef rmContainer, String name, QName type, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getRecordFolderService().createRecordFolder(rmContainer, name, type, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordFolder(NodeRef rmContrainer, String name)
|
||||
{
|
||||
return getRecordFolderService().createRecordFolder(rmContrainer, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#createRecordFolder(NodeRef, String, Map)}
|
||||
*/
|
||||
@Override
|
||||
public NodeRef createRecordFolder(NodeRef parent, String name, Map<QName, Serializable> properties)
|
||||
{
|
||||
return getRecordFolderService().createRecordFolder(parent, name, properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordService#getRecords(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getRecords(NodeRef recordFolder)
|
||||
{
|
||||
return getRecordService().getRecords(recordFolder);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.2, see {@link RecordFolderService#getRecordFolders(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public List<NodeRef> getRecordFolders(NodeRef record)
|
||||
{
|
||||
return getRecordFolderService().getRecordFolders(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link RecordService#getRecordMetaDataAspects()}
|
||||
*/
|
||||
@Override
|
||||
public Set<QName> getRecordMetaDataAspects()
|
||||
{
|
||||
return getRecordService().getRecordMetaDataAspects();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link RecordService#isDeclared(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecordDeclared(NodeRef nodeRef)
|
||||
{
|
||||
return getRecordService().isDeclared(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FreezeService#isHold(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isHold(NodeRef nodeRef)
|
||||
{
|
||||
return getFreezeService().isHold(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FreezeService#isFrozen(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isFrozen(NodeRef nodeRef)
|
||||
{
|
||||
return getFreezeService().isFrozen(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link FreezeService#hasFrozenChildren(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean hasFrozenChildren(NodeRef nodeRef)
|
||||
{
|
||||
return getFreezeService().hasFrozenChildren(nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of 2.1, see {@link RecordService#isRecord(NodeRef)}
|
||||
*/
|
||||
@Override
|
||||
public boolean isRecord(NodeRef nodeRef)
|
||||
{
|
||||
return getRecordService().isRecord(nodeRef);
|
||||
}
|
||||
}
|
||||
|
@@ -1,71 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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-2014 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);
|
||||
|
||||
}
|
||||
|
@@ -1,39 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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
|
||||
QName TYPE_RECORD_SERIES = QName.createQName(DOD_URI, "recordSeries");
|
||||
|
||||
// V1.0 custom property aspect names
|
||||
String NAME_CUSTOM_RECORD_PROPERTIES = "customRecordProperties";
|
||||
String NAME_CUSTOM_RECORD_FOLDER_PROPERTIES = "customRecordFolderProperties";
|
||||
String NAME_CUSTOM_RECORD_CATEGORY_PROPERTIES = "customRecordCategoryProperties";
|
||||
String NAME_CUSTOM_RECORD_SERIES_PROPERTIES = "customRecordSeriesProperties";
|
||||
}
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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
|
||||
QName TYPE_RECORD_SERIES = QName.createQName(DOD_URI, "recordSeries");
|
||||
|
||||
// V1.0 custom property aspect names
|
||||
String NAME_CUSTOM_RECORD_PROPERTIES = "customRecordProperties";
|
||||
String NAME_CUSTOM_RECORD_FOLDER_PROPERTIES = "customRecordFolderProperties";
|
||||
String NAME_CUSTOM_RECORD_CATEGORY_PROPERTIES = "customRecordCategoryProperties";
|
||||
String NAME_CUSTOM_RECORD_SERIES_PROPERTIES = "customRecordSeriesProperties";
|
||||
}
|
||||
|
@@ -1,148 +1,148 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
* Deprecated extended security service for compatibility.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*/
|
||||
public interface DeprecatedExtendedSecurityService
|
||||
{
|
||||
/**
|
||||
* Gets the set of authorities that are extended readers for the given node.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @return {@link Set}<{@link String}> set of extended readers
|
||||
*
|
||||
* @deprecated as of 2.5, use {@link ExtendedSecurityService#getReaders(NodeRef)}
|
||||
*/
|
||||
Set<String> getExtendedReaders(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Get the set of authorities that are extended writers for the given node.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @return {@link Set}<{@link String}> set of extended writers
|
||||
*
|
||||
* @deprecated as of 2.5, use {@link ExtendedSecurityService#getWriters(NodeRef)}
|
||||
*/
|
||||
Set<String> getExtendedWriters(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Add extended security for the specified authorities to a node.
|
||||
*
|
||||
* As of, 2.5 this method no longer applies the extended security to parents.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to add extended read permissions
|
||||
* @param writers set of authorities to add extended write permissions
|
||||
*
|
||||
* @deprecated as of 2.5, use {@link ExtendedSecurityService#set(NodeRef, Set, Set)}
|
||||
*/
|
||||
@Deprecated
|
||||
void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers);
|
||||
|
||||
/**
|
||||
* Add extended security for the specified authorities to a node.
|
||||
* <p>
|
||||
* If specified, the read and write extended permissions are applied to all parents up to the file plan as
|
||||
* extended read. This ensures parental read, but not parental write.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to add extended read permissions
|
||||
* @param writers set of authorities to add extended write permissions
|
||||
* @param applyToParents true if extended security applied to parents (read only) false otherwise.
|
||||
*
|
||||
* @deprecated as of 2.5, because extended security is no longer applied to parents. Note that calling this method will
|
||||
* only apply the extended security to the node and the applyToParents parameter value will be ignored.
|
||||
*
|
||||
* @see ExtendedSecurityService#set(NodeRef, Set, Set)
|
||||
*/
|
||||
@Deprecated void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents);
|
||||
|
||||
/**
|
||||
* Remove all extended readers and writers from the given node reference.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
*
|
||||
* @deprecated as of 2.5, see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeAllExtendedSecurity(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Remove the extended security for the specified authorities from a node.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to remove as extended readers
|
||||
* @param writers set of authorities to remove as extended writers
|
||||
*
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported.
|
||||
* Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
*
|
||||
* @see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers);
|
||||
|
||||
/**
|
||||
* Remove the extended security for the specified authorities from a node.
|
||||
* <p>
|
||||
* If specified, extended security will also be removed from the parent hierarchy.(read only). Note that
|
||||
* extended security is records as a reference count, so security will only be utterly removed from the parent
|
||||
* hierarchy if all references to the authority are removed.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to remove as extended readers
|
||||
* @param writers set of authorities to remove as extedned writers
|
||||
* @param applyToParents true if removal of extended security is applied to parent hierarchy (read only), false
|
||||
* otherwise
|
||||
*
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported.
|
||||
* Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
*
|
||||
* @see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents);
|
||||
|
||||
/**
|
||||
* Remove all extended readers and writers from the given node reference.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param applyToParents if true then apply removal to parent hierarchy (read only) false otherwise.
|
||||
*
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported.
|
||||
* Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
*
|
||||
* @see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeAllExtendedSecurity(NodeRef nodeRef, boolean applyToParents);
|
||||
}
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
* Deprecated extended security service for compatibility.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*/
|
||||
public interface DeprecatedExtendedSecurityService
|
||||
{
|
||||
/**
|
||||
* Gets the set of authorities that are extended readers for the given node.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @return {@link Set}<{@link String}> set of extended readers
|
||||
*
|
||||
* @deprecated as of 2.5, use {@link ExtendedSecurityService#getReaders(NodeRef)}
|
||||
*/
|
||||
Set<String> getExtendedReaders(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Get the set of authorities that are extended writers for the given node.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @return {@link Set}<{@link String}> set of extended writers
|
||||
*
|
||||
* @deprecated as of 2.5, use {@link ExtendedSecurityService#getWriters(NodeRef)}
|
||||
*/
|
||||
Set<String> getExtendedWriters(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Add extended security for the specified authorities to a node.
|
||||
*
|
||||
* As of, 2.5 this method no longer applies the extended security to parents.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to add extended read permissions
|
||||
* @param writers set of authorities to add extended write permissions
|
||||
*
|
||||
* @deprecated as of 2.5, use {@link ExtendedSecurityService#set(NodeRef, Set, Set)}
|
||||
*/
|
||||
@Deprecated
|
||||
void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers);
|
||||
|
||||
/**
|
||||
* Add extended security for the specified authorities to a node.
|
||||
* <p>
|
||||
* If specified, the read and write extended permissions are applied to all parents up to the file plan as
|
||||
* extended read. This ensures parental read, but not parental write.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to add extended read permissions
|
||||
* @param writers set of authorities to add extended write permissions
|
||||
* @param applyToParents true if extended security applied to parents (read only) false otherwise.
|
||||
*
|
||||
* @deprecated as of 2.5, because extended security is no longer applied to parents. Note that calling this method will
|
||||
* only apply the extended security to the node and the applyToParents parameter value will be ignored.
|
||||
*
|
||||
* @see ExtendedSecurityService#set(NodeRef, Set, Set)
|
||||
*/
|
||||
@Deprecated void addExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents);
|
||||
|
||||
/**
|
||||
* Remove all extended readers and writers from the given node reference.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
*
|
||||
* @deprecated as of 2.5, see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeAllExtendedSecurity(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Remove the extended security for the specified authorities from a node.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to remove as extended readers
|
||||
* @param writers set of authorities to remove as extended writers
|
||||
*
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported.
|
||||
* Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
*
|
||||
* @see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers);
|
||||
|
||||
/**
|
||||
* Remove the extended security for the specified authorities from a node.
|
||||
* <p>
|
||||
* If specified, extended security will also be removed from the parent hierarchy.(read only). Note that
|
||||
* extended security is records as a reference count, so security will only be utterly removed from the parent
|
||||
* hierarchy if all references to the authority are removed.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param readers set of authorities to remove as extended readers
|
||||
* @param writers set of authorities to remove as extedned writers
|
||||
* @param applyToParents true if removal of extended security is applied to parent hierarchy (read only), false
|
||||
* otherwise
|
||||
*
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported.
|
||||
* Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
*
|
||||
* @see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeExtendedSecurity(NodeRef nodeRef, Set<String> readers, Set<String> writers, boolean applyToParents);
|
||||
|
||||
/**
|
||||
* Remove all extended readers and writers from the given node reference.
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param applyToParents if true then apply removal to parent hierarchy (read only) false otherwise.
|
||||
*
|
||||
* @deprecated as of 2.5, because partial removal of readers and writers from node or parents is no longer supported.
|
||||
* Note that calling this method will now remove all extended security from the node and never applied to parents.
|
||||
*
|
||||
* @see {@link ExtendedSecurityService#remove(NodeRef)}
|
||||
*/
|
||||
@Deprecated void removeAllExtendedSecurity(NodeRef nodeRef, boolean applyToParents);
|
||||
}
|
||||
|
@@ -1,98 +1,98 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel;
|
||||
import org.alfresco.repo.security.permissions.PermissionReference;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
* Extended readers dynamic authority implementation.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
*/
|
||||
@Deprecated
|
||||
public class ExtendedReaderDynamicAuthority extends ExtendedSecurityBaseDynamicAuthority
|
||||
{
|
||||
/** Extended reader role */
|
||||
public static final String EXTENDED_READER = "ROLE_EXTENDED_READER";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.security.permissions.DynamicAuthority#getAuthority()
|
||||
*/
|
||||
@Override
|
||||
public String getAuthority()
|
||||
{
|
||||
return EXTENDED_READER;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.security.permissions.DynamicAuthority#requiredFor()
|
||||
*/
|
||||
@Override
|
||||
public Set<PermissionReference> requiredFor()
|
||||
{
|
||||
if (requiredFor == null)
|
||||
{
|
||||
requiredFor = Collections.singleton(getModelDAO().getPermissionReference(null, RMPermissionModel.READ_RECORDS));
|
||||
}
|
||||
|
||||
return requiredFor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityBaseDynamicAuthority#getAuthorites(org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected Set<String> getAuthorites(NodeRef nodeRef)
|
||||
{
|
||||
Set<String> result = null;
|
||||
|
||||
Map<String, Integer> readerMap = (Map<String, Integer>)getNodeService().getProperty(nodeRef, PROP_READERS);
|
||||
if (readerMap != null)
|
||||
{
|
||||
result = readerMap.keySet();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityBaseDynamicAuthority#getTransactionCacheName()
|
||||
*/
|
||||
@Override
|
||||
protected String getTransactionCacheName()
|
||||
{
|
||||
return "rm.extendedreaderdynamicauthority";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel;
|
||||
import org.alfresco.repo.security.permissions.PermissionReference;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
* Extended readers dynamic authority implementation.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
*/
|
||||
@Deprecated
|
||||
public class ExtendedReaderDynamicAuthority extends ExtendedSecurityBaseDynamicAuthority
|
||||
{
|
||||
/** Extended reader role */
|
||||
public static final String EXTENDED_READER = "ROLE_EXTENDED_READER";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.security.permissions.DynamicAuthority#getAuthority()
|
||||
*/
|
||||
@Override
|
||||
public String getAuthority()
|
||||
{
|
||||
return EXTENDED_READER;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.security.permissions.DynamicAuthority#requiredFor()
|
||||
*/
|
||||
@Override
|
||||
public Set<PermissionReference> requiredFor()
|
||||
{
|
||||
if (requiredFor == null)
|
||||
{
|
||||
requiredFor = Collections.singleton(getModelDAO().getPermissionReference(null, RMPermissionModel.READ_RECORDS));
|
||||
}
|
||||
|
||||
return requiredFor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityBaseDynamicAuthority#getAuthorites(org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected Set<String> getAuthorites(NodeRef nodeRef)
|
||||
{
|
||||
Set<String> result = null;
|
||||
|
||||
Map<String, Integer> readerMap = (Map<String, Integer>)getNodeService().getProperty(nodeRef, PROP_READERS);
|
||||
if (readerMap != null)
|
||||
{
|
||||
result = readerMap.keySet();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityBaseDynamicAuthority#getTransactionCacheName()
|
||||
*/
|
||||
@Override
|
||||
protected String getTransactionCacheName()
|
||||
{
|
||||
return "rm.extendedreaderdynamicauthority";
|
||||
}
|
||||
}
|
||||
|
@@ -1,192 +1,192 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.repo.security.permissions.DynamicAuthority;
|
||||
import org.alfresco.repo.security.permissions.PermissionReference;
|
||||
import org.alfresco.repo.security.permissions.impl.ModelDAO;
|
||||
import org.alfresco.repo.transaction.TransactionalResourceHelper;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
/**
|
||||
* Extended readers dynamic authority implementation.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class ExtendedSecurityBaseDynamicAuthority implements DynamicAuthority,
|
||||
RecordsManagementModel,
|
||||
ApplicationContextAware
|
||||
{
|
||||
/** Authority service */
|
||||
private AuthorityService authorityService;
|
||||
|
||||
/** Extended security service */
|
||||
private ExtendedSecurityService extendedSecurityService;
|
||||
|
||||
/** Node service */
|
||||
private NodeService nodeService;
|
||||
|
||||
/** Application context */
|
||||
protected ApplicationContext applicationContext;
|
||||
|
||||
/** model DAO */
|
||||
protected ModelDAO modelDAO;
|
||||
|
||||
/** permission reference */
|
||||
protected Set<PermissionReference> requiredFor;
|
||||
|
||||
// NOTE: we get the services directly from the application context in this way to avoid
|
||||
// cyclic relationships and issues when loading the application context
|
||||
|
||||
/**
|
||||
* @return authority service
|
||||
*/
|
||||
protected AuthorityService getAuthorityService()
|
||||
{
|
||||
if (authorityService == null)
|
||||
{
|
||||
authorityService = (AuthorityService)applicationContext.getBean("authorityService");
|
||||
}
|
||||
return authorityService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return extended security service
|
||||
*/
|
||||
protected ExtendedSecurityService getExtendedSecurityService()
|
||||
{
|
||||
if (extendedSecurityService == null)
|
||||
{
|
||||
extendedSecurityService = (ExtendedSecurityService)applicationContext.getBean("extendedSecurityService");
|
||||
}
|
||||
return extendedSecurityService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return node service
|
||||
*/
|
||||
protected NodeService getNodeService()
|
||||
{
|
||||
if (nodeService == null)
|
||||
{
|
||||
nodeService = (NodeService)applicationContext.getBean("dbNodeService");
|
||||
}
|
||||
return nodeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return model DAO
|
||||
*/
|
||||
protected ModelDAO getModelDAO()
|
||||
{
|
||||
if (modelDAO == null)
|
||||
{
|
||||
modelDAO = (ModelDAO)applicationContext.getBean("permissionsModelDAO");
|
||||
}
|
||||
return modelDAO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String transaction cache name
|
||||
*/
|
||||
protected abstract String getTransactionCacheName();
|
||||
|
||||
/**
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
|
||||
*/
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext)
|
||||
{
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of the authorities from the extended security aspect that this dynamic
|
||||
* authority is checking against.
|
||||
*
|
||||
* @param nodeRef
|
||||
* @return
|
||||
*/
|
||||
protected abstract Set<String> getAuthorites(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.security.permissions.DynamicAuthority#hasAuthority(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean hasAuthority(NodeRef nodeRef, String userName)
|
||||
{
|
||||
boolean result = false;
|
||||
|
||||
Map<Pair<NodeRef, String>, Boolean> transactionCache = TransactionalResourceHelper.getMap(getTransactionCacheName());
|
||||
Pair<NodeRef, String> key = new Pair<NodeRef, String>(nodeRef, userName);
|
||||
|
||||
if (transactionCache.containsKey(key))
|
||||
{
|
||||
result = transactionCache.get(key);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (getNodeService().hasAspect(nodeRef, ASPECT_EXTENDED_SECURITY))
|
||||
{
|
||||
Set<String> authorities = getAuthorites(nodeRef);
|
||||
if (authorities != null)
|
||||
{
|
||||
// check for everyone or the user
|
||||
if (authorities.contains("GROUP_EVEYONE") ||
|
||||
authorities.contains(userName))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// determine whether any of the users groups are in the extended security
|
||||
Set<String> contained = getAuthorityService().getAuthoritiesForUser(userName);
|
||||
authorities.retainAll(contained);
|
||||
result = (authorities.size() != 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// cache result
|
||||
transactionCache.put(key, result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.repo.security.permissions.DynamicAuthority;
|
||||
import org.alfresco.repo.security.permissions.PermissionReference;
|
||||
import org.alfresco.repo.security.permissions.impl.ModelDAO;
|
||||
import org.alfresco.repo.transaction.TransactionalResourceHelper;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
|
||||
/**
|
||||
* Extended readers dynamic authority implementation.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class ExtendedSecurityBaseDynamicAuthority implements DynamicAuthority,
|
||||
RecordsManagementModel,
|
||||
ApplicationContextAware
|
||||
{
|
||||
/** Authority service */
|
||||
private AuthorityService authorityService;
|
||||
|
||||
/** Extended security service */
|
||||
private ExtendedSecurityService extendedSecurityService;
|
||||
|
||||
/** Node service */
|
||||
private NodeService nodeService;
|
||||
|
||||
/** Application context */
|
||||
protected ApplicationContext applicationContext;
|
||||
|
||||
/** model DAO */
|
||||
protected ModelDAO modelDAO;
|
||||
|
||||
/** permission reference */
|
||||
protected Set<PermissionReference> requiredFor;
|
||||
|
||||
// NOTE: we get the services directly from the application context in this way to avoid
|
||||
// cyclic relationships and issues when loading the application context
|
||||
|
||||
/**
|
||||
* @return authority service
|
||||
*/
|
||||
protected AuthorityService getAuthorityService()
|
||||
{
|
||||
if (authorityService == null)
|
||||
{
|
||||
authorityService = (AuthorityService)applicationContext.getBean("authorityService");
|
||||
}
|
||||
return authorityService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return extended security service
|
||||
*/
|
||||
protected ExtendedSecurityService getExtendedSecurityService()
|
||||
{
|
||||
if (extendedSecurityService == null)
|
||||
{
|
||||
extendedSecurityService = (ExtendedSecurityService)applicationContext.getBean("extendedSecurityService");
|
||||
}
|
||||
return extendedSecurityService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return node service
|
||||
*/
|
||||
protected NodeService getNodeService()
|
||||
{
|
||||
if (nodeService == null)
|
||||
{
|
||||
nodeService = (NodeService)applicationContext.getBean("dbNodeService");
|
||||
}
|
||||
return nodeService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return model DAO
|
||||
*/
|
||||
protected ModelDAO getModelDAO()
|
||||
{
|
||||
if (modelDAO == null)
|
||||
{
|
||||
modelDAO = (ModelDAO)applicationContext.getBean("permissionsModelDAO");
|
||||
}
|
||||
return modelDAO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String transaction cache name
|
||||
*/
|
||||
protected abstract String getTransactionCacheName();
|
||||
|
||||
/**
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
|
||||
*/
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext)
|
||||
{
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of the authorities from the extended security aspect that this dynamic
|
||||
* authority is checking against.
|
||||
*
|
||||
* @param nodeRef
|
||||
* @return
|
||||
*/
|
||||
protected abstract Set<String> getAuthorites(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.security.permissions.DynamicAuthority#hasAuthority(org.alfresco.service.cmr.repository.NodeRef, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean hasAuthority(NodeRef nodeRef, String userName)
|
||||
{
|
||||
boolean result = false;
|
||||
|
||||
Map<Pair<NodeRef, String>, Boolean> transactionCache = TransactionalResourceHelper.getMap(getTransactionCacheName());
|
||||
Pair<NodeRef, String> key = new Pair<NodeRef, String>(nodeRef, userName);
|
||||
|
||||
if (transactionCache.containsKey(key))
|
||||
{
|
||||
result = transactionCache.get(key);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (getNodeService().hasAspect(nodeRef, ASPECT_EXTENDED_SECURITY))
|
||||
{
|
||||
Set<String> authorities = getAuthorites(nodeRef);
|
||||
if (authorities != null)
|
||||
{
|
||||
// check for everyone or the user
|
||||
if (authorities.contains("GROUP_EVEYONE") ||
|
||||
authorities.contains(userName))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// determine whether any of the users groups are in the extended security
|
||||
Set<String> contained = getAuthorityService().getAuthoritiesForUser(userName);
|
||||
authorities.retainAll(contained);
|
||||
result = (authorities.size() != 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// cache result
|
||||
transactionCache.put(key, result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@@ -1,103 +1,103 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel;
|
||||
import org.alfresco.repo.security.permissions.PermissionReference;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
* Extended writers dynamic authority implementation.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
*/
|
||||
@Deprecated
|
||||
public class ExtendedWriterDynamicAuthority extends ExtendedSecurityBaseDynamicAuthority
|
||||
{
|
||||
/** Extended writer role */
|
||||
public static final String EXTENDED_WRITER = "ROLE_EXTENDED_WRITER";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.security.permissions.DynamicAuthority#getAuthority()
|
||||
*/
|
||||
@Override
|
||||
public String getAuthority()
|
||||
{
|
||||
return EXTENDED_WRITER;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.security.permissions.DynamicAuthority#requiredFor()
|
||||
*/
|
||||
@Override
|
||||
public Set<PermissionReference> requiredFor()
|
||||
{
|
||||
if (requiredFor == null)
|
||||
{
|
||||
requiredFor = new HashSet<PermissionReference>(3);
|
||||
Collections.addAll(requiredFor,
|
||||
getModelDAO().getPermissionReference(null, RMPermissionModel.READ_RECORDS),
|
||||
getModelDAO().getPermissionReference(null, RMPermissionModel.FILING),
|
||||
getModelDAO().getPermissionReference(null, RMPermissionModel.FILE_RECORDS));
|
||||
}
|
||||
|
||||
return requiredFor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityBaseDynamicAuthority#getAuthorites(org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected Set<String> getAuthorites(NodeRef nodeRef)
|
||||
{
|
||||
Set<String> result = null;
|
||||
|
||||
Map<String, Integer> map = (Map<String, Integer>)getNodeService().getProperty(nodeRef, PROP_WRITERS);
|
||||
if (map != null)
|
||||
{
|
||||
result = map.keySet();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityBaseDynamicAuthority#getTransactionCacheName()
|
||||
*/
|
||||
@Override
|
||||
protected String getTransactionCacheName()
|
||||
{
|
||||
return "rm.extendedwriterdynamicauthority";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.capability.RMPermissionModel;
|
||||
import org.alfresco.repo.security.permissions.PermissionReference;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
* Extended writers dynamic authority implementation.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
*/
|
||||
@Deprecated
|
||||
public class ExtendedWriterDynamicAuthority extends ExtendedSecurityBaseDynamicAuthority
|
||||
{
|
||||
/** Extended writer role */
|
||||
public static final String EXTENDED_WRITER = "ROLE_EXTENDED_WRITER";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.security.permissions.DynamicAuthority#getAuthority()
|
||||
*/
|
||||
@Override
|
||||
public String getAuthority()
|
||||
{
|
||||
return EXTENDED_WRITER;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.security.permissions.DynamicAuthority#requiredFor()
|
||||
*/
|
||||
@Override
|
||||
public Set<PermissionReference> requiredFor()
|
||||
{
|
||||
if (requiredFor == null)
|
||||
{
|
||||
requiredFor = new HashSet<PermissionReference>(3);
|
||||
Collections.addAll(requiredFor,
|
||||
getModelDAO().getPermissionReference(null, RMPermissionModel.READ_RECORDS),
|
||||
getModelDAO().getPermissionReference(null, RMPermissionModel.FILING),
|
||||
getModelDAO().getPermissionReference(null, RMPermissionModel.FILE_RECORDS));
|
||||
}
|
||||
|
||||
return requiredFor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityBaseDynamicAuthority#getAuthorites(org.alfresco.service.cmr.repository.NodeRef)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
protected Set<String> getAuthorites(NodeRef nodeRef)
|
||||
{
|
||||
Set<String> result = null;
|
||||
|
||||
Map<String, Integer> map = (Map<String, Integer>)getNodeService().getProperty(nodeRef, PROP_WRITERS);
|
||||
if (map != null)
|
||||
{
|
||||
result = map.keySet();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.ExtendedSecurityBaseDynamicAuthority#getTransactionCacheName()
|
||||
*/
|
||||
@Override
|
||||
protected String getTransactionCacheName()
|
||||
{
|
||||
return "rm.extendedwriterdynamicauthority";
|
||||
}
|
||||
}
|
||||
|
@@ -1,59 +1,59 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
|
||||
/**
|
||||
* File plan authentication service.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
* @deprecated as of 2.2, use {@link AuthenticationUtil}.
|
||||
*/
|
||||
public interface FilePlanAuthenticationService
|
||||
{
|
||||
/**
|
||||
* @return rm admin user name
|
||||
*
|
||||
* @deprecated as of 2.2, use {@link AuthenticationUtil#getAdminUserName()}
|
||||
*/
|
||||
String getRmAdminUserName();
|
||||
|
||||
/**
|
||||
* Run provided work as the global rm admin user.
|
||||
*
|
||||
* @param <R> return type
|
||||
* @param runAsWork work to execute as the rm admin user
|
||||
* @return R result of work execution
|
||||
*
|
||||
* @deprecated as of 2.2, use {@link AuthenticationUtil#runAs(RunAsWork, AuthenticationUtil#getAdminUserName())}
|
||||
*/
|
||||
<R> R runAsRmAdmin(RunAsWork<R> runAsWork);
|
||||
}
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
|
||||
/**
|
||||
* File plan authentication service.
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
* @deprecated as of 2.2, use {@link AuthenticationUtil}.
|
||||
*/
|
||||
public interface FilePlanAuthenticationService
|
||||
{
|
||||
/**
|
||||
* @return rm admin user name
|
||||
*
|
||||
* @deprecated as of 2.2, use {@link AuthenticationUtil#getAdminUserName()}
|
||||
*/
|
||||
String getRmAdminUserName();
|
||||
|
||||
/**
|
||||
* Run provided work as the global rm admin user.
|
||||
*
|
||||
* @param <R> return type
|
||||
* @param runAsWork work to execute as the rm admin user
|
||||
* @return R result of work execution
|
||||
*
|
||||
* @deprecated as of 2.2, use {@link AuthenticationUtil#runAs(RunAsWork, AuthenticationUtil#getAdminUserName())}
|
||||
*/
|
||||
<R> R runAsRmAdmin(RunAsWork<R> runAsWork);
|
||||
}
|
||||
|
@@ -1,63 +1,63 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
|
||||
/**
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
*/
|
||||
@Deprecated
|
||||
public class FilePlanAuthenticationServiceImpl implements FilePlanAuthenticationService
|
||||
{
|
||||
/** Default rm admin user values */
|
||||
@Deprecated
|
||||
public static final String DEFAULT_RM_ADMIN_USER = "rmadmin";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.FilePlanAuthenticationService#getRMAdminUserName()
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public String getRmAdminUserName()
|
||||
{
|
||||
return AuthenticationUtil.getAdminUserName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.FilePlanAuthenticationService#runAsRMAdmin(org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork)
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public <R> R runAsRmAdmin(RunAsWork<R> runAsWork)
|
||||
{
|
||||
return AuthenticationUtil.runAs(runAsWork, AuthenticationUtil.getAdminUserName());
|
||||
}
|
||||
}
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Records Management Module
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
package org.alfresco.module.org_alfresco_module_rm.security;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
|
||||
/**
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
*/
|
||||
@Deprecated
|
||||
public class FilePlanAuthenticationServiceImpl implements FilePlanAuthenticationService
|
||||
{
|
||||
/** Default rm admin user values */
|
||||
@Deprecated
|
||||
public static final String DEFAULT_RM_ADMIN_USER = "rmadmin";
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.FilePlanAuthenticationService#getRMAdminUserName()
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public String getRmAdminUserName()
|
||||
{
|
||||
return AuthenticationUtil.getAdminUserName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.security.FilePlanAuthenticationService#runAsRMAdmin(org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork)
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public <R> R runAsRmAdmin(RunAsWork<R> runAsWork)
|
||||
{
|
||||
return AuthenticationUtil.runAs(runAsWork, AuthenticationUtil.getAdminUserName());
|
||||
}
|
||||
}
|
||||
|
@@ -1,206 +1,206 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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-2014 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();
|
||||
}
|
||||
|
@@ -1,221 +1,221 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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 Role.toRole(filePlanRoleService.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-2014 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 Role.toRole(filePlanRoleService.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);
|
||||
}
|
||||
}
|
||||
|
@@ -1,64 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2014 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-2014 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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user