Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#338 Store ModuleChanges outcome for Server Item and Module Items
- Loading branch information
Showing
19 changed files
with
392 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
dsl/src/main/kernel-module/resources/boot/OD/ModuleChanges_0.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'> | ||
<xs:element name='ModuleChanges'> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name='ResourceChangeDetails' minOccurs='0' maxOccurs='unbounded'> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name='ResourceName' type='xs:string' minOccurs='1' maxOccurs='1' /> | ||
<xs:element name='ResourceVersion' type='xs:string' minOccurs='1' maxOccurs='1' /> | ||
<xs:element name='ResourceChange' minOccurs='0' maxOccurs='unbounded'> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name='SchemaName' type='xs:string' minOccurs='1' maxOccurs='1' /> | ||
<xs:element name='ChangeType' minOccurs='1' maxOccurs='1'> | ||
<xs:simpleType> | ||
<xs:restriction base='xs:string'> | ||
<xs:enumeration value='IDENTICAL' /> | ||
<xs:enumeration value='NEW' /> | ||
<xs:enumeration value='UPDATED' /> | ||
<xs:enumeration value='OVERWRITTEN' /> | ||
<xs:enumeration value='SKIPPED' /> | ||
<xs:enumeration value='REMOVED' /> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...src/main/java/org/cristalise/kernel/lifecycle/instance/predefined/UpdateImportReport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/** | ||
* This file is part of the CRISTAL-iSE kernel. | ||
* Copyright (c) 2001-2015 The CRISTAL Consortium. All rights reserved. | ||
* | ||
* This library 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. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; with out 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 this library; if not, write to the Free Software Foundation, | ||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
* | ||
* http://www.fsf.org/licensing/licenses/lgpl.html | ||
*/ | ||
package org.cristalise.kernel.lifecycle.instance.predefined; | ||
|
||
import static org.cristalise.kernel.graph.model.BuiltInVertexProperties.SCHEMA_NAME; | ||
|
||
import org.cristalise.kernel.common.AccessRightsException; | ||
import org.cristalise.kernel.common.CannotManageException; | ||
import org.cristalise.kernel.common.InvalidCollectionModification; | ||
import org.cristalise.kernel.common.InvalidDataException; | ||
import org.cristalise.kernel.common.ObjectAlreadyExistsException; | ||
import org.cristalise.kernel.common.ObjectCannotBeUpdated; | ||
import org.cristalise.kernel.common.ObjectNotFoundException; | ||
import org.cristalise.kernel.common.PersistencyException; | ||
import org.cristalise.kernel.lookup.AgentPath; | ||
import org.cristalise.kernel.lookup.ItemPath; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
|
||
/** | ||
* {@value #description} | ||
*/ | ||
@Slf4j | ||
public class UpdateImportReport extends PredefinedStep { | ||
|
||
public static final String description = "Store the ModuleChanges report in Server Item and Modules. Can only be used during bootstrap."; | ||
|
||
public UpdateImportReport() { | ||
super(); | ||
setBuiltInProperty(SCHEMA_NAME, "ModuleChanges"); | ||
} | ||
|
||
protected String runActivityLogic(AgentPath agent, ItemPath itemPath, int transitionID, String requestData, Object locker) | ||
throws InvalidDataException, | ||
InvalidCollectionModification, | ||
ObjectAlreadyExistsException, | ||
ObjectCannotBeUpdated, | ||
ObjectNotFoundException, | ||
PersistencyException, | ||
CannotManageException, | ||
AccessRightsException | ||
{ | ||
log.debug("Called by {} on {}", agent.getAgentName(), itemPath); | ||
// not much to do here | ||
return requestData; | ||
} | ||
} |
Oops, something went wrong.