RestDeploymentFramework.docx
- 文档编号:29205859
- 上传时间:2023-07-21
- 格式:DOCX
- 页数:19
- 大小:90.79KB
RestDeploymentFramework.docx
《RestDeploymentFramework.docx》由会员分享,可在线阅读,更多相关《RestDeploymentFramework.docx(19页珍藏版)》请在冰豆网上搜索。
RestDeploymentFramework
DeploymentRESTAPIFramework
Contents
RESTDeploymentFramework2
DesignSummary2
Interactions2
Plug-inRegistry4
RegistrySchema4
Example6
URLFormat7
Security8
Packaging/Installation8
ServicebusRESTPlug-in9
DeploymentAPI:
9
Examples:
9
RESTDeploymentFramework
ThedeploymentRESTAPIsareintendedforconsumptionbyJDevIDE,buttheseAPIsmaybeextendedinthefuturetobeconsumedbyotherclients.
DesignSummary
Thedeploymentframeworkhandlesdeploymentrequestonbehalfofproductplug-ins,performspre-processingandthendelegatestheactualdeploymenttoahandlersdefinedintherespectiveplug-ins.
Thedeploymentframeworkmaintainsaregistryoftheplug-ins,whichcontainsmetadataforallthesupporteddeploymentoperations.Thismetadataisusedforpre-processingeachrequestanddelegatingthedeploymenttotheapplicablehandler.
Interactions
Thefollowingsequencediagramdepictsinteractionsbetweenthedeploymentframeworkandtheplug-inresponsiblefortheactualdeploymenttoaproductinstance.
Uponreceivingarequest,an(catch-all)HTTPservletinthedeploymentframeworkwilllookuptheplug-inregistry,andusetheregisteredplug-inmetadatatoprepareparametersfromtherequestpayload,andinvoketheapplicabledeploymenthandler.
Thehandlerwillreturntheresultsorexceptions,whichtheframeworkwillmarshalandreturntotheJDev/RESTclientwiththeappropriateHTTPstatuscode.
Eachplug-inwillneedtoregisterthemetadataconsistingofrequesthandlertobeinvoked,andtheinputandoutputspecification.
Plug-inRegistry
RegistrySchema
{
"$schema":
"http:
//json-schema.org/draft-04/schema#",
"id":
"/",
"type":
"object",
"properties":
{
"registryBean":
{
"id":
"registryBean",
"type":
"object",
"properties":
{
"plugins":
{
"id":
"plugins",
"type":
"object",
"properties":
{
"handlers":
{
"id":
"handlers",
"type":
"object",
"properties":
{
"className":
{
"id":
"className",
"type":
"string"
},
"feature":
{
"id":
"feature",
"type":
"string"
},
"inputParam":
{
"id":
"inputParam",
"type":
"array",
"items":
{
"id":
"2",
"type":
"object",
"properties":
{
"cardinality":
{
"id":
"cardinality",
"type":
"integer"
},
"name":
{
"id":
"name",
"type":
"string"
},
"order":
{
"id":
"order",
"type":
"integer"
},
"type":
{
"id":
"type",
"type":
"string"
}
}
}
},
"name":
{
"id":
"name",
"type":
"string"
},
"operation":
{
"id":
"operation",
"type":
"string"
},
"outputParam":
{
"id":
"outputParam",
"type":
"object",
"properties":
{
"cardinality":
{
"id":
"cardinality",
"type":
"integer"
},
"name":
{
"id":
"name",
"type":
"string"
},
"order":
{
"id":
"order",
"type":
"integer"
},
"type":
{
"id":
"type",
"type":
"string"
}
}
},
"roles":
{
"id":
"roles",
"type":
"array",
"items":
{
"id":
"4",
"type":
"string"
}
}
},
"required":
[
"className",
"feature",
"inputParam",
"name",
"operation",
"outputParam",
"roles"
]
},
"name":
{
"id":
"name",
"type":
"string"
},
"version":
{
"id":
"version",
"type":
"string"
}
},
"required":
[
"handlers",
"name",
"version"
]
}
},
"required":
[
"plugins"
]
}
},
"required":
[
"registryBean"
]
}
Example
Followingsnippetprovidesanoverviewofhowtheplug-inregistrylookslike.
{
"registryBean":
{
"plugins":
{
"handlers":
{
"className":
"com.oracle.servicebus.rest.config.handler.ServiceBusHandler",
"feature":
"deployment",
"inputParam":
[
{
"cardinality":
1,
"name":
"configJar",
"order":
0,
"type":
"java.io.InputStream"
},
{
"cardinality":
1,
"name":
"importOptions",
"order":
1,
"type":
"com.oracle.servicebus.rest.config.pojo.ImportServiceRequest"
},
{
"cardinality":
1,
"name":
"importOptions",
"order":
2,
"type":
"java.lang.String"
}
],
"name":
"sbdeployment",
"operation":
"importConfigJar",
"outputParam":
{
"cardinality":
1,
"name":
"importServiceResult",
"order":
0,
"type":
"com.oracle.servicebus.rest.config.pojo.ImportServiceResult"
},
"roles":
[
"IntegrationDeployer",
"IntegrationAdmin",
"Deployer",
"Developer",
"Admin"
]
},
"name":
"servicebus",
"version":
"12.2.1"
}
}
……
}
URLFormat
TherequestURLsisderivedfromthemetadataregisteredbyeachplug-in,inthefol.format.
∙soacsrestapi/{plugin-name}/{version}/{feature}/{handler-name}
E.g.:
soacsrestapi/servicebus/v12.1.3/deployment/configuration
soacsrestapi/soa/v12.1.3/deployment/composite
Security
TheframeworkusesbasicauthenticationforaccesstoRESTAPIs.Specificproductsmayspecifytheauthorizedrolesinthepluginregistry.
E.g.,theauthorizedrolesforservicebusdeploymentarespecifiedasfollows.
"roles":
[
"IntegrationDeployer",
"IntegrationAdmin",
"Deployer",
"Developer",
"Admin"
]
Packaging/Installation
[TBD]
ServicebusRESTPlug-in
DeploymentAPI:
ThepurposeofthisAPIistodeployanOSBconfigurationjarfile,alongwithastandardcustomizationfile,andlistofEnvironmentParameters.
URL:
http:
//
HTTPMethod:
PUT
RequestType:
Multipart/mixed
RequestBody:
Part
MediaType
ConfigurationJarFile
application/octet-stream
EnvValueToPreserve
(ListofEnvironmentValuestopreserve)
application/json
CustomizationFile(Optional)
text/xml
Authentication:
BasicAuthentication
AllowedRoles:
Admin
Deployer
Developer
IntegrationAdmin
IntegrationDeployer
ResponseType:
Application/json
HTTPStatusCodes:
TheframeworkreturnsstandardHTTPstatuscodesalongwiththecauseinaJSONobject,includingthefollowingcodes.
200–OK
401–Unauthorized
500–ApplicationError
Examples:
FollowingisanexampleAPIcalltoimportaconfigurationJar.
Request:
Clientout-boundrequest
1>PUThttp:
//localhost:
7001/soacsrestapi/servicebus/12.2.1/deployment/sbdeployment
1>Content-Type:
multipart/mixed
1>Accept:
application/json
MultipartRequestBody:
--Boundary_1_1900677350_1420630866361
Content-Type:
application/octet-stream
....
...
--Boundary_1_1900677350_1420630866361
Content-Type:
application/json
{"envValueToPreserve":
["HOSTNAME","PORTNUM"]}
--Boundary_1_1900677350_1420630866361
Content-Type:
text/plain
xmlversion="1.0"encoding="UTF-8"?
>
Customizationsxmlns: cus="xmlns: xsi="http: //www.w3.org/2001/XMLSchema-instance"xmlns: xt="xmlns: con=" customizationxsi: type="cus: EnvValueActionsCustomizationType"> description/> owners> owner> type>Operations type> path>System/OperatorSettings/GlobalOperationalSettings path> owner> … … replacement>ReplacementString replacement> customization> Customizations> --Boundary_1_1900677350_1420630866361-- Response: Clientin-boundresponse 1<200 1 68159a4f-4768-4120-871e-af66d30eed76-0000005e 1 application/json ResponseSchema: { "$schema": "http: //json-schema.org/draft-04/schema#", "definitions": { "ref": { "additionalProperties": false, "type": "object", "description": "ARefuniquelyrepresentsaresource,projectorfolderthatismanagedbytheConfigurationFramework.AspecialRefDOMAINreferstothewholedomain.", "properties": { "fullname": { "type": "string" }, "names": { "type": "array", "items": [ { "type": "string" }, { "type": "string" } ] }, "parent_ref": { "$ref": "#/definitions/ref" } } }, "diagnostics": { "description": "ContainerforacollectionofDiagnosticentriesrelevanttoaparticularresource.", "type": "object", "additionalProperties": false, "properties": { "diagnosticSeverity": { "type": "string" }, "diagnostic": { "description": "Representaparticularvalidationmessagerelatedtoaresource.", "type": "array", "items": { "type": "object", "properties": { "code": { "type": "integer" }, "message": { "type": "string" }, "severity": { "type": "string" }, "userSeverity": { "type": "string" } } } }, "ref": { "$ref": "#/definitions/ref" } } } }, "type": "object", "additionalProperties": false, "properties": { "deletedRef": { "additionalProperties": false, "description": "Collectionofresourcesthataredeletedduringimport.", "type": "array", "items": { "$ref": "#/definitions/ref" } }, "importedRef": { "additionalProperties": false, "description": "Collectionofresourcesthatwereimportedsuccessfully", "type": "array", "items": { "$ref": "#/definitions/ref" } }, "failedDiagnostics": { "additionalProperties": false, "description": "Collectionofdiagnosticsthataregeneratedduringtheimportprocess.", "type": "array", "items": { "$ref": "#/definitions/diagnostics" } } } } Response: { "importedRef": [ { "typeId": "Operations", "parentRef": { "typeId": "Folder", "parentRef": { "typeId": "Project", "parentRef": { "typeId": "Domain", "parentRef": null, "names": [], "fullname": "Domain" }, "names": [ "System" ], "fullname": "System" }, "names": [ "System", "OperatorSettings" ], "fullname": "System/OperatorSettings" }, "names": [ "System", "OperatorSettings", "GlobalOperationalSettings" ], "fullname": "System/OperatorSettings/GlobalOperationalSettings" }, { "typeId": "ForeignJNDIProvider", "parentRef": { "typeId": "Folder", "parentRef": {
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- RestDeploymentFramework
![提示](https://static.bdocx.com/images/bang_tan.gif)