Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
28b23ac5
Commit
28b23ac5
authored
1 year ago
by
sbaffelli
Committed by
piotr.kupczyk@id.ethz.ch
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Removed unused parameters.
parent
27783c97
No related branches found
No related tags found
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api-openbis-java/source/java/ch/empa/tsprocessor/MethodExtension.java
+4
-5
4 additions, 5 deletions
...java/source/java/ch/empa/tsprocessor/MethodExtension.java
with
4 additions
and
5 deletions
api-openbis-java/source/java/ch/empa/tsprocessor/MethodExtension.java
+
4
−
5
View file @
28b23ac5
...
...
@@ -107,7 +107,7 @@ public class MethodExtension extends Extension {
return
new
TsPropertyModel
(
method
.
getName
(),
new
TsType
.
FunctionType
(
params
,
promiseType
),
TsModifierFlags
.
None
,
false
,
null
);
}
private
static
TsBeanModel
addFunctions
(
TsBeanModel
bean
,
TsModelTransformer
.
Context
context
,
SymbolTable
symbolTable
,
MethodProcessor
processor
)
{
private
static
TsBeanModel
addFunctions
(
TsBeanModel
bean
,
SymbolTable
symbolTable
,
MethodProcessor
processor
)
{
Class
<?>
origin
=
bean
.
getOrigin
();
Stream
<
TsPropertyModel
>
params
=
Arrays
.
stream
(
origin
.
getMethods
()).
filter
(
MethodExtension:
:
filterMethods
).
map
(
method
->
processor
.
makeFunction
(
method
,
symbolTable
));
List
<
TsPropertyModel
>
allProps
=
Stream
.
concat
(
params
,
bean
.
getProperties
().
stream
()).
collect
(
Collectors
.
toList
());
...
...
@@ -122,9 +122,8 @@ public class MethodExtension extends Extension {
String
classString
=
configuration
.
get
(
CFG_ASYNC_CLASSES
);
try
{
TypeScriptGenerator
.
getLogger
().
info
(
String
.
format
(
"MethodExtension: setConfiguration, %s, %s"
,
configuration
,
classString
));
ArrayList
<
String
>
c
lasses
=
mapper
.
readValue
(
classString
,
new
TypeReference
<
ArrayList
<
String
>>()
{
asnycC
lasses
=
mapper
.
readValue
(
classString
,
new
TypeReference
<
ArrayList
<
String
>>()
{
});
asnycClasses
=
classes
;
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
}
...
...
@@ -148,9 +147,9 @@ public class MethodExtension extends Extension {
return
List
.
of
(
new
TransformerDefinition
(
ModelCompiler
.
TransformationPhase
.
BeforeSymbolResolution
,
(
TsModelTransformer
)
(
context
,
model
)
->
{
Stream
<
TsBeanModel
>
processedBeans
=
model
.
getBeans
().
stream
().
map
(
bean
->
{
if
(
asnycClasses
.
contains
(
bean
.
getOrigin
().
getName
()))
{
return
addFunctions
(
bean
,
context
,
context
.
getSymbolTable
(),
MethodExtension:
:
makePromiseReturningFunction
);
return
addFunctions
(
bean
,
context
.
getSymbolTable
(),
MethodExtension:
:
makePromiseReturningFunction
);
}
else
{
return
addFunctions
(
bean
,
context
,
context
.
getSymbolTable
(),
MethodExtension:
:
makeFunction
);
return
addFunctions
(
bean
,
context
.
getSymbolTable
(),
MethodExtension:
:
makeFunction
);
}
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment