EDMI: Client Server Changes to prepare for initial Release
This commit is contained in:
parent
706d6b0cef
commit
61a15d472b
@ -96,20 +96,23 @@ Public Class frmtest
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Async Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
|
Private Async Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
|
||||||
Dim oResult As Long = Await My.Application.Service.Client.NewFileAsync(
|
Dim oObjectId As Long = Await My.Application.Service.Client.NewFileAsync(
|
||||||
txtFile2Import.Text,
|
txtFile2Import.Text,
|
||||||
"WORK",
|
"WORK",
|
||||||
"DOC",
|
"DOC",
|
||||||
"DEFAULT",
|
"DEFAULT",
|
||||||
New NewFileOptions With {
|
New NewFileOptions With {
|
||||||
.KeepExtension = CheckBoxKeepExtension.Checked,
|
|
||||||
.Username = Environment.UserName,
|
.Username = Environment.UserName,
|
||||||
.DateImported = DateTimePicker1.Value
|
.DateImported = DateTimePicker1.Value
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
txtIDB_OBJ_ID.Text = oResult
|
If oObjectId <> INVALID_OBEJCT_ID Then
|
||||||
MsgBox("File Imported!")
|
MsgBox("File Imported!", MsgBoxStyle.Information, Text)
|
||||||
|
Else
|
||||||
|
MsgBox("File was not imported. Check the server logs!")
|
||||||
|
End If
|
||||||
|
txtIDB_OBJ_ID.Text = oObjectId
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmtest_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmtest_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
|||||||
@ -627,10 +627,6 @@ Public Class Client
|
|||||||
''' Import options for NewFileAsync.
|
''' Import options for NewFileAsync.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Class NewFileOptions
|
Public Class NewFileOptions
|
||||||
''' <summary>
|
|
||||||
''' Option to keep the original extension when importing. Defaults to false.
|
|
||||||
''' </summary>
|
|
||||||
Public Property KeepExtension As Boolean = False
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Windows username of the user responsible for the import. Defaults to the currently logged in user.
|
''' Windows username of the user responsible for the import. Defaults to the currently logged in user.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@ -705,7 +701,7 @@ Public Class Client
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Class ObjectAttribute
|
Public Class ObjectAttribute
|
||||||
Public Property Id As Long
|
Public Property Id As Long
|
||||||
Public Property Title As String
|
Public Property Title As String
|
||||||
Public Property Type As String
|
Public Property Type As String
|
||||||
|
|||||||
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
This file is automatically generated by Visual Studio .Net. It is
|
||||||
|
used to store generic object data source configuration information.
|
||||||
|
Renaming the file extension or editing the content of this file may
|
||||||
|
cause the file to be unrecognizable by the program.
|
||||||
|
-->
|
||||||
|
<GenericObjectDataSource DisplayName="SetAttributeValueResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
|
||||||
|
<TypeInfo>DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse, Connected Services.EDMIServiceReference.Reference.vb.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
|
||||||
|
</GenericObjectDataSource>
|
||||||
@ -11,6 +11,7 @@
|
|||||||
<xs:element minOccurs="0" name="FileImportedAt" type="xs:dateTime" />
|
<xs:element minOccurs="0" name="FileImportedAt" type="xs:dateTime" />
|
||||||
<xs:element minOccurs="0" name="FileName" nillable="true" type="xs:string" />
|
<xs:element minOccurs="0" name="FileName" nillable="true" type="xs:string" />
|
||||||
<xs:element minOccurs="0" name="KindType" nillable="true" type="xs:string" />
|
<xs:element minOccurs="0" name="KindType" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="Language" nillable="true" type="xs:string" />
|
||||||
<xs:element minOccurs="0" name="StoreName" nillable="true" type="xs:string" />
|
<xs:element minOccurs="0" name="StoreName" nillable="true" type="xs:string" />
|
||||||
<xs:element minOccurs="0" name="Who" nillable="true" type="xs:string" />
|
<xs:element minOccurs="0" name="Who" nillable="true" type="xs:string" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" />
|
||||||
|
<xs:complexType name="SetAttributeValueRequest">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element minOccurs="0" name="AttributeName" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="AttributeValue" nillable="true" type="xs:string" />
|
||||||
|
<xs:element minOccurs="0" name="ObjectId" type="xs:long" />
|
||||||
|
<xs:element minOccurs="0" name="Who" type="xs:long" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:element name="SetAttributeValueRequest" nillable="true" type="tns:SetAttributeValueRequest" />
|
||||||
|
<xs:complexType name="SetAttributeValueResponse">
|
||||||
|
<xs:complexContent mixed="false">
|
||||||
|
<xs:extension xmlns:q1="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" base="q1:BaseResponse">
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element minOccurs="0" name="ObjectId" type="xs:long" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:complexContent>
|
||||||
|
</xs:complexType>
|
||||||
|
<xs:element name="SetAttributeValueResponse" nillable="true" type="tns:SetAttributeValueResponse" />
|
||||||
|
</xs:schema>
|
||||||
@ -25,6 +25,7 @@
|
|||||||
<xs:element name="TableResult" nillable="true" type="tns:TableResult" />
|
<xs:element name="TableResult" nillable="true" type="tns:TableResult" />
|
||||||
<xs:complexType name="BaseResponse">
|
<xs:complexType name="BaseResponse">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
|
<xs:element minOccurs="0" name="ErrorDetails" nillable="true" type="xs:string" />
|
||||||
<xs:element minOccurs="0" name="ErrorMessage" nillable="true" type="xs:string" />
|
<xs:element minOccurs="0" name="ErrorMessage" nillable="true" type="xs:string" />
|
||||||
<xs:element minOccurs="0" name="OK" type="xs:boolean" />
|
<xs:element minOccurs="0" name="OK" type="xs:boolean" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/System" />
|
<xsd:import namespace="http://schemas.datacontract.org/2004/07/System" />
|
||||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/System.Data" />
|
<xsd:import namespace="http://schemas.datacontract.org/2004/07/System.Data" />
|
||||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.NewFile" />
|
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.NewFile" />
|
||||||
|
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" />
|
||||||
<xsd:import namespace="http://schemas.microsoft.com/Message" />
|
<xsd:import namespace="http://schemas.microsoft.com/Message" />
|
||||||
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" />
|
<xsd:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" />
|
||||||
</xsd:schema>
|
</xsd:schema>
|
||||||
@ -118,6 +119,12 @@
|
|||||||
<wsdl:message name="IEDMIService_NewFile_OutputMessage">
|
<wsdl:message name="IEDMIService_NewFile_OutputMessage">
|
||||||
<wsdl:part name="parameters" element="tns:NewFileResponse" />
|
<wsdl:part name="parameters" element="tns:NewFileResponse" />
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
|
<wsdl:message name="IEDMIService_SetAttributeValue_InputMessage">
|
||||||
|
<wsdl:part name="parameters" element="tns:SetAttributeValue" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="IEDMIService_SetAttributeValue_OutputMessage">
|
||||||
|
<wsdl:part name="parameters" element="tns:SetAttributeValueResponse" />
|
||||||
|
</wsdl:message>
|
||||||
<wsdl:message name="DocumentStreamRequest">
|
<wsdl:message name="DocumentStreamRequest">
|
||||||
<wsdl:part name="parameters" element="tns:DocumentStreamRequest" />
|
<wsdl:part name="parameters" element="tns:DocumentStreamRequest" />
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
@ -218,6 +225,10 @@
|
|||||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/NewFile" message="tns:IEDMIService_NewFile_InputMessage" />
|
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/NewFile" message="tns:IEDMIService_NewFile_InputMessage" />
|
||||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/NewFileResponse" message="tns:IEDMIService_NewFile_OutputMessage" />
|
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/NewFileResponse" message="tns:IEDMIService_NewFile_OutputMessage" />
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="SetAttributeValue">
|
||||||
|
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValue" message="tns:IEDMIService_SetAttributeValue_InputMessage" />
|
||||||
|
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValueResponse" message="tns:IEDMIService_SetAttributeValue_OutputMessage" />
|
||||||
|
</wsdl:operation>
|
||||||
<wsdl:operation name="GetFileByObjectId">
|
<wsdl:operation name="GetFileByObjectId">
|
||||||
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId" name="DocumentStreamRequest" message="tns:DocumentStreamRequest" />
|
<wsdl:input wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId" name="DocumentStreamRequest" message="tns:DocumentStreamRequest" />
|
||||||
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse" name="DocumentStreamResponse" message="tns:DocumentStreamResponse" />
|
<wsdl:output wsaw:Action="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse" name="DocumentStreamResponse" message="tns:DocumentStreamResponse" />
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
<xs:schema xmlns:tns="http://DigitalData.Services.EDMIService" elementFormDefault="qualified" targetNamespace="http://DigitalData.Services.EDMIService" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
<xs:schema xmlns:tns="http://DigitalData.Services.EDMIService" elementFormDefault="qualified" targetNamespace="http://DigitalData.Services.EDMIService" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" />
|
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages" />
|
||||||
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.NewFile" />
|
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.NewFile" />
|
||||||
|
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" />
|
||||||
<xs:import namespace="http://schemas.microsoft.com/Message" />
|
<xs:import namespace="http://schemas.microsoft.com/Message" />
|
||||||
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" />
|
<xs:import namespace="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" />
|
||||||
<xs:element name="Heartbeat">
|
<xs:element name="Heartbeat">
|
||||||
@ -172,6 +173,20 @@
|
|||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
|
<xs:element name="SetAttributeValue">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element xmlns:q13="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" minOccurs="0" name="Data" nillable="true" type="q13:SetAttributeValueRequest" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
<xs:element name="SetAttributeValueResponse">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStorage.SetAttributeValue" minOccurs="0" name="SetAttributeValueResult" nillable="true" type="q14:SetAttributeValueResponse" />
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
<xs:element name="DocumentStreamRequest">
|
<xs:element name="DocumentStreamRequest">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
@ -182,7 +197,7 @@
|
|||||||
<xs:element name="DocumentStreamResponse">
|
<xs:element name="DocumentStreamResponse">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element xmlns:q13="http://schemas.microsoft.com/Message" name="FileContents" type="q13:StreamBody" />
|
<xs:element xmlns:q15="http://schemas.microsoft.com/Message" name="FileContents" type="q15:StreamBody" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
</xs:element>
|
</xs:element>
|
||||||
@ -198,7 +213,7 @@
|
|||||||
<xs:element name="DocumentInfoResponse">
|
<xs:element name="DocumentInfoResponse">
|
||||||
<xs:complexType>
|
<xs:complexType>
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element xmlns:q14="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" minOccurs="0" name="FileRight" type="q14:Rights.AccessRight" />
|
<xs:element xmlns:q16="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API" minOccurs="0" name="FileRight" type="q16:Rights.AccessRight" />
|
||||||
<xs:element minOccurs="0" name="FullPath" nillable="true" type="xs:string" />
|
<xs:element minOccurs="0" name="FullPath" nillable="true" type="xs:string" />
|
||||||
</xs:sequence>
|
</xs:sequence>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
<MetadataFile FileName="System.Data.xsd" MetadataType="Schema" ID="6c7bdb47-eea4-4d03-bc52-9747c865bbf0" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
<MetadataFile FileName="System.Data.xsd" MetadataType="Schema" ID="6c7bdb47-eea4-4d03-bc52-9747c865bbf0" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||||
<MetadataFile FileName="DigitalData.Services.EDMIService.Exceptions.xsd" MetadataType="Schema" ID="57cf2e83-7c36-485a-90c3-0bc4a1748882" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
<MetadataFile FileName="DigitalData.Services.EDMIService.Exceptions.xsd" MetadataType="Schema" ID="57cf2e83-7c36-485a-90c3-0bc4a1748882" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||||
<MetadataFile FileName="DigitalData.Services.EDMIService.FileStorage.NewFile.xsd" MetadataType="Schema" ID="bbb83dae-4701-48e2-9c2f-747660d3bd68" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
<MetadataFile FileName="DigitalData.Services.EDMIService.FileStorage.NewFile.xsd" MetadataType="Schema" ID="bbb83dae-4701-48e2-9c2f-747660d3bd68" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||||
|
<MetadataFile FileName="DigitalData.Services.EDMIService.FileStorage.SetAttributeValue.xsd" MetadataType="Schema" ID="ca9178c8-9102-4e7a-81e9-920543646114" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||||
<MetadataFile FileName="Message.xsd" MetadataType="Schema" ID="2589e82f-d68f-4843-b153-a80edf895f82" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
<MetadataFile FileName="Message.xsd" MetadataType="Schema" ID="2589e82f-d68f-4843-b153-a80edf895f82" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||||
<MetadataFile FileName="DigitalData.Modules.EDMI.API.xsd" MetadataType="Schema" ID="4eca5a54-795a-4e5b-a3b1-10c24930efec" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
<MetadataFile FileName="DigitalData.Modules.EDMI.API.xsd" MetadataType="Schema" ID="4eca5a54-795a-4e5b-a3b1-10c24930efec" SourceId="1" SourceUrl="net.tcp://172.24.12.39:9000/DigitalData/Services/Main/mex" />
|
||||||
</Metadata>
|
</Metadata>
|
||||||
|
|||||||
@ -24,6 +24,7 @@ Namespace EDMIServiceReference
|
|||||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ScalarResult)), _
|
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ScalarResult)), _
|
||||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NonQueryResult)), _
|
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NonQueryResult)), _
|
||||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileResponse)), _
|
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileResponse)), _
|
||||||
|
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueResponse)), _
|
||||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.TableResult))> _
|
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.TableResult))> _
|
||||||
Partial Public Class BaseResponse
|
Partial Public Class BaseResponse
|
||||||
Inherits Object
|
Inherits Object
|
||||||
@ -32,6 +33,9 @@ Namespace EDMIServiceReference
|
|||||||
<System.NonSerializedAttribute()> _
|
<System.NonSerializedAttribute()> _
|
||||||
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
|
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||||
|
Private ErrorDetailsField As String
|
||||||
|
|
||||||
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||||
Private ErrorMessageField As String
|
Private ErrorMessageField As String
|
||||||
|
|
||||||
@ -48,6 +52,19 @@ Namespace EDMIServiceReference
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||||
|
Public Property ErrorDetails() As String
|
||||||
|
Get
|
||||||
|
Return Me.ErrorDetailsField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
If (Object.ReferenceEquals(Me.ErrorDetailsField, value) <> true) Then
|
||||||
|
Me.ErrorDetailsField = value
|
||||||
|
Me.RaisePropertyChanged("ErrorDetails")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
<System.Runtime.Serialization.DataMemberAttribute()> _
|
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||||
Public Property ErrorMessage() As String
|
Public Property ErrorMessage() As String
|
||||||
Get
|
Get
|
||||||
@ -100,6 +117,8 @@ Namespace EDMIServiceReference
|
|||||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ObjectDoesNotExistFault)), _
|
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.ObjectDoesNotExistFault)), _
|
||||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileRequest)), _
|
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileRequest)), _
|
||||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileResponse)), _
|
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.NewFileResponse)), _
|
||||||
|
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueRequest)), _
|
||||||
|
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.SetAttributeValueResponse)), _
|
||||||
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.RightsAccessRight))> _
|
System.Runtime.Serialization.KnownTypeAttribute(GetType(EDMIServiceReference.RightsAccessRight))> _
|
||||||
Partial Public Class ScalarResult
|
Partial Public Class ScalarResult
|
||||||
Inherits EDMIServiceReference.BaseResponse
|
Inherits EDMIServiceReference.BaseResponse
|
||||||
@ -155,6 +174,31 @@ Namespace EDMIServiceReference
|
|||||||
End Property
|
End Property
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||||
|
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
|
||||||
|
System.Runtime.Serialization.DataContractAttribute(Name:="SetAttributeValueResponse", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStor"& _
|
||||||
|
"age.SetAttributeValue"), _
|
||||||
|
System.SerializableAttribute()> _
|
||||||
|
Partial Public Class SetAttributeValueResponse
|
||||||
|
Inherits EDMIServiceReference.BaseResponse
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||||
|
Private ObjectIdField As Long
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||||
|
Public Property ObjectId() As Long
|
||||||
|
Get
|
||||||
|
Return Me.ObjectIdField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
If (Me.ObjectIdField.Equals(value) <> true) Then
|
||||||
|
Me.ObjectIdField = value
|
||||||
|
Me.RaisePropertyChanged("ObjectId")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
|
|
||||||
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||||
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
|
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
|
||||||
System.Runtime.Serialization.DataContractAttribute(Name:="TableResult", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages"& _
|
System.Runtime.Serialization.DataContractAttribute(Name:="TableResult", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.Messages"& _
|
||||||
@ -326,6 +370,9 @@ Namespace EDMIServiceReference
|
|||||||
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||||
Private KindTypeField As String
|
Private KindTypeField As String
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||||
|
Private LanguageField As String
|
||||||
|
|
||||||
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||||
Private StoreNameField As String
|
Private StoreNameField As String
|
||||||
|
|
||||||
@ -446,6 +493,19 @@ Namespace EDMIServiceReference
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||||
|
Public Property Language() As String
|
||||||
|
Get
|
||||||
|
Return Me.LanguageField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
If (Object.ReferenceEquals(Me.LanguageField, value) <> true) Then
|
||||||
|
Me.LanguageField = value
|
||||||
|
Me.RaisePropertyChanged("Language")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
<System.Runtime.Serialization.DataMemberAttribute()> _
|
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||||
Public Property StoreName() As String
|
Public Property StoreName() As String
|
||||||
Get
|
Get
|
||||||
@ -482,6 +542,102 @@ Namespace EDMIServiceReference
|
|||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
<System.Diagnostics.DebuggerStepThroughAttribute(), _
|
||||||
|
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
|
||||||
|
System.Runtime.Serialization.DataContractAttribute(Name:="SetAttributeValueRequest", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Services.EDMIService.FileStor"& _
|
||||||
|
"age.SetAttributeValue"), _
|
||||||
|
System.SerializableAttribute()> _
|
||||||
|
Partial Public Class SetAttributeValueRequest
|
||||||
|
Inherits Object
|
||||||
|
Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
|
||||||
|
|
||||||
|
<System.NonSerializedAttribute()> _
|
||||||
|
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||||
|
Private AttributeNameField As String
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||||
|
Private AttributeValueField As String
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||||
|
Private ObjectIdField As Long
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.OptionalFieldAttribute()> _
|
||||||
|
Private WhoField As Long
|
||||||
|
|
||||||
|
<Global.System.ComponentModel.BrowsableAttribute(false)> _
|
||||||
|
Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData
|
||||||
|
Get
|
||||||
|
Return Me.extensionDataField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me.extensionDataField = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||||
|
Public Property AttributeName() As String
|
||||||
|
Get
|
||||||
|
Return Me.AttributeNameField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
If (Object.ReferenceEquals(Me.AttributeNameField, value) <> true) Then
|
||||||
|
Me.AttributeNameField = value
|
||||||
|
Me.RaisePropertyChanged("AttributeName")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||||
|
Public Property AttributeValue() As String
|
||||||
|
Get
|
||||||
|
Return Me.AttributeValueField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
If (Object.ReferenceEquals(Me.AttributeValueField, value) <> true) Then
|
||||||
|
Me.AttributeValueField = value
|
||||||
|
Me.RaisePropertyChanged("AttributeValue")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||||
|
Public Property ObjectId() As Long
|
||||||
|
Get
|
||||||
|
Return Me.ObjectIdField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
If (Me.ObjectIdField.Equals(value) <> true) Then
|
||||||
|
Me.ObjectIdField = value
|
||||||
|
Me.RaisePropertyChanged("ObjectId")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<System.Runtime.Serialization.DataMemberAttribute()> _
|
||||||
|
Public Property Who() As Long
|
||||||
|
Get
|
||||||
|
Return Me.WhoField
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
If (Me.WhoField.Equals(value) <> true) Then
|
||||||
|
Me.WhoField = value
|
||||||
|
Me.RaisePropertyChanged("Who")
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
|
||||||
|
|
||||||
|
Protected Sub RaisePropertyChanged(ByVal propertyName As String)
|
||||||
|
Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
|
||||||
|
If (Not (propertyChanged) Is Nothing) Then
|
||||||
|
propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
|
||||||
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
|
<System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
|
||||||
System.Runtime.Serialization.DataContractAttribute(Name:="Rights.AccessRight", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API")> _
|
System.Runtime.Serialization.DataContractAttribute(Name:="Rights.AccessRight", [Namespace]:="http://schemas.datacontract.org/2004/07/DigitalData.Modules.EDMI.API")> _
|
||||||
Public Enum RightsAccessRight As Integer
|
Public Enum RightsAccessRight As Integer
|
||||||
@ -625,6 +781,12 @@ Namespace EDMIServiceReference
|
|||||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/NewFile", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/NewFileResponse")> _
|
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/NewFile", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/NewFileResponse")> _
|
||||||
Function NewFileAsync(ByVal Data As EDMIServiceReference.NewFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewFileResponse)
|
Function NewFileAsync(ByVal Data As EDMIServiceReference.NewFileRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.NewFileResponse)
|
||||||
|
|
||||||
|
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValue", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValueResponse")> _
|
||||||
|
Function SetAttributeValue(ByVal Data As EDMIServiceReference.SetAttributeValueRequest) As EDMIServiceReference.SetAttributeValueResponse
|
||||||
|
|
||||||
|
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValue", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValueResponse")> _
|
||||||
|
Function SetAttributeValueAsync(ByVal Data As EDMIServiceReference.SetAttributeValueRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.SetAttributeValueResponse)
|
||||||
|
|
||||||
'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (DocumentStreamRequest) von Nachricht "DocumentStreamRequest" nicht mit dem Standardwert (GetFileByObjectId) übereinstimmt.
|
'CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (DocumentStreamRequest) von Nachricht "DocumentStreamRequest" nicht mit dem Standardwert (GetFileByObjectId) übereinstimmt.
|
||||||
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse"), _
|
<System.ServiceModel.OperationContractAttribute(Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId", ReplyAction:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdResponse"), _
|
||||||
System.ServiceModel.FaultContractAttribute(GetType(EDMIServiceReference.ObjectDoesNotExistFault), Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdObjectDoesN"& _
|
System.ServiceModel.FaultContractAttribute(GetType(EDMIServiceReference.ObjectDoesNotExistFault), Action:="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectIdObjectDoesN"& _
|
||||||
@ -958,6 +1120,14 @@ Namespace EDMIServiceReference
|
|||||||
Return MyBase.Channel.NewFileAsync(Data)
|
Return MyBase.Channel.NewFileAsync(Data)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function SetAttributeValue(ByVal Data As EDMIServiceReference.SetAttributeValueRequest) As EDMIServiceReference.SetAttributeValueResponse Implements EDMIServiceReference.IEDMIService.SetAttributeValue
|
||||||
|
Return MyBase.Channel.SetAttributeValue(Data)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function SetAttributeValueAsync(ByVal Data As EDMIServiceReference.SetAttributeValueRequest) As System.Threading.Tasks.Task(Of EDMIServiceReference.SetAttributeValueResponse) Implements EDMIServiceReference.IEDMIService.SetAttributeValueAsync
|
||||||
|
Return MyBase.Channel.SetAttributeValueAsync(Data)
|
||||||
|
End Function
|
||||||
|
|
||||||
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
<System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Function EDMIServiceReference_IEDMIService_GetFileByObjectId(ByVal request As EDMIServiceReference.DocumentStreamRequest) As EDMIServiceReference.DocumentStreamResponse Implements EDMIServiceReference.IEDMIService.GetFileByObjectId
|
Function EDMIServiceReference_IEDMIService_GetFileByObjectId(ByVal request As EDMIServiceReference.DocumentStreamRequest) As EDMIServiceReference.DocumentStreamResponse Implements EDMIServiceReference.IEDMIService.GetFileByObjectId
|
||||||
Return MyBase.Channel.GetFileByObjectId(request)
|
Return MyBase.Channel.GetFileByObjectId(request)
|
||||||
|
|||||||
@ -182,6 +182,15 @@
|
|||||||
<soap12:body use="literal" />
|
<soap12:body use="literal" />
|
||||||
</wsdl:output>
|
</wsdl:output>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="SetAttributeValue">
|
||||||
|
<soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/SetAttributeValue" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
<wsdl:operation name="GetFileByObjectId">
|
<wsdl:operation name="GetFileByObjectId">
|
||||||
<soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId" style="document" />
|
<soap12:operation soapAction="http://DigitalData.Services.EDMIService/IEDMIService/GetFileByObjectId" style="document" />
|
||||||
<wsdl:input name="DocumentStreamRequest">
|
<wsdl:input name="DocumentStreamRequest">
|
||||||
|
|||||||
@ -130,6 +130,9 @@
|
|||||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult.datasource">
|
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.ScalarResult.datasource">
|
||||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.SetAttributeValueResponse.datasource">
|
||||||
|
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||||
|
</None>
|
||||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult.datasource">
|
<None Include="Connected Services\EDMIServiceReference\DigitalData.Modules.EDMI.API.EDMIServiceReference.TableResult.datasource">
|
||||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||||
</None>
|
</None>
|
||||||
@ -145,6 +148,9 @@
|
|||||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.FileStorage.NewFile.xsd">
|
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.FileStorage.NewFile.xsd">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</None>
|
</None>
|
||||||
|
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.FileStorage.SetAttributeValue.xsd">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</None>
|
||||||
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Messages.xsd">
|
<None Include="Connected Services\EDMIServiceReference\DigitalData.Services.EDMIService.Messages.xsd">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</None>
|
</None>
|
||||||
|
|||||||
@ -19,8 +19,8 @@ Public MustInherit Class BaseMethod
|
|||||||
Throw New ApplicationException(pMessage)
|
Throw New ApplicationException(pMessage)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function LogAndThrow(pException As Exception)
|
Public Function LogAndThrow(pException As Exception, pMessage As String)
|
||||||
Logger.Error(pException)
|
Logger.Error(pException)
|
||||||
Throw pException
|
Throw New ApplicationException(pMessage, pException)
|
||||||
End Function
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -131,6 +131,9 @@
|
|||||||
<Compile Include="BaseMethod.vb" />
|
<Compile Include="BaseMethod.vb" />
|
||||||
<Compile Include="ClassConstants.vb" />
|
<Compile Include="ClassConstants.vb" />
|
||||||
<Compile Include="Config.vb" />
|
<Compile Include="Config.vb" />
|
||||||
|
<Compile Include="Filestorage\GetAttributeValue\GetAttributeValueMethod.vb" />
|
||||||
|
<Compile Include="Filestorage\GetAttributeValue\GetAttributeValueRequest.vb" />
|
||||||
|
<Compile Include="Filestorage\GetAttributeValue\GetAttributeValueResponse.vb" />
|
||||||
<Compile Include="Filestorage\NewFile\NewFileMethod.vb" />
|
<Compile Include="Filestorage\NewFile\NewFileMethod.vb" />
|
||||||
<Compile Include="Filestorage\NewFile\NewFileRequest.vb" />
|
<Compile Include="Filestorage\NewFile\NewFileRequest.vb" />
|
||||||
<Compile Include="Filestorage\NewFile\NewFileResponse.vb" />
|
<Compile Include="Filestorage\NewFile\NewFileResponse.vb" />
|
||||||
|
|||||||
@ -0,0 +1,29 @@
|
|||||||
|
Imports DigitalData.Modules.Database
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
|
Namespace FileStorage.GetAttributeValue
|
||||||
|
Public Class GetAttributeValueMethod
|
||||||
|
Inherits BaseMethod
|
||||||
|
|
||||||
|
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer)
|
||||||
|
MyBase.New(pLogConfig, pDatabase)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function Run(pData As GetAttributeValueRequest) As GetAttributeValueResponse
|
||||||
|
Try
|
||||||
|
If Helpers.TestObjectIdExists(pData.ObjectId) = False Then
|
||||||
|
LogAndThrow("ObjectId does not exist!")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oValue As Object
|
||||||
|
|
||||||
|
|
||||||
|
Return New GetAttributeValueResponse(pData.ObjectId, oValue)
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Warn("Error occurred while getting attribute value!")
|
||||||
|
Return New GetAttributeValueResponse(ex)
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
|
||||||
|
End Namespace
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
Namespace FileStorage.GetAttributeValue
|
||||||
|
Public Class GetAttributeValueRequest
|
||||||
|
Public Property ObjectId As Long
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
Imports System.Runtime.Serialization
|
||||||
|
|
||||||
|
Namespace FileStorage.GetAttributeValue
|
||||||
|
|
||||||
|
<Serializable>
|
||||||
|
<DataContract>
|
||||||
|
Public Class GetAttributeValueResponse
|
||||||
|
Inherits Messages.BaseResponse
|
||||||
|
|
||||||
|
<DataMember>
|
||||||
|
Public Property ObjectId As Long
|
||||||
|
Public Property Value As Object
|
||||||
|
|
||||||
|
Public Sub New(pObjectId As Long, pValue As Object)
|
||||||
|
MyBase.New()
|
||||||
|
ObjectId = pObjectId
|
||||||
|
Value = pValue
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub New(pException As Exception, Optional pDetails As String = "")
|
||||||
|
MyBase.New(pException, pDetails)
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
|
||||||
|
End Namespace
|
||||||
|
|
||||||
@ -21,8 +21,6 @@ Public Class NewFileMethod
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function Run(pData As NewFile.NewFileRequest) As NewFile.NewFileResponse
|
Public Function Run(pData As NewFile.NewFileRequest) As NewFile.NewFileResponse
|
||||||
Dim oConnection As SqlConnection = Nothing
|
|
||||||
Dim oTransaction As SqlTransaction = Nothing
|
|
||||||
Dim oFilePath As String = Nothing
|
Dim oFilePath As String = Nothing
|
||||||
|
|
||||||
Dim oExistingObjectId = TestFileChecksumExists(pData.FileChecksum)
|
Dim oExistingObjectId = TestFileChecksumExists(pData.FileChecksum)
|
||||||
@ -68,7 +66,7 @@ Public Class NewFileMethod
|
|||||||
IO.Directory.CreateDirectory(oFinalPath)
|
IO.Directory.CreateDirectory(oFinalPath)
|
||||||
Logger.Debug("Created folder [{0}]", oFinalPath)
|
Logger.Debug("Created folder [{0}]", oFinalPath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LogAndThrow(ex)
|
LogAndThrow(ex, $"Store Directory [{oFinalPath}] could not be created!")
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
Logger.Debug("Final Directory is [{0}]", oFinalPath)
|
Logger.Debug("Final Directory is [{0}]", oFinalPath)
|
||||||
@ -103,8 +101,7 @@ Public Class NewFileMethod
|
|||||||
oStream.Close()
|
oStream.Close()
|
||||||
End Using
|
End Using
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
LogAndThrow(ex, $"Could not write file [{oFilePath}] to disk!")
|
||||||
LogAndThrow($"Could not write file [{oFilePath}] to disk!")
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
'---------------------------------------------------------------------------
|
'---------------------------------------------------------------------------
|
||||||
@ -113,17 +110,44 @@ Public Class NewFileMethod
|
|||||||
|
|
||||||
' Insert into DB
|
' Insert into DB
|
||||||
Dim oSQL As String = $"EXEC PRIDB_NEW_IDBFO '{oFinalPath}', '{oFileObjectName}', '{oFileObjectExtension}',{oFileObjectSize},'{pData.FileChecksum}' ,'{pData.Who}','{oObjectId}',{oStore.Id}"
|
Dim oSQL As String = $"EXEC PRIDB_NEW_IDBFO '{oFinalPath}', '{oFileObjectName}', '{oFileObjectExtension}',{oFileObjectSize},'{pData.FileChecksum}' ,'{pData.Who}','{oObjectId}',{oStore.Id}"
|
||||||
Dim oResult As Boolean = Database.ExecuteNonQueryWithConnectionObject(oSQL,
|
Dim oResult As Boolean = Database.ExecuteNonQueryWithConnectionObject(oSQL, Connection, ExternalTransaction, Transaction)
|
||||||
oConnection,
|
|
||||||
MSSQLServer.TransactionMode.ExternalTransaction,
|
|
||||||
oTransaction)
|
|
||||||
|
|
||||||
If oResult = False Then
|
If oResult = False Then
|
||||||
LogAndThrow("IDB FileObject could not be created!")
|
LogAndThrow("IDB FileObject could not be created!")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
'TODO: File dates in try catch
|
||||||
|
|
||||||
|
Dim oDefaultAttributes As New Dictionary(Of String, Object) From {
|
||||||
|
{"OriginFileName", pData?.FileName},
|
||||||
|
{"OriginCreationDatetime", pData?.FileCreatedAt},
|
||||||
|
{"OriginChangedDatetime", pData?.FileChangedAt}
|
||||||
|
}
|
||||||
|
|
||||||
|
For Each oAttribute As KeyValuePair(Of String, Object) In oDefaultAttributes
|
||||||
|
Try
|
||||||
|
' Dont write empty attributes
|
||||||
|
If oAttribute.Value Is Nothing Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oSuccess = Helpers.SetAttributeValue(Connection, Transaction, oObjectId, oAttribute.Key, oAttribute.Value, "de-DE", pData.Who)
|
||||||
|
If oSuccess Then
|
||||||
|
Logger.Debug("Default Attribute [{0}] written with value [{1}]", oAttribute.Key, oAttribute.Value)
|
||||||
|
Else
|
||||||
|
Logger.Warn("Default attribute value could not be written")
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
LogAndThrow(ex, $"System attribute [{oAttribute.Key}] could not be written!")
|
||||||
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
|
'---------------------------------------------------------------------------
|
||||||
|
|
||||||
' Finally, commit the transaction
|
' Finally, commit the transaction
|
||||||
oTransaction?.Commit()
|
Transaction?.Commit()
|
||||||
|
|
||||||
Return New NewFile.NewFileResponse(oObjectId)
|
Return New NewFile.NewFileResponse(oObjectId)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@ -141,7 +165,7 @@ Public Class NewFileMethod
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Logger.Info("Rolling back transaction.")
|
Logger.Info("Rolling back transaction.")
|
||||||
oTransaction?.Rollback()
|
Transaction?.Rollback()
|
||||||
|
|
||||||
Return New NewFile.NewFileResponse(ex)
|
Return New NewFile.NewFileResponse(ex)
|
||||||
|
|
||||||
|
|||||||
@ -63,6 +63,13 @@ Namespace FileStorage.NewFile
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
<DataMember>
|
<DataMember>
|
||||||
Public Property Who As String
|
Public Property Who As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' The language of the user
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
<DataMember>
|
||||||
|
Public Property Language As String
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
||||||
|
|||||||
@ -1,13 +1,20 @@
|
|||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Services.EDMIService.IDB
|
Imports DigitalData.Services.EDMIService.IDB
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
Namespace FileStorage.SetAttributeValue
|
Namespace FileStorage.SetAttributeValue
|
||||||
Public Class SetAttributeValueMethod
|
Public Class SetAttributeValueMethod
|
||||||
Inherits BaseMethod
|
Inherits BaseMethod
|
||||||
|
|
||||||
|
Private Connection As SqlConnection
|
||||||
|
Private Transaction As SqlTransaction
|
||||||
|
|
||||||
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer)
|
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer)
|
||||||
MyBase.New(pLogConfig, pDatabase)
|
MyBase.New(pLogConfig, pDatabase)
|
||||||
|
|
||||||
|
Connection = Database.GetConnection()
|
||||||
|
Transaction = Connection.BeginTransaction()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function Run(pData As SetAttributeValueRequest) As SetAttributeValueResponse
|
Public Function Run(pData As SetAttributeValueRequest) As SetAttributeValueResponse
|
||||||
@ -16,13 +23,16 @@ Namespace FileStorage.SetAttributeValue
|
|||||||
LogAndThrow("ObjectId does not exist!")
|
LogAndThrow("ObjectId does not exist!")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'TODO: Finish
|
Dim oResult = Helpers.SetAttributeValue(Connection, Transaction,
|
||||||
|
pData.ObjectId, pData.AttributeName, pData.AttributeValue, pData.Language, pData.Who)
|
||||||
|
|
||||||
|
If oResult = False Then
|
||||||
|
LogAndThrow("Attribute value could not be set!")
|
||||||
|
End If
|
||||||
|
|
||||||
Return New SetAttributeValueResponse(pData.ObjectId)
|
Return New SetAttributeValueResponse(pData.ObjectId)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Warn("Error occurred while setting attribute value!")
|
Logger.Warn("Error occurred while setting attribute value!")
|
||||||
|
|
||||||
Return New SetAttributeValueResponse(ex)
|
Return New SetAttributeValueResponse(ex)
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@ -15,6 +15,8 @@ Namespace FileStorage.SetAttributeValue
|
|||||||
Public Property AttributeValue As String
|
Public Property AttributeValue As String
|
||||||
<DataMember>
|
<DataMember>
|
||||||
Public Property Who As Long
|
Public Property Who As Long
|
||||||
|
<DataMember>
|
||||||
|
Public Property Language As String
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,23 +1,24 @@
|
|||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.Language
|
Imports DigitalData.Modules.Language
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Services.EDMIService.Messages
|
Imports DigitalData.Modules.EDMI.API.Client
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
Namespace IDB
|
Namespace IDB
|
||||||
Public Class Helpers
|
Public Class Helpers
|
||||||
Inherits BaseClass
|
Inherits BaseClass
|
||||||
|
|
||||||
Private MSSQLServer As MSSQLServer
|
Private Database As MSSQLServer
|
||||||
|
|
||||||
Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer)
|
Public Sub New(pLogConfig As LogConfig, pMSSQLServer As MSSQLServer)
|
||||||
MyBase.New(pLogConfig)
|
MyBase.New(pLogConfig)
|
||||||
MSSQLServer = pMSSQLServer
|
Database = pMSSQLServer
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function TestObjectIdExists(pObjectId As Long, Optional ByRef IsDeleted As Boolean = False, Optional ByRef IsActive As Boolean = False) As Boolean
|
Public Function TestObjectIdExists(pObjectId As Long, Optional ByRef IsDeleted As Boolean = False, Optional ByRef IsActive As Boolean = False) As Boolean
|
||||||
Try
|
Try
|
||||||
Dim oSQL As String = $"SELECT IDB_OBJ_ID, ACTIVE, DELETED FROM TBIDB_OBJECT WHERE IDB_OBJ_ID = {pObjectId}"
|
Dim oSQL As String = $"SELECT IDB_OBJ_ID, ACTIVE, DELETED FROM TBIDB_OBJECT WHERE IDB_OBJ_ID = {pObjectId}"
|
||||||
Dim oTable As DataTable = MSSQLServer.GetDatatable(oSQL)
|
Dim oTable As DataTable = Database.GetDatatable(oSQL)
|
||||||
|
|
||||||
If IsNothing(oTable) OrElse oTable.Rows.Count = 0 Then
|
If IsNothing(oTable) OrElse oTable.Rows.Count = 0 Then
|
||||||
Logger.Warn("ObjectId {0} does not exist")
|
Logger.Warn("ObjectId {0} does not exist")
|
||||||
@ -39,6 +40,49 @@ Namespace IDB
|
|||||||
|
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetAttributesForObject(pObjectId As Long, pLanguage As String) As List(Of ObjectAttribute)
|
||||||
|
Dim oAttributes As New List(Of ObjectAttribute)
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim oTable As DataTable = Database.GetDatatable($"EXEC [PRIDB_GET_VALUE_DT] {pObjectId}, '{pLanguage}'")
|
||||||
|
If oTable Is Nothing OrElse oTable.Rows.Count = 0 Then
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each oRow As DataRow In oTable.Rows
|
||||||
|
Dim oAttribute As New ObjectAttribute With {
|
||||||
|
.Id = oRow.Item("AttributeId"),
|
||||||
|
.Title = oRow.Item("AttributeTitle"),
|
||||||
|
.Type = oRow.Item("AttributeType"),
|
||||||
|
.ValueBigInt = Utils.NotNull(oRow.Item("ValueBigInt"), Nothing),
|
||||||
|
.ValueDate = Utils.NotNull(oRow.Item("ValueDate"), Nothing),
|
||||||
|
.ValueDecimal = Utils.NotNull(oRow.Item("ValueDecimal"), Nothing),
|
||||||
|
.ValueText = Utils.NotNull(oRow.Item("ValueText"), Nothing)
|
||||||
|
}
|
||||||
|
|
||||||
|
oAttributes.Add(oAttribute)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oAttributes
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex)
|
||||||
|
Return Nothing
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function SetAttributeValue(pConnection As SqlConnection, pTransaction As SqlTransaction, pObjectId As Long, pAttributeName As String, pValue As String, pLanguage As String, pWho As String) As Boolean
|
||||||
|
Dim oSql = $"
|
||||||
|
DECLARE @NEW_OBJ_MD_ID BIGINT
|
||||||
|
EXEC PRIDB_NEW_OBJ_DATA {pObjectId}, '{pAttributeName}', '{pWho}', '{pValue}', '{pLanguage}', 0, @OMD_ID = @NEW_OBJ_MD_ID OUTPUT"
|
||||||
|
|
||||||
|
If Database.ExecuteNonQueryWithConnectionObject(oSql, pConnection, MSSQLServer.TransactionMode.ExternalTransaction, pTransaction) = False Then
|
||||||
|
Logger.Warn("Error while setting attribute value.")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
||||||
@ -49,8 +49,6 @@ Public Class WindowsService
|
|||||||
_Config = _ConfigManager.Config
|
_Config = _ConfigManager.Config
|
||||||
_LogConfig.Debug = _ConfigManager.Config.Debug
|
_LogConfig.Debug = _ConfigManager.Config.Debug
|
||||||
|
|
||||||
'UpdateTraceLogging()
|
|
||||||
|
|
||||||
Dim oTimer As New Timers.Timer(60000)
|
Dim oTimer As New Timers.Timer(60000)
|
||||||
AddHandler oTimer.Elapsed, Sub()
|
AddHandler oTimer.Elapsed, Sub()
|
||||||
_Logger.Debug("Reloading config..")
|
_Logger.Debug("Reloading config..")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user