From ec13828692187534c6109bc9374bae1a4571a66e Mon Sep 17 00:00:00 2001 From: MLoureiro Date: Tue, 15 Apr 2014 08:27:13 +0100 Subject: [PATCH] EZP-22562 - Create missing value object visitors and input parsers services --- .../Resources/config/input_parsers.yml | 287 +++++++++++++++++- .../config/value_object_visitors.yml | 138 ++++++++- .../Core/REST/Client/Input/Parser/Content.php | 6 +- .../REST/Client/Input/Parser/ContentInfo.php | 6 +- .../Input/Parser/ContentObjectStates.php | 42 --- .../REST/Client/Input/Parser/ContentType.php | 6 +- .../Input/Parser/ContentTypeGroupRefList.php | 6 +- .../REST/Client/Input/Parser/ErrorMessage.php | 1 + .../Input/Parser/FieldDefinitionList.php | 6 +- .../REST/Client/Input/Parser/Relation.php | 4 +- .../Core/REST/Client/Input/Parser/Role.php | 1 - .../Client/Input/Parser/RoleAssignment.php | 1 - .../REST/Client/Input/Parser/VersionInfo.php | 4 +- .../FieldDefinitionCreateStruct.php | 4 +- ...onIncludingContentMetadataUpdateStruct.php | 60 ---- .../Input/Parser/ContentObjectStates.php | 2 +- .../ContentObjectStates.php | 2 +- .../Input/Parser/ContentObjectStatesTest.php | 4 +- .../ContentObjectStatesTest.php | 2 +- 19 files changed, 441 insertions(+), 141 deletions(-) delete mode 100644 eZ/Publish/Core/REST/Client/Input/Parser/ContentObjectStates.php delete mode 100644 eZ/Publish/Core/REST/Client/Output/ValueObjectVisitor/SectionIncludingContentMetadataUpdateStruct.php rename eZ/Publish/Core/REST/{Server => Common}/Input/Parser/ContentObjectStates.php (97%) rename eZ/Publish/Core/REST/{Server => Common}/Output/ValueObjectVisitor/ContentObjectStates.php (96%) diff --git a/eZ/Bundle/EzPublishRestBundle/Resources/config/input_parsers.yml b/eZ/Bundle/EzPublishRestBundle/Resources/config/input_parsers.yml index cb480692e14..30b1e4d325e 100644 --- a/eZ/Bundle/EzPublishRestBundle/Resources/config/input_parsers.yml +++ b/eZ/Bundle/EzPublishRestBundle/Resources/config/input_parsers.yml @@ -1,8 +1,10 @@ parameters: - ezpublish_rest.input.parser.class: eZ\Publish\Core\REST\Server\Input\Parser + ezpublish_rest.input.parser.class: eZ\Publish\Core\REST\Server\Common\Parser + ezpublish_rest.input.parser.ContentObjectStates.class: eZ\Publish\Core\REST\Common\Input\Parser\ContentObjectStates + + # REST server ezpublish_rest.input.parser.ContentCreate.class: eZ\Publish\Core\REST\Server\Input\Parser\ContentCreate ezpublish_rest.input.parser.ContentUpdate.class: eZ\Publish\Core\REST\Server\Input\Parser\ContentUpdate - ezpublish_rest.input.parser.ContentObjectStates.class: eZ\Publish\Core\REST\Server\Input\Parser\ContentObjectStates ezpublish_rest.input.parser.ContentTypeGroupInput.class: eZ\Publish\Core\REST\Server\Input\Parser\ContentTypeGroupInput ezpublish_rest.input.parser.ContentTypeCreate.class: eZ\Publish\Core\REST\Server\Input\Parser\ContentTypeCreate ezpublish_rest.input.parser.ContentTypeUpdate.class: eZ\Publish\Core\REST\Server\Input\Parser\ContentTypeUpdate @@ -56,6 +58,36 @@ parameters: ezpublish_rest.input.parser.internal.criterion.UserMetadata.class: eZ\Publish\Core\REST\Server\Input\Parser\Criterion\UserMetadata ezpublish_rest.input.parser.internal.criterion.Visibility.class: eZ\Publish\Core\REST\Server\Input\Parser\Criterion\Visibility + # REST client + ezpublish_rest.input.parser.Content.class: eZ\Publish\Core\REST\Client\Input\Parser\Content + ezpublish_rest.input.parser.ContentInfo.class: eZ\Publish\Core\REST\Client\Input\Parser\ContentInfo + ezpublish_rest.input.parser.ContentList.class: eZ\Publish\Core\REST\Client\Input\Parser\ContentList + ezpublish_rest.input.parser.ContentType.class: eZ\Publish\Core\REST\Client\Input\Parser\ContentType + ezpublish_rest.input.parser.ContentTypeGroup.class: eZ\Publish\Core\REST\Client\Input\Parser\ContentTypeGroup + ezpublish_rest.input.parser.ContentTypeGroupList.class: eZ\Publish\Core\REST\Client\Input\Parser\ContentTypeGroupList + ezpublish_rest.input.parser.ContentTypeGroupRefList.class: eZ\Publish\Core\REST\Client\Input\Parser\ContentTypeGroupRefList + ezpublish_rest.input.parser.ContentTypeList.class: eZ\Publish\Core\REST\Client\Input\Parser\ContentTypeList + ezpublish_rest.input.parser.ErrorMessage.class: eZ\Publish\Core\REST\Client\Input\Parser\ErrorMessage + ezpublish_rest.input.parser.FieldDefinition.class: eZ\Publish\Core\REST\Client\Input\Parser\FieldDefinition + ezpublish_rest.input.parser.FieldDefinitionList.class: eZ\Publish\Core\REST\Client\Input\Parser\FieldDefinitionList + ezpublish_rest.input.parser.Limitation.class: eZ\Publish\Core\REST\Client\Input\Parser\Limitation + ezpublish_rest.input.parser.Location.class: eZ\Publish\Core\REST\Client\Input\Parser\Location + ezpublish_rest.input.parser.ObjectState.class: eZ\Publish\Core\REST\Client\Input\Parser\ObjectState + ezpublish_rest.input.parser.ObjectStateList.class: eZ\Publish\Core\REST\Client\Input\Parser\ObjectStateList + ezpublish_rest.input.parser.ObjectStateGroup.class: eZ\Publish\Core\REST\Client\Input\Parser\ObjectStateGroup + ezpublish_rest.input.parser.ObjectStateGroupList.class: eZ\Publish\Core\REST\Client\Input\Parser\ObjectStateGroupList + ezpublish_rest.input.parser.Policy.class: eZ\Publish\Core\REST\Client\Input\Parser\Policy + ezpublish_rest.input.parser.PolicyList.class: eZ\Publish\Core\REST\Client\Input\Parser\PolicyList + ezpublish_rest.input.parser.Relation.class: eZ\Publish\Core\REST\Client\Input\Parser\Relation + ezpublish_rest.input.parser.RelationList.class: eZ\Publish\Core\REST\Client\Input\Parser\RelationList + ezpublish_rest.input.parser.Role.class: eZ\Publish\Core\REST\Client\Input\Parser\Role + ezpublish_rest.input.parser.RoleList.class: eZ\Publish\Core\REST\Client\Input\Parser\RoleList + ezpublish_rest.input.parser.RoleAssignment.class: eZ\Publish\Core\REST\Client\Input\Parser\RoleAssignment + ezpublish_rest.input.parser.RoleAssignmentList.class: eZ\Publish\Core\REST\Client\Input\Parser\RoleAssignmentList + ezpublish_rest.input.parser.Section.class: eZ\Publish\Core\REST\Client\Input\Parser\Section + ezpublish_rest.input.parser.SectionList.class: eZ\Publish\Core\REST\Client\Input\Parser\SectionList + ezpublish_rest.input.parser.VersionInfo.class: eZ\Publish\Core\REST\Client\Input\Parser\VersionInfo + services: ezpublish_rest.input.parser: class: %ezpublish_rest.input.parser.class% @@ -63,6 +95,14 @@ services: calls: - [ setRequestParser, [ @ezpublish_rest.request_parser ] ] + ezpublish_rest.input.parser.ContentObjectStates: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ContentObjectStates.class% + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ContentObjectStates } + + # Rest server + ezpublish_rest.input.parser.ContentCreate: parent: ezpublish_rest.input.parser class: %ezpublish_rest.input.parser.ContentCreate.class% @@ -81,12 +121,6 @@ services: tags: - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ContentUpdate } - ezpublish_rest.input.parser.ContentObjectStates: - parent: ezpublish_rest.input.parser - class: %ezpublish_rest.input.parser.ContentObjectStates.class% - tags: - - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ContentObjectStates } - ezpublish_rest.input.parser.ContentTypeCreate: parent: ezpublish_rest.input.parser class: %ezpublish_rest.input.parser.ContentTypeCreate.class% @@ -474,4 +508,239 @@ services: parent: ezpublish_rest.input.parser class: %ezpublish_rest.input.parser.internal.criterion.Visibility.class% tags: - - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.internal.criterion.Visibility } \ No newline at end of file + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.internal.criterion.Visibility } + + # Rest client + + ezpublish_rest.input.parser.Content: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.Content.class% + arguments: + - @ezpublish_rest.parser_tools + - @ezpublish.api.service.content + - @ezpublish_rest.input.parser.versioninfo + - @ezpublish_rest.field_type_parser + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.Content } + + ezpublish_rest.input.parser.ContentInfo: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ContentInfo.class% + arguments: + - @ezpublish_rest.parser_tools + - @ezpublish.api.service.content_type + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ContentInfo } + + ezpublish_rest.input.parser.ContentList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ContentList.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ContentList } + + ezpublish_rest.input.parser.ContentType: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ContentType.class% + arguments: + - @ezpublish_rest.parser_tools + - @ezpublish.api.service.content_type + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ContentType } + + ezpublish_rest.input.parser.ContentTypeList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ContentTypeList.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ContentTypeList } + + ezpublish_rest.input.parser.ContentTypeGroup: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ContentTypeGroup.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ContentTypeGroup } + + ezpublish_rest.input.parser.ContentTypeGroupList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ContentTypeGroupList.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ContentTypeGroupList } + + ezpublish_rest.input.parser.ContentTypeGroupRefList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ContentTypeGroupRefList.class% + arguments: + - @ezpublish_rest.parser_tools + - @ezpublish.api.service.content_type + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ContentTypeGroupRefList } + + ezpublish_rest.input.parser.ErrorMessage: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ErrorMessage.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ErrorMessage } + + ezpublish_rest.input.parser.FieldDefinition: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.FieldDefinition.class% + arguments: + - @ezpublish_rest.parser_tools + - @ezpublish_rest.field_type_parser + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.FieldDefinition } + + ezpublish_rest.input.parser.FieldDefinitionList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.FieldDefinitionList.class% + arguments: + - @ezpublish_rest.parser_tools + - @ezpublish.api.service.content_type + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.FieldDefinitionList } + + ezpublish_rest.input.parser.Limitation: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.Limitation.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.Limitation } + + ezpublish_rest.input.parser.Location: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.Location.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.Location } + + ezpublish_rest.input.parser.ObjectState: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ObjectState.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ObjectState } + + ezpublish_rest.input.parser.ObjectStateList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ObjectStateList.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ObjectStateList } + + ezpublish_rest.input.parser.ObjectStateGroup: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ObjectStateGroup.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ObjectStateGroup } + + ezpublish_rest.input.parser.ObjectStateGroupList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.ObjectStateGroupList.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.ObjectStateGroupList } + + ezpublish_rest.input.parser.Policy: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.Policy.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.Policy } + + ezpublish_rest.input.parser.PolicyList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.PolicyList.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.PolicyList } + + ezpublish_rest.input.parser.Relation: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.Relation.class% + arguments: + - @ezpublish.api.service.content + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.Relation } + + ezpublish_rest.input.parser.RelationList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.RelationList.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.RelationList } + + ezpublish_rest.input.parser.Role: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.Role.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.Role } + + ezpublish_rest.input.parser.RoleAssignment: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.RoleAssignment.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.RoleAssignment } + + ezpublish_rest.input.parser.RoleAssignmentList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.RoleAssignmentList.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.RoleAssignmentList } + + ezpublish_rest.input.parser.RoleList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.RoleList.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.RoleList } + + ezpublish_rest.input.parser.Section: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.Section.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.Section } + + ezpublish_rest.input.parser.SectionList: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.SectionList.class% + arguments: + - @ezpublish_rest.parser_tools + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.SectionList } + + ezpublish_rest.input.parser.VersionInfo: + parent: ezpublish_rest.input.parser + class: %ezpublish_rest.input.parser.VersionInfo.class% + arguments: + - @ezpublish_rest.parser_tools + - @ezpublish.api.service.content + tags: + - { name: ezpublish_rest.input.parser, mediaType: application/vnd.ez.api.VersionInfo } diff --git a/eZ/Bundle/EzPublishRestBundle/Resources/config/value_object_visitors.yml b/eZ/Bundle/EzPublishRestBundle/Resources/config/value_object_visitors.yml index a341351270f..67297bb89dd 100644 --- a/eZ/Bundle/EzPublishRestBundle/Resources/config/value_object_visitors.yml +++ b/eZ/Bundle/EzPublishRestBundle/Resources/config/value_object_visitors.yml @@ -1,5 +1,6 @@ parameters: ezpublish_rest.output.value_object_visitor.base.class: eZ\Publish\Core\REST\Common\Output\ValueObjectVisitor + ezpublish_rest.output.value_object_visitor.ContentObjectStates.class: eZ\Publish\Core\REST\Common\Output\ValueObjectVisitor\ContentObjectStates # Errors ezpublish_rest.output.value_object_visitor.InvalidArgumentException.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\InvalidArgumentException @@ -15,6 +16,8 @@ parameters: ezpublish_rest.output.value_object_visitor.SectionList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\SectionList ezpublish_rest.output.value_object_visitor.CreatedSection.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\CreatedSection ezpublish_rest.output.value_object_visitor.Section.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\Section + ezpublish_rest.output.value_object_visitor.SectionCreateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\SectionCreateStruct + ezpublish_rest.output.value_object_visitor.SectionUpdateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\SectionUpdateStruct # URLWildcard ezpublish_rest.output.value_object_visitor.URLWildcardList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\URLWildcardList @@ -53,15 +56,19 @@ parameters: # ContentType ezpublish_rest.output.value_object_visitor.RestContentType.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\RestContentType ezpublish_rest.output.value_object_visitor.CreatedContentType.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\CreatedContentType + ezpublish_rest.output.value_object_visitor.ContentTypeCreateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\ContentTypeCreateStruct # Object state - ezpublish_rest.output.value_object_visitor.ContentObjectStates.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\ContentObjectStates ezpublish_rest.output.value_object_visitor.ObjectStateList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\ObjectStateList ezpublish_rest.output.value_object_visitor.CreatedObjectState.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\CreatedObjectState ezpublish_rest.output.value_object_visitor.RestObjectState.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\RestObjectState ezpublish_rest.output.value_object_visitor.ObjectStateGroupList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\ObjectStateGroupList ezpublish_rest.output.value_object_visitor.CreatedObjectStateGroup.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\CreatedObjectStateGroup ezpublish_rest.output.value_object_visitor.ObjectStateGroup.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\ObjectStateGroup + ezpublish_rest.output.value_object_visitor.ObjectStateCreateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\ObjectStateCreateStruct + ezpublish_rest.output.value_object_visitor.ObjectStateUpdateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\ObjectStateUpdateStruct + ezpublish_rest.output.value_object_visitor.ObjectStateGroupCreateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\ObjectStateGroupCreateStruct + ezpublish_rest.output.value_object_visitor.ObjectStateGroupUpdateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\ObjectStateGroupUpdateStruct # View ezpublish_rest.output.value_object_visitor.RestExecutedView.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\RestExecutedView @@ -74,6 +81,8 @@ parameters: ezpublish_rest.output.value_object_visitor.LocationList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\LocationList ezpublish_rest.output.value_object_visitor.RestLocation.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\RestLocation ezpublish_rest.output.value_object_visitor.CreatedLocation.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\CreatedLocation + ezpublish_rest.output.value_object_visitor.LocationCreateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\LocationCreateStruct + ezpublish_rest.output.value_object_visitor.LocationUpdateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\LocationUpdateStruct # Roles ezpublish_rest.output.value_object_visitor.RestUserGroupRoleAssignment.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\RestUserGroupRoleAssignment @@ -85,6 +94,11 @@ parameters: ezpublish_rest.output.value_object_visitor.Role.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\Role ezpublish_rest.output.value_object_visitor.CreatedRole.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\CreatedRole ezpublish_rest.output.value_object_visitor.RoleList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\RoleList + ezpublish_rest.output.value_object_visitor.RoleCreateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\RoleCreateStruct + ezpublish_rest.output.value_object_visitor.RoleUpdateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\RoleUpdateStruct + ezpublish_rest.output.value_object_visitor.RoleAssignment.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\RoleAssignment + ezpublish_rest.output.value_object_visitor.PolicyCreateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\PolicyCreateStruct + ezpublish_rest.output.value_object_visitor.PolicyUpdateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\PolicyUpdateStruct # Relation ezpublish_rest.output.value_object_visitor.CreatedRelation.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\CreatedRelation @@ -95,6 +109,7 @@ parameters: ezpublish_rest.output.value_object_visitor.RestFieldDefinition.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\RestFieldDefinition ezpublish_rest.output.value_object_visitor.CreatedFieldDefinition.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\CreatedFieldDefinition ezpublish_rest.output.value_object_visitor.FieldDefinitionList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\FieldDefinitionList + ezpublish_rest.output.value_object_visitor.FieldDefinitionCreateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\FieldDefinitionCreateStruct # Content Type Group ezpublish_rest.output.value_object_visitor.ContentTypeGroupList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\ContentTypeGroupList @@ -103,6 +118,8 @@ parameters: ezpublish_rest.output.value_object_visitor.ContentTypeInfoList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\ContentTypeInfoList ezpublish_rest.output.value_object_visitor.ContentTypeList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\ContentTypeList ezpublish_rest.output.value_object_visitor.ContentTypeGroupRefList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\ContentTypeGroupRefList + ezpublish_rest.output.value_object_visitor.ContentTypeGroupCreateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\ContentTypeGroupCreateStruct + ezpublish_rest.output.value_object_visitor.ContentTypeGroupUpdateStruct.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\ContentTypeGroupUpdateStruct # HTTP ezpublish_rest.output.value_object_visitor.Conflict.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\Conflict @@ -120,6 +137,9 @@ parameters: # Services ezpublish_rest.output.value_object_visitor.CountryList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\CountryList + # Limitation + ezpublish_rest.output.value_object_visitor.Limitation.class: eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor\Limitation + services: ezpublish_rest.output.value_object_visitor.base: class: %ezpublish_rest.output.value_object_visitor.base.class% @@ -206,6 +226,18 @@ services: tags: - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\Content\Section } + ezpublish_rest.output.value_object_visitor.SectionCreateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.SectionCreateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\Content\SectionCreateStruct } + + ezpublish_rest.output.value_object_visitor.SectionUpdateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.SectionUpdateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\Content\SectionUpdateStruct } + # URLWildcard ezpublish_rest.output.value_object_visitor.URLWildcardList: parent: ezpublish_rest.output.value_object_visitor.base @@ -400,6 +432,12 @@ services: tags: - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\Core\REST\Server\Values\ContentTypeGroupList } + ezpublish_rest.output.value_object_visitor.ContentTypeGroupCreateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.contenttypegroupcreatestruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroupCreateStruct } + ezpublish_rest.output.value_object_visitor.ContentTypeGroupRefList: parent: ezpublish_rest.output.value_object_visitor.base class: %ezpublish_rest.output.value_object_visitor.ContentTypeGroupRefList.class% @@ -426,6 +464,32 @@ services: tags: - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\Core\REST\Server\Values\RestFieldDefinition } + ezpublish_rest.output.value_object_visitor.FieldDefinitionCreateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.FieldDefinitionCreateStruct.class% + arguments: + - @ezpublish_rest.field_type_serializer + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\Core\REST\Server\Values\FieldDefinitionCreateStruct } + + ezpublish_rest.output.value_object_visitor.ContentTypeCreateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.ContentTypeCreateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\Core\REST\Client\Values\ContentType\ContentTypeCreateStruct } + + ezpublish_rest.output.value_object_visitor.ContentTypeGroupCreateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.ContentTypeGroupCreateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroupCreateStruct } + + ezpublish_rest.output.value_object_visitor.ContentTypeGroupUpdateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.ContentTypeGroupUpdateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroupUpdateStruct } + # Relation ezpublish_rest.output.value_object_visitor.RelationList: parent: ezpublish_rest.output.value_object_visitor.base @@ -500,6 +564,42 @@ services: tags: - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\Core\REST\Server\Values\RestUserGroupRoleAssignment } + ezpublish_rest.output.value_object_visitor.RoleCreateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.RoleCreateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\REST\Client\Values\User\RoleCreateStruct } + + ezpublish_rest.output.value_object_visitor.RoleUpdateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.RoleUpdateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\REST\Client\Values\User\RoleUpdateStruct } + + ezpublish_rest.output.value_object_visitor.RoleAssignment: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.RoleAssignment.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\REST\Client\Values\User\RoleAssignment } + + ezpublish_rest.output.value_object_visitor.PolicyCreateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.PolicyCreateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\REST\Client\Values\User\PolicyCreateStruct } + + ezpublish_rest.output.value_object_visitor.PolicyUpdateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.PolicyUpdateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\REST\Client\Values\User\PolicyUpdateStruct } + + ezpublish_rest.output.value_object_visitor.Limitation: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.Limitation.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\User\Limitation } + # Location ezpublish_rest.output.value_object_visitor.CreatedLocation: parent: ezpublish_rest.output.value_object_visitor.base @@ -519,6 +619,18 @@ services: tags: - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\Core\REST\Server\Values\LocationList } + ezpublish_rest.output.value_object_visitor.LocationCreateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.LocationCreateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\Content\LocationCreateStruct } + + ezpublish_rest.output.value_object_visitor.LocationUpdateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.LocationUpdateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct } + # Trash ezpublish_rest.output.value_object_visitor.Trash: parent: ezpublish_rest.output.value_object_visitor.base @@ -583,6 +695,30 @@ services: tags: - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\Core\REST\Common\Values\ContentObjectStates } + ezpublish_rest.output.value_object_visitor.ObjectStateCreateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.ObjectStateCreateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\ObjectState\ObjectStateCreateStruct } + + ezpublish_rest.output.value_object_visitor.ObjectStateUpdateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.ObjectStateUpdateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\ObjectState\ObjectStateUpdateStruct } + + ezpublish_rest.output.value_object_visitor.ObjectStateGroupCreateStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.ObjectStateGroupCreateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupCreateStruct } + + ezpublish_rest.output.value_object_visitor.ObjectStateGroupUpdataStruct: + parent: ezpublish_rest.output.value_object_visitor.base + class: %ezpublish_rest.output.value_object_visitor.ObjectStateGroupUpdateStruct.class% + tags: + - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupUpdataStruct } + # Services ezpublish_rest.output.value_object_visitor.CountryList: parent: ezpublish_rest.output.value_object_visitor.base diff --git a/eZ/Publish/Core/REST/Client/Input/Parser/Content.php b/eZ/Publish/Core/REST/Client/Input/Parser/Content.php index b32a625995c..f92eb152863 100644 --- a/eZ/Publish/Core/REST/Client/Input/Parser/Content.php +++ b/eZ/Publish/Core/REST/Client/Input/Parser/Content.php @@ -10,7 +10,7 @@ namespace eZ\Publish\Core\REST\Client\Input\Parser; use eZ\Publish\Core\REST\Common\Input\ParserTools; -use eZ\Publish\Core\REST\Client\ContentService; +use eZ\Publish\API\Repository\ContentService; use eZ\Publish\Core\REST\Common\Input\BaseParser; use eZ\Publish\Core\REST\Common\Input\FieldTypeParser; use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher; @@ -38,7 +38,7 @@ class Content extends BaseParser protected $parserTools; /** - * @var \eZ\Publish\Core\REST\Client\ContentService + * @var \eZ\Publish\API\Repository\ContentService */ protected $contentService; @@ -49,7 +49,7 @@ class Content extends BaseParser /** * @param \eZ\Publish\Core\REST\Common\Input\ParserTools $parserTools - * @param \eZ\Publish\Core\REST\Client\ContentService $contentService + * @param \eZ\Publish\API\Repository\ContentService $contentService * @param \eZ\Publish\Core\REST\Client\Input\Parser\VersionInfo $versionInfoParser * @param \eZ\Publish\Core\REST\Common\Input\FieldTypeParser $fieldTypeParser */ diff --git a/eZ/Publish/Core/REST/Client/Input/Parser/ContentInfo.php b/eZ/Publish/Core/REST/Client/Input/Parser/ContentInfo.php index d59a9ed205d..f275c7f138c 100644 --- a/eZ/Publish/Core/REST/Client/Input/Parser/ContentInfo.php +++ b/eZ/Publish/Core/REST/Client/Input/Parser/ContentInfo.php @@ -10,10 +10,10 @@ namespace eZ\Publish\Core\REST\Client\Input\Parser; use eZ\Publish\Core\REST\Common\Input\ParserTools; -use eZ\Publish\Core\REST\Client\ContentTypeService; use eZ\Publish\Core\REST\Common\Input\BaseParser; use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher; use eZ\Publish\Core\REST\Client\Values; +use eZ\Publish\API\Repository\ContentTypeService; /** * Parser for ContentInfo @@ -26,13 +26,13 @@ class ContentInfo extends BaseParser protected $parserTools; /** - * @var \eZ\Publish\Core\REST\Client\ContentTypeService + * @var \eZ\Publish\API\Repository\ContentTypeService */ protected $contentTypeService; /** * @param \eZ\Publish\Core\REST\Common\Input\ParserTools $parserTools - * @param \eZ\Publish\Core\REST\Client\ContentTypeService $contentTypeService + * @param \eZ\Publish\API\Repository\ContentTypeService $contentTypeService */ public function __construct( ParserTools $parserTools, ContentTypeService $contentTypeService ) { diff --git a/eZ/Publish/Core/REST/Client/Input/Parser/ContentObjectStates.php b/eZ/Publish/Core/REST/Client/Input/Parser/ContentObjectStates.php deleted file mode 100644 index 317da6fe9cb..00000000000 --- a/eZ/Publish/Core/REST/Client/Input/Parser/ContentObjectStates.php +++ /dev/null @@ -1,42 +0,0 @@ -parse( - $rawStateData, - $rawStateData['_media-type'] - ); - } - return $states; - } -} diff --git a/eZ/Publish/Core/REST/Client/Input/Parser/ContentType.php b/eZ/Publish/Core/REST/Client/Input/Parser/ContentType.php index 8fb61760b8b..10aae4b9cd5 100644 --- a/eZ/Publish/Core/REST/Client/Input/Parser/ContentType.php +++ b/eZ/Publish/Core/REST/Client/Input/Parser/ContentType.php @@ -10,10 +10,10 @@ namespace eZ\Publish\Core\REST\Client\Input\Parser; use eZ\Publish\Core\REST\Common\Input\ParserTools; -use eZ\Publish\Core\REST\Client\ContentTypeService; use eZ\Publish\Core\REST\Common\Input\BaseParser; use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher; use eZ\Publish\Core\REST\Client\Values; +use eZ\Publish\API\Repository\ContentTypeService; /** * Parser for ContentType @@ -26,13 +26,13 @@ class ContentType extends BaseParser protected $parserTools; /** - * @var \eZ\Publish\Core\REST\Client\ContentTypeService + * @var \eZ\Publish\API\Repository\ContentTypeService */ protected $contentTypeService; /** * @param \eZ\Publish\Core\REST\Common\Input\ParserTools $parserTools - * @param \eZ\Publish\Core\REST\Client\ContentTypeService $contentTypeService + * @param \eZ\Publish\API\Repository\ContentTypeService $contentTypeService */ public function __construct( ParserTools $parserTools, ContentTypeService $contentTypeService ) { diff --git a/eZ/Publish/Core/REST/Client/Input/Parser/ContentTypeGroupRefList.php b/eZ/Publish/Core/REST/Client/Input/Parser/ContentTypeGroupRefList.php index 9cfea14e673..490d84071e7 100644 --- a/eZ/Publish/Core/REST/Client/Input/Parser/ContentTypeGroupRefList.php +++ b/eZ/Publish/Core/REST/Client/Input/Parser/ContentTypeGroupRefList.php @@ -10,10 +10,10 @@ namespace eZ\Publish\Core\REST\Client\Input\Parser; use eZ\Publish\Core\REST\Common\Input\ParserTools; -use eZ\Publish\Core\REST\Client\ContentTypeService; use eZ\Publish\Core\REST\Common\Input\BaseParser; use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher; use eZ\Publish\Core\REST\Client\Values; +use eZ\Publish\API\Repository\ContentTypeService; /** * Parser for ContentTypeGroupRefList @@ -26,13 +26,13 @@ class ContentTypeGroupRefList extends BaseParser protected $parserTools; /** - * @var \eZ\Publish\Core\REST\Client\ContentTypeService + * @var \eZ\Publish\API\Repository\ContentTypeService */ protected $contentTypeService; /** * @param ParserTools $parserTools - * @param \eZ\Publish\Core\REST\Client\ContentTypeService $contentTypeService + * @param \eZ\Publish\API\Repository\ContentTypeService $contentTypeService */ public function __construct( ParserTools $parserTools, ContentTypeService $contentTypeService ) { diff --git a/eZ/Publish/Core/REST/Client/Input/Parser/ErrorMessage.php b/eZ/Publish/Core/REST/Client/Input/Parser/ErrorMessage.php index a439b3d0fe4..39a8f56866b 100644 --- a/eZ/Publish/Core/REST/Client/Input/Parser/ErrorMessage.php +++ b/eZ/Publish/Core/REST/Client/Input/Parser/ErrorMessage.php @@ -6,6 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 * @version //autogentag// */ + namespace eZ\Publish\Core\REST\Client\Input\Parser; use eZ\Publish\Core\REST\Common\Input\BaseParser; diff --git a/eZ/Publish/Core/REST/Client/Input/Parser/FieldDefinitionList.php b/eZ/Publish/Core/REST/Client/Input/Parser/FieldDefinitionList.php index 3f68b784b81..8ba58089c25 100644 --- a/eZ/Publish/Core/REST/Client/Input/Parser/FieldDefinitionList.php +++ b/eZ/Publish/Core/REST/Client/Input/Parser/FieldDefinitionList.php @@ -10,10 +10,10 @@ namespace eZ\Publish\Core\REST\Client\Input\Parser; use eZ\Publish\Core\REST\Common\Input\ParserTools; -use eZ\Publish\Core\REST\Client\ContentTypeService; use eZ\Publish\Core\REST\Common\Input\BaseParser; use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher; use eZ\Publish\Core\REST\Client\Values; +use eZ\Publish\API\Repository\ContentTypeService; /** * Parser for FieldDefinitionList @@ -26,13 +26,13 @@ class FieldDefinitionList extends BaseParser protected $parserTools; /** - * @var \eZ\Publish\Core\REST\Client\ContentTypeService + * @var \eZ\Publish\API\Repository\ContentTypeService */ protected $contentTypeService; /** * @param \eZ\Publish\Core\REST\Common\Input\ParserTools $parserTools - * @param \eZ\Publish\Core\REST\Client\ContentTypeService $contentTypeService + * @param \eZ\Publish\API\Repository\ContentTypeService $contentTypeService */ public function __construct( ParserTools $parserTools, ContentTypeService $contentTypeService ) { diff --git a/eZ/Publish/Core/REST/Client/Input/Parser/Relation.php b/eZ/Publish/Core/REST/Client/Input/Parser/Relation.php index 56c55d22d3f..390f8939b08 100644 --- a/eZ/Publish/Core/REST/Client/Input/Parser/Relation.php +++ b/eZ/Publish/Core/REST/Client/Input/Parser/Relation.php @@ -12,7 +12,7 @@ use eZ\Publish\Core\REST\Common\Input\BaseParser; use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher; use eZ\Publish\Core\REST\Client\Values; -use eZ\Publish\Core\REST\Client\ContentService; +use eZ\Publish\API\Repository\ContentService; /** * Parser for Relation @@ -27,7 +27,7 @@ class Relation extends BaseParser protected $contentService; /** - * @param \eZ\Publish\Core\REST\Input\ContentService $contentService + * @param \eZ\Publish\API\Repository\ContentService $contentService */ public function __construct( ContentService $contentService ) { diff --git a/eZ/Publish/Core/REST/Client/Input/Parser/Role.php b/eZ/Publish/Core/REST/Client/Input/Parser/Role.php index 8c0c5f4ece8..3997768ec5c 100644 --- a/eZ/Publish/Core/REST/Client/Input/Parser/Role.php +++ b/eZ/Publish/Core/REST/Client/Input/Parser/Role.php @@ -11,7 +11,6 @@ use eZ\Publish\Core\REST\Common\Input\BaseParser; use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher; - use eZ\Publish\Core\REST\Client; /** diff --git a/eZ/Publish/Core/REST/Client/Input/Parser/RoleAssignment.php b/eZ/Publish/Core/REST/Client/Input/Parser/RoleAssignment.php index a72ffe82087..c2650e1e2d2 100644 --- a/eZ/Publish/Core/REST/Client/Input/Parser/RoleAssignment.php +++ b/eZ/Publish/Core/REST/Client/Input/Parser/RoleAssignment.php @@ -12,7 +12,6 @@ use eZ\Publish\Core\REST\Common\Input\BaseParser; use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher; use eZ\Publish\API\Repository\Values\User\Limitation as APILimitation; - use eZ\Publish\Core\REST\Client; /** diff --git a/eZ/Publish/Core/REST/Client/Input/Parser/VersionInfo.php b/eZ/Publish/Core/REST/Client/Input/Parser/VersionInfo.php index 4db9851e817..570726b13fd 100644 --- a/eZ/Publish/Core/REST/Client/Input/Parser/VersionInfo.php +++ b/eZ/Publish/Core/REST/Client/Input/Parser/VersionInfo.php @@ -13,7 +13,7 @@ use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher; use eZ\Publish\Core\REST\Common\Input\ParserTools; use eZ\Publish\Core\REST\Client\Values; -use eZ\Publish\Core\REST\Client\ContentService; +use eZ\Publish\API\Repository\ContentService; /** * Parser for VersionInfo @@ -34,7 +34,7 @@ class VersionInfo extends BaseParser /** * @param \eZ\Publish\Core\REST\Common\Input\ParserTools $parserTools - * @param \eZ\Publish\Core\REST\Client\ContentService $contentService + * @param \eZ\Publish\API\Repository\ContentService $contentService */ public function __construct( ParserTools $parserTools, ContentService $contentService ) { diff --git a/eZ/Publish/Core/REST/Client/Output/ValueObjectVisitor/FieldDefinitionCreateStruct.php b/eZ/Publish/Core/REST/Client/Output/ValueObjectVisitor/FieldDefinitionCreateStruct.php index a03c9b4c925..23bb0751c81 100644 --- a/eZ/Publish/Core/REST/Client/Output/ValueObjectVisitor/FieldDefinitionCreateStruct.php +++ b/eZ/Publish/Core/REST/Client/Output/ValueObjectVisitor/FieldDefinitionCreateStruct.php @@ -9,7 +9,6 @@ namespace eZ\Publish\Core\REST\Client\Output\ValueObjectVisitor; -use eZ\Publish\Core\REST\Common\RequestParser; use eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer; use eZ\Publish\Core\REST\Common\Output\ValueObjectVisitor; use eZ\Publish\Core\REST\Common\Output\Generator; @@ -29,9 +28,8 @@ class FieldDefinitionCreateStruct extends ValueObjectVisitor * @param \eZ\Publish\Core\REST\Common\RequestParser $requestParser * @param \eZ\Publish\Core\REST\Common\Output\FieldTypeSerializer $fieldTypeSerializer */ - public function __construct( RequestParser $requestParser, FieldTypeSerializer $fieldTypeSerializer ) + public function __construct( FieldTypeSerializer $fieldTypeSerializer ) { - parent::__construct( $requestParser ); $this->fieldTypeSerializer = $fieldTypeSerializer; } diff --git a/eZ/Publish/Core/REST/Client/Output/ValueObjectVisitor/SectionIncludingContentMetadataUpdateStruct.php b/eZ/Publish/Core/REST/Client/Output/ValueObjectVisitor/SectionIncludingContentMetadataUpdateStruct.php deleted file mode 100644 index d2a04fa3a38..00000000000 --- a/eZ/Publish/Core/REST/Client/Output/ValueObjectVisitor/SectionIncludingContentMetadataUpdateStruct.php +++ /dev/null @@ -1,60 +0,0 @@ -startObjectElement( 'ContentUpdate' ); - $visitor->setHeader( 'Content-Type', $generator->getMediaType( 'ContentUpdate' ) ); - - $generator->startObjectElement( 'Section' ); - - if ( $data->sectionId !== null ) - { - $generator->startAttribute( - 'href', - $data->sectionId - ); - $generator->endAttribute( 'href' ); - } - $generator->endObjectElement( 'Section' ); - - $generator->startObjectElement( 'Owner', 'User' ); - if ( $data->ownerId !== null ) - { - $generator->startAttribute( - 'href', - $data->ownerId - ); - $generator->endAttribute( 'href' ); - } - $generator->endObjectElement( 'Owner' ); - - // @todo: Add missing elements - - $generator->endObjectElement( 'ContentUpdate' ); - } -} diff --git a/eZ/Publish/Core/REST/Server/Input/Parser/ContentObjectStates.php b/eZ/Publish/Core/REST/Common/Input/Parser/ContentObjectStates.php similarity index 97% rename from eZ/Publish/Core/REST/Server/Input/Parser/ContentObjectStates.php rename to eZ/Publish/Core/REST/Common/Input/Parser/ContentObjectStates.php index 3c15f4d48b4..ce16633b660 100644 --- a/eZ/Publish/Core/REST/Server/Input/Parser/ContentObjectStates.php +++ b/eZ/Publish/Core/REST/Common/Input/Parser/ContentObjectStates.php @@ -7,7 +7,7 @@ * @version //autogentag// */ -namespace eZ\Publish\Core\REST\Server\Input\Parser; +namespace eZ\Publish\Core\REST\Common\Input\Parser; use eZ\Publish\Core\REST\Common\Input\BaseParser; use eZ\Publish\Core\REST\Common\Input\ParsingDispatcher; diff --git a/eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/ContentObjectStates.php b/eZ/Publish/Core/REST/Common/Output/ValueObjectVisitor/ContentObjectStates.php similarity index 96% rename from eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/ContentObjectStates.php rename to eZ/Publish/Core/REST/Common/Output/ValueObjectVisitor/ContentObjectStates.php index 271f6a176b4..f19a85c0df3 100644 --- a/eZ/Publish/Core/REST/Server/Output/ValueObjectVisitor/ContentObjectStates.php +++ b/eZ/Publish/Core/REST/Common/Output/ValueObjectVisitor/ContentObjectStates.php @@ -7,7 +7,7 @@ * @version //autogentag// */ -namespace eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor; +namespace eZ\Publish\Core\REST\Common\Output\ValueObjectVisitor; use eZ\Publish\Core\REST\Common\Output\ValueObjectVisitor; use eZ\Publish\Core\REST\Common\Output\Generator; diff --git a/eZ/Publish/Core/REST/Server/Tests/Input/Parser/ContentObjectStatesTest.php b/eZ/Publish/Core/REST/Server/Tests/Input/Parser/ContentObjectStatesTest.php index 6e69c3d02dc..92cdfe77781 100644 --- a/eZ/Publish/Core/REST/Server/Tests/Input/Parser/ContentObjectStatesTest.php +++ b/eZ/Publish/Core/REST/Server/Tests/Input/Parser/ContentObjectStatesTest.php @@ -9,7 +9,7 @@ namespace eZ\Publish\Core\REST\Server\Tests\Input\Parser; -use eZ\Publish\Core\REST\Server\Input\Parser; +use eZ\Publish\Core\REST\Common\Input\Parser; class ContentObjectStatesTest extends BaseTest { @@ -97,7 +97,7 @@ public function getParseHrefExpectationsMap() /** * Gets the ContentObjectStates parser * - * @return \eZ\Publish\Core\REST\Server\Input\Parser\ContentObjectStates; + * @return \eZ\Publish\Core\REST\Common\Input\Parser\ContentObjectStates; */ protected function internalGetParser() { diff --git a/eZ/Publish/Core/REST/Server/Tests/Output/ValueObjectVisitor/ContentObjectStatesTest.php b/eZ/Publish/Core/REST/Server/Tests/Output/ValueObjectVisitor/ContentObjectStatesTest.php index f37a0e16e08..acb83e8e9e3 100644 --- a/eZ/Publish/Core/REST/Server/Tests/Output/ValueObjectVisitor/ContentObjectStatesTest.php +++ b/eZ/Publish/Core/REST/Server/Tests/Output/ValueObjectVisitor/ContentObjectStatesTest.php @@ -11,7 +11,7 @@ use eZ\Publish\Core\REST\Common\Tests\Output\ValueObjectVisitorBaseTest; -use eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor; +use eZ\Publish\Core\REST\Common\Output\ValueObjectVisitor; use eZ\Publish\Core\REST\Common\Values\ContentObjectStates; use eZ\Publish\Core\REST\Common;