File tree Expand file tree Collapse file tree 6 files changed +112
-1
lines changed
src/main/java/org/hyperledger/fabric/contract/annotation Expand file tree Collapse file tree 6 files changed +112
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ plugins {
1313
1414dependencies {
1515 compile project(' :fabric-chaincode-protos' )
16- compile ' io.netty:netty-tcnative-boringssl-static:2.0.15.Final'
16+ compile ' io.netty:netty-tcnative-boringssl-static:2.0.7.Final'
17+ compile ' io.swagger.core.v3:swagger-annotations:2.0.0'
1718 compile ' org.bouncycastle:bcpkix-jdk15on:1.60'
1819 compile ' org.bouncycastle:bcprov-jdk15on:1.60'
1920}
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright IBM Corp., DTCC All Rights Reserved.
3+
4+ SPDX-License-Identifier: Apache-2.0
5+ */
6+ package org .hyperledger .fabric .contract .annotation ;
7+
8+ import java .lang .annotation .ElementType ;
9+ import java .lang .annotation .Retention ;
10+ import java .lang .annotation .Target ;
11+
12+ import static java .lang .annotation .RetentionPolicy .RUNTIME ;
13+
14+ /**
15+ * Class level annotation indicating this class represents one of the complex types that
16+ * can be returned or passed to the transaction functions
17+ */
18+ @ Retention (RUNTIME )
19+ @ Target (ElementType .TYPE )
20+ public @interface DataType {
21+ }
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright IBM Corp., DTCC All Rights Reserved.
3+
4+ SPDX-License-Identifier: Apache-2.0
5+ */
6+ package org .hyperledger .fabric .contract .annotation ;
7+
8+ import java .lang .annotation .ElementType ;
9+ import java .lang .annotation .Retention ;
10+ import java .lang .annotation .Target ;
11+
12+ import static java .lang .annotation .RetentionPolicy .RUNTIME ;
13+
14+ /**
15+ * Class level annotation that defines the contract that is the default contract,
16+ * and as such invoke of the transaction functions does not need to be qualified by the contract name
17+ */
18+ @ Retention (RUNTIME )
19+ @ Target (ElementType .TYPE )
20+ public @interface Default {
21+ }
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright IBM Corp., DTCC All Rights Reserved.
3+
4+ SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ package org .hyperledger .fabric .contract .annotation ;
8+
9+ import java .lang .annotation .Retention ;
10+ import java .lang .annotation .Target ;
11+
12+ import static java .lang .annotation .ElementType .METHOD ;
13+ import static java .lang .annotation .RetentionPolicy .RUNTIME ;
14+
15+ /**
16+ * Method level annotation indicating the function to be a called during contract instantiation
17+ */
18+ @ Retention (RUNTIME )
19+ @ Target (METHOD )
20+ public @interface Init {
21+ }
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright IBM Corp., DTCC All Rights Reserved.
3+
4+ SPDX-License-Identifier: Apache-2.0
5+ */
6+ package org .hyperledger .fabric .contract .annotation ;
7+
8+ import java .lang .annotation .ElementType ;
9+ import java .lang .annotation .Retention ;
10+ import java .lang .annotation .Target ;
11+
12+ import static java .lang .annotation .RetentionPolicy .RUNTIME ;
13+
14+ /**
15+ * Property level annotation defining a property of the class (identified by {@link @DataType})
16+ */
17+ @ Retention (RUNTIME )
18+ @ Target (ElementType .METHOD )
19+ public @interface Property {
20+ }
Original file line number Diff line number Diff line change 1+ /*
2+ Copyright IBM Corp., DTCC All Rights Reserved.
3+
4+ SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ package org .hyperledger .fabric .contract .annotation ;
8+
9+ import java .lang .annotation .Retention ;
10+ import java .lang .annotation .Target ;
11+
12+ import static java .lang .annotation .ElementType .METHOD ;
13+ import static java .lang .annotation .RetentionPolicy .RUNTIME ;
14+
15+ /**
16+ * Method level annotation indicating the function to be a callable transaction function
17+ */
18+ @ Retention (RUNTIME )
19+ @ Target (METHOD )
20+ public @interface Transaction {
21+ /**
22+ * true indicates that this function is intended to be called with the 'submit' semantics<p>
23+ * false indicates that this is intended to be called with the evaluate semantics
24+ * @return
25+ */
26+ boolean submit () default true ;
27+ }
You can’t perform that action at this time.
0 commit comments