services:
    csv_responder_view_listener:
        class: PartKeepr\ExportBundle\EventListener\CsvResponderViewListener
        tags:
            - { name: "kernel.event_listener", event: "kernel.view", method: "onKernelView" }

    xlsx_responder_view_listener:
        class: PartKeepr\ExportBundle\EventListener\XmlExcelResponderViewListener
        tags:
            - { name: "kernel.event_listener", event: "kernel.view", method: "onKernelView" }

    part_image_listener:
        class: PartKeepr\PartBundle\Listeners\ImageAttachmentListener
        arguments:
            - "@partkeepr_image_service"
        tags:
            - { name: doctrine.event_listener, event: postLoad }

    partkeepr_legacy_user_provider:
        class: PartKeepr\AuthBundle\Security\User\LegacyUserProvider
        arguments:
            - "@doctrine.orm.default_entity_manager"

    footprint.category_path_listener:
        class: PartKeepr\FootprintBundle\Listeners\CategoryPathListener
        arguments:
            - "@service_container"
        tags:
            - { name: doctrine.event_listener, event: onFlush }

    storage_location.category_path_listener:
        class: PartKeepr\StorageLocationBundle\Listeners\CategoryPathListener
        arguments:
            - "@service_container"
        tags:
            - { name: doctrine.event_listener, event: onFlush }

    part.category_path_listener:
        class: PartKeepr\PartBundle\Listeners\CategoryPathListener
        arguments:
            - "@service_container"
        tags:
            - { name: doctrine.event_listener, event: onFlush }

    part.stock_level_listener:
        class: PartKeepr\PartBundle\Listeners\StockLevelListener
        arguments:
            - "@service_container"
        tags:
            - { name: doctrine.event_listener, event: onFlush }

    footprint_category.root_category_listener:
        class: PartKeepr\CategoryBundle\EventListener\RootCategoryListener
        arguments:
            - "@service_container"
            - "partkeepr.footprint.category_service"
        tags:
            - { name: doctrine.event_listener, event: onFlush }

    part_category.root_category_listener:
        class: PartKeepr\CategoryBundle\EventListener\RootCategoryListener
        arguments:
            - "@service_container"
            - "partkeepr.part.category_service"
        tags:
            - { name: doctrine.event_listener, event: onFlush }

    storage_location_category.root_category_listener:
        class: PartKeepr\CategoryBundle\EventListener\RootCategoryListener
        arguments:
            - "@service_container"
            - "partkeepr.storage_location.category_service"
        tags:
            - { name: doctrine.event_listener, event: onFlush }

    file_removal_listener:
        class:    PartKeepr\UploadedFileBundle\EventListener\FileRemovalListener
        arguments:
            - "@partkeepr_uploadedfile_service"
            - "@annotation_reader"
            - "@property_accessor"
        tags:
            - { name: doctrine.event_listener, event: onFlush }

    temporary_file_listener:
        class:    PartKeepr\UploadedFileBundle\EventListener\TemporaryFileEventListener
        arguments:
            - "@partkeepr_uploadedfile_service"
            - "@partkeepr_image_service"
            - "@annotation_reader"
            - "@property_accessor"
            - "@api.iri_converter"
        tags:  [ { name: "kernel.event_listener", event: "kernel.view", method: "replaceTemporaryFile", priority: 100 } ]

    resource.distributor:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\DistributorBundle\Entity\Distributor" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.footprint:
        parent:    "api.resource"
        arguments: [ "PartKeepr\FootprintBundle\Entity\Footprint" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.batchjob.item_operation.execute:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.batchjob"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/batch_jobs/{id}/execute"           # Path
             -    "partkeepr.batchjob.execute"         # Controller
             -    "BatchJobExecute"                 # Route name

    resource.batchjob:
        parent:    "api.resource"
        arguments: [ 'PartKeepr\BatchJobBundle\Entity\BatchJob' ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.batchjob.item_operation.get", "@resource.batchjob.item_operation.put", "@resource.batchjob.item_operation.delete", "@resource.batchjob.item_operation.execute" ] ]





    resource.batchjob_queryfield:
        parent:    "api.resource"
        arguments: [ 'PartKeepr\BatchJobBundle\Entity\BatchJobQueryField' ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.batchjob_updatefield:
        parent:    "api.resource"
        arguments: [ 'PartKeepr\BatchJobBundle\Entity\BatchJobUpdateField' ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }


    resource.footprint_image.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.footprint_image", "GET" ]

    resource.footprint_image.item_operation.custom_get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.footprint_image"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/footprint_images/{id}/getImage"           # Path
             -    "PartKeeprFootprintBundle:FootprintImage:getImage"         # Controller
             -    "FootprintImageGetImage"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.footprint_image:
        parent:    "api.resource"
        arguments: [ "PartKeepr\FootprintBundle\Entity\FootprintImage" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.footprint_image.item_operation.get", "@resource.footprint_image.item_operation.custom_get" ] ]
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.footprint_attachment.item_operation.custom_get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.footprint_attachment"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/footprint_attachments/{id}/getFile"           # Path
             -    "PartKeeprFootprintBundle:FootprintAttachment:getFile"         # Controller
             -    "FootprintAttachmentGet"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.footprint_attachment.item_operation.custom_get_mime:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.footprint_attachment"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/footprint_attachments/{id}/getMimeTypeIcon"           # Path
             -    "PartKeeprFootprintBundle:FootprintAttachment:getMimeTypeIcon"         # Controller
             -    "FootprintAttachmentMimeTypeIcon"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.footprint_attachment.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.footprint_attachment", "GET" ]

    resource.footprint_attachment:
        parent:    "api.resource"
        arguments: [ "PartKeepr\FootprintBundle\Entity\FootprintAttachment" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.footprint_attachment.item_operation.get", "@resource.footprint_attachment.item_operation.custom_get", "@resource.footprint_attachment.item_operation.custom_get_mime"  ] ]
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.footprint_category.item_operation.move:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.footprint_category"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/footprint_categories/{id}/move"           # Path
             -    "partkeepr.category.move"         # Controller
             -    "FootprintCategoryMove"                 # Route name

    resource.footprint_category.collection_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments: [ "@resource.footprint_category", "GET" ]

    resource.footprint_category.collection_operation.get_root:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments:
             -    "@resource.footprint_category"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/footprint_categories/getExtJSRootNode"           # Path
             -    "partkeepr.category.get_root_node"         # Controller
             -    "PartKeeprFootprintCategoryGetRootNode"

    resource.footprint_category.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.footprint_category", "GET" ]

    resource.footprint_category.item_operation.put:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.footprint_category", "PUT" ]

    resource.footprint_category.item_operation.delete:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.footprint_category", "DELETE" ]

    resource.footprint_category:
        parent:    "api.resource"
        arguments: [ "PartKeepr\FootprintBundle\Entity\FootprintCategory" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initCollectionOperations"
                    arguments: [ [ "@resource.footprint_category.collection_operation.get", "@resource.footprint_category.collection_operation.get_root", "@resource.footprint_category.collection_operation.post" ] ]
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.footprint_category.item_operation.get", "@resource.footprint_category.item_operation.put", "@resource.footprint_category.item_operation.delete", "@resource.footprint_category.item_operation.move" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default", "tree" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default", "tree" ] }

    resource.import_preset:
        parent:    "api.resource"
        arguments: [ "PartKeepr\ImportBundle\Entity\ImportPreset" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.grid_preset.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.grid_preset", "GET" ]

    resource.grid_preset.item_operation.put:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.grid_preset", "PUT" ]

    resource.grid_preset.item_operation.delete:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.grid_preset", "DELETE" ]

    resource.grid_preset.item_operation.markAsDefault:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.grid_preset"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/grid_presets/{id}/markAsDefault"           # Path
             -    "partkeepr.grid_preset.mark_as_default"         # Controller
             -    "MarkGridPresetAsDefault"                 # Route name

    resource.grid_preset:
        parent:    "api.resource"
        arguments: [ "PartKeepr\FrontendBundle\Entity\GridPreset" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.grid_preset.item_operation.get", "@resource.grid_preset.item_operation.put", "@resource.grid_preset.item_operation.delete", "@resource.grid_preset.item_operation.markAsDefault" ] ]
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.part.collection_operation.custom_post:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments:
            -   "@resource.part"
            -   [ "POST" ]
            -   "/parts"
            -   "partkeepr.part.post"
            -   "PartPost"

    resource.part.collection_operation.custom_get:
            class:     "Dunglas\ApiBundle\Api\Operation\Operation"
            public:    false
            factory:   [ "@api.operation_factory", "createCollectionOperation" ]
            arguments:
              - "@resource.part"
              - [ "GET" ]
              - "/parts"
              - "partkeepr.parts.collection_get"
              - "PartsGet"

    resource.part.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.part", "GET" ]

    resource.part.item_operation.custom_put:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
              -   "@resource.part"
              -   [ "PUT" ]
              -   "/parts/{id}"
              -   "partkeepr.part.put"
              -   "PartPut"


    resource.part.item_operation.delete:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.part", "DELETE" ]

    resource.part.item_operation.add_stock:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.part"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/parts/{id}/addStock"           # Path
             -    "partkeepr.part.add_stock"         # Controller
             -    "PartAddStock"                 # Route name

    resource.part.item_operation.remove_stock:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.part"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/parts/{id}/removeStock"           # Path
             -    "partkeepr.part.remove_stock"         # Controller
             -    "PartRemoveStock"                 # Route name

    resource.part.item_operation.set_stock:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.part"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/parts/{id}/setStock"           # Path
             -    "partkeepr.part.set_stock"         # Controller
             -    "PartSetStock"                 # Route name

    resource.part:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\PartBundle\\Entity\\Part" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.part.item_operation.get", "@resource.part.item_operation.custom_put", "@resource.part.item_operation.delete", "@resource.part.item_operation.add_stock", "@resource.part.item_operation.remove_stock", "@resource.part.item_operation.set_stock" ] ]
            -       method:     "initCollectionOperations"
                    arguments: [ [ "@resource.part.collection_operation.custom_get", "@resource.part.collection_operation.custom_post" ] ]
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default", "readonly" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default", "stock" ] }

    resource.part_attachment.item_operation.custom_get_image:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.part_attachment"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/part_attachments/{id}/getImage"           # Path
             -    "PartKeeprPartBundle:PartAttachment:getImage"         # Controller
             -    "PartAttachmentGetImage"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.part_attachment.item_operation.custom_get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.part_attachment"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/part_attachments/{id}/getFile"           # Path
             -    "PartKeeprPartBundle:PartAttachment:getFile"         # Controller
             -    "PartAttachmentGet"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.part_attachment.item_operation.custom_get_mime:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.part_attachment"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/part_attachments/{id}/getMimeTypeIcon"           # Path
             -    "PartKeeprPartBundle:PartAttachment:getMimeTypeIcon"         # Controller
             -    "PartAttachmentMimeTypeIcon"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.part_attachment.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.part_attachment", "GET" ]

    resource.part_attachment:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\PartBundle\\Entity\\PartAttachment" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.part_attachment.item_operation.get", "@resource.part_attachment.item_operation.custom_get", "@resource.part_attachment.item_operation.custom_get_mime", "@resource.part_attachment.item_operation.custom_get_image"  ] ]
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.part_category.item_operation.move:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.part_category"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/part_categories/{id}/move"           # Path
             -    "partkeepr.category.move"         # Controller
             -    "PartKeeprPartCategoryMove"

    resource.part_category.collection_operation.get_root:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments:
             -    "@resource.part_category"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/part_categories/getExtJSRootNode"           # Path
             -    "partkeepr.category.get_root_node"         # Controller
             -    "PartKeeprPartCategoryGetRootNode"

    resource.part_category.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.part_category", "GET" ]

    resource.part_category.item_operation.put:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.part_category", "PUT" ]

    resource.part_category.item_operation.delete:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.part_category", "DELETE" ]

    resource.part_category:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\PartBundle\Entity\\PartCategory" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initCollectionOperations"
                    arguments: [ [ "@resource.part_category.collection_operation.get", "@resource.part_category.collection_operation.get_root", "@resource.part_category.collection_operation.post" ] ]
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.part_category.item_operation.get", "@resource.part_category.item_operation.put", "@resource.part_category.item_operation.delete", "@resource.part_category.item_operation.move" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default", "tree" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default", "tree" ] }

    resource.part_distributor:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\PartBundle\\Entity\\PartDistributor" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.part_manufacturer:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\PartBundle\\Entity\\PartManufacturer" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.part_parameter:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\PartBundle\\Entity\\PartParameter" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.meta_part_parameter_criteria:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\PartBundle\\Entity\\MetaPartParameterCriteria" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.manufacturer:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\ManufacturerBundle\\Entity\\Manufacturer" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.manufacturer_ic_logo.item_operation.custom_get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.manufacturer_ic_logo"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/manufacturer_i_c_logos/{id}/getImage"           # Path
             -    "PartKeeprManufacturerBundle:ManufacturerIcLogo:getImage"         # Controller
             -    "ManufacturerIcLogoGetImage"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.manufacturer_ic_logo.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.manufacturer_ic_logo", "GET" ]

    resource.manufacturer_ic_logo.item_operation.put:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.manufacturer_ic_logo", "PUT" ]

    resource.manufacturer_ic_logo:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\ManufacturerBundle\Entity\ManufacturerICLogo" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.manufacturer_ic_logo.item_operation.get", "@resource.manufacturer_ic_logo.item_operation.put", "@resource.manufacturer_ic_logo.item_operation.custom_get"  ] ]
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.partmeasurementunit.item_operation.custom_put:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.partmeasurementunit"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/part_measurement_units/{id}/setDefault"           # Path
             -    "partkeepr.part_measurement_unit.set_default"         # Controller
             -    "PartMeasurementUnitSetDefault"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.partmeasurementunit.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.partmeasurementunit", "GET" ]

    resource.partmeasurementunit.item_operation.put:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.partmeasurementunit", "PUT" ]

    resource.partmeasurementunit:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\PartBundle\\Entity\\PartMeasurementUnit" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.partmeasurementunit.item_operation.custom_put", "@resource.partmeasurementunit.item_operation.get", "@resource.partmeasurementunit.item_operation.put"  ] ]
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }


    resource.unit:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\UnitBundle\\Entity\\Unit" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.siprefix:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\SiPrefixBundle\\Entity\\SiPrefix" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

# ######################## Storage Location Categories######################################
    resource.storage_location:
        parent:    "api.resource"
        arguments: [ "PartKeepr\StorageLocationBundle\Entity\StorageLocation" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.stock_entry:
        parent:    "api.resource"
        arguments: [ "PartKeepr\StockBundle\Entity\StockEntry" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

# ######################## Storage Location Categories######################################

    resource.storage_location_category.item_operation.move:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.storage_location_category"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/storage_location_categories/{id}/move"           # Path
             -    "partkeepr.category.move"         # Controller
             -    "StorageLocationCategoryMove"                 # Route name

    resource.storage_location_category.collection_operation.get_root:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments:
             -    "@resource.storage_location_category"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/storage_location_categories/getExtJSRootNode"           # Path
             -    "partkeepr.category.get_root_node"         # Controller
             -    "StorageLocationCategoryGetRoot"                 # Route name

    resource.storage_location_category.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.storage_location_category", "GET" ]

    resource.storage_location_category.item_operation.put:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.storage_location_category", "PUT" ]

    resource.storage_location_category.item_operation.delete:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.storage_location_category", "DELETE" ]

    resource.storage_location_category.collection_operation.post:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments: [ "@resource.storage_location_category", "POST" ]

    resource.storage_location_category:
        parent:    "api.resource"
        arguments: [ "PartKeepr\StorageLocationBundle\Entity\StorageLocationCategory" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initCollectionOperations"
                    arguments: [ [ "@resource.storage_location_category.collection_operation.get", "@resource.storage_location_category.collection_operation.get_root", "@resource.storage_location_category.collection_operation.post" ] ]
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.storage_location_category.item_operation.get", "@resource.storage_location_category.item_operation.put", "@resource.storage_location_category.item_operation.delete", "@resource.storage_location_category.item_operation.move" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default", "tree" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default", "tree" ] }

    resource.storage_location_image.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.storage_location_image", "GET" ]

    resource.storage_location_image.item_operation.custom_get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.storage_location_image"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/storage_location_images/{id}/getImage"           # Path
             -    "PartKeeprStorageLocationBundle:StorageLocationImage:getImage"         # Controller
             -    "StorageLocationGetImage"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.storage_location_image:
        parent:    "api.resource"
        arguments: [ "PartKeepr\StorageLocationBundle\Entity\StorageLocationImage" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.storage_location_image.item_operation.get", "@resource.storage_location_image.item_operation.custom_get" ] ]
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

# ######################## Temporary Images ######################################
    resource.tempimage.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.tempimage", "GET" ]

    resource.tempimage.collection_operation.custom_post:
            class:     "Dunglas\ApiBundle\Api\Operation\Operation"
            public:    false
            factory:   [ "@api.operation_factory", "createCollectionOperation" ]
            arguments:
                 -    "@resource.tempimage"               # Resource
                 -    [ "POST" ]                 # Methods
                 -    "/temp_images/upload"           # Path
                 -    "PartKeeprImageBundle:TemporaryImage:upload"         # Controller
                 -    "TemporaryImageUpload"                 # Route name
                 -    # Context (will be present in Hydra documentation)
                      "@type":       "hydra:Operation"
                      "hydra:title": "A custom operation"
                      "returns":     "xmls:string"

    resource.tempimage.collection_operation.custom_post_webcam:
            class:     "Dunglas\ApiBundle\Api\Operation\Operation"
            public:    false
            factory:   [ "@api.operation_factory", "createCollectionOperation" ]
            arguments:
                 -    "@resource.tempimage"               # Resource
                 -    [ "POST" ]                 # Methods
                 -    "/temp_images/webcamUpload"           # Path
                 -    "PartKeeprImageBundle:TemporaryImage:webcamUpload"         # Controller
                 -    "TemporaryImageUploadWebcam"                 # Route name
                 -    # Context (will be present in Hydra documentation)
                      "@type":       "hydra:Operation"
                      "hydra:title": "A custom operation"
                      "returns":     "xmls:string"

    resource.tempimage.item_operation.custom_get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.tempimage"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/temp_images/{id}/getImage"           # Path
             -    "PartKeeprImageBundle:TemporaryImage:getImage"         # Controller
             -    "TemporaryImageGet"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.tempimage:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\ImageBundle\\Entity\\TempImage" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initCollectionOperations"
                    arguments: [ [ "@resource.tempimage.collection_operation.custom_post", "@resource.tempimage.collection_operation.custom_post_webcam" ] ]
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.tempimage.item_operation.get", "@resource.tempimage.item_operation.custom_get" ] ]

    resource.tempfile.collection_operation.custom_post:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments:
             -    "@resource.tempfile"               # Resource
             -    [ "POST" ]                 # Methods
             -    "/temp_uploaded_files/upload"           # Path
             -    "PartKeeprUploadedFileBundle:TemporaryFile:upload"         # Controller
             -    "TemporaryFileUpload"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.tempfile.collection_operation.custom_post_webcam:
            class:     "Dunglas\ApiBundle\Api\Operation\Operation"
            public:    false
            factory:   [ "@api.operation_factory", "createCollectionOperation" ]
            arguments:
                 -    "@resource.tempfile"               # Resource
                 -    [ "POST" ]                 # Methods
                 -    "/temp_uploaded_files/webcamUpload"           # Path
                 -    "PartKeeprUploadedFileBundle:TemporaryFile:webcamUpload"         # Controller
                 -    "TemporaryFileUploadWebcam"                 # Route name
                 -    # Context (will be present in Hydra documentation)
                      "@type":       "hydra:Operation"
                      "hydra:title": "A custom operation"
                      "returns":     "xmls:string"

    resource.tempfile.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.tempfile", "GET" ]

    resource.tempfile.item_operation.custom_get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.tempfile"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/temp_uploaded_files/{id}/getFile"           # Path
             -    "PartKeeprUploadedFileBundle:TemporaryFile:getFile"         # Controller
             -    "TemporaryFileGet"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.tempfile.item_operation.custom_get_mimetype:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.tempfile"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/temp_uploaded_files/{id}/getMimeTypeIcon"           # Path
             -    "PartKeeprUploadedFileBundle:TemporaryFile:getMimeTypeIcon"         # Controller
             -    "TemporaryFileGetMimeTypeIcon"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.tempfile:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\UploadedFileBundle\\Entity\\TempUploadedFile" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initCollectionOperations"
                    arguments: [ [ "@resource.tempfile.collection_operation.custom_post" ] ]
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.tempfile.item_operation.get", "@resource.tempfile.item_operation.custom_get", "@resource.tempfile.item_operation.custom_get_mimetype", "@resource.tempfile.collection_operation.custom_post_webcam" ] ]

    resource.tip_of_the_day.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.tip_of_the_day", "GET" ]

    resource.tip_of_the_day.item_operation.mark_read:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
            - "@resource.tip_of_the_day"
            - "PUT"
            - "/tip_of_the_days/{id}/markTipRead"
            - "partkeepr.tip_of_the_day.mark_read"
            - "TipMarkRead"


    resource.tip_of_the_day.collection_operation.get:
            class:     "Dunglas\ApiBundle\Api\Operation\Operation"
            public:    false
            factory:   [ "@api.operation_factory", "createCollectionOperation" ]
            arguments: [ "@resource.tip_of_the_day", "GET" ]

    resource.tip_of_the_day.collection_operation.post:
            class:     "Dunglas\ApiBundle\Api\Operation\Operation"
            public:    false
            factory:   [ "@api.operation_factory", "createCollectionOperation" ]
            arguments: [ "@resource.tip_of_the_day", "POST" ]

    resource.tip_of_the_day.collection_operation.mark_all_unread:
            class:     "Dunglas\ApiBundle\Api\Operation\Operation"
            public:    false
            factory:   [ "@api.operation_factory", "createCollectionOperation" ]
            arguments:
                - "@resource.tip_of_the_day"
                - [ "POST" ]
                - "/tip_of_the_days/markAllTipsAsUnread"
                - "partkeepr.tip_of_the_day.mark_all_unread"
                - "TipMarkAllUnrad"

    resource.tip_of_the_day:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\TipOfTheDayBundle\\Entity\\TipOfTheDay" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:     "initCollectionOperations"
                    arguments: [ [ "@resource.tip_of_the_day.collection_operation.get", "@resource.tip_of_the_day.collection_operation.post", "@resource.tip_of_the_day.collection_operation.mark_all_unread" ] ]
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.tip_of_the_day.item_operation.get", "@resource.tip_of_the_day.item_operation.mark_read" ] ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.tip_of_the_day_history.collection_operation.custom_get:
            class:     "Dunglas\ApiBundle\Api\Operation\Operation"
            public:    false
            factory:   [ "@api.operation_factory", "createCollectionOperation" ]
            arguments:
              - "@resource.tip_of_the_day_history"
              - [ "GET" ]
              - "/tip_of_the_day_histories"
              - "partkeepr.tip_of_the_day_history.collection_get"
              - "TipHistoriesGet"

    resource.tip_of_the_day_history:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\TipOfTheDayBundle\\Entity\\TipOfTheDayHistory" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:     "initCollectionOperations"
                    arguments: [ [ "@resource.tip_of_the_day_history.collection_operation.custom_get" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.user.item_operation.get_preferences:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments:
             -    "@resource.user"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/user_preferences"           # Path
             -    "partkeepr.user_preference.get_preferences"         # Controller
             -    "PartKeeprUserPreferenceGet"

    resource.user.item_operation.set_preference:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments:
             -    "@resource.user"               # Resource
             -    [ "POST", "PUT" ]                 # Methods
             -    "/user_preferences"           # Path
             -    "partkeepr.user_preference.set_preference"         # Controller
             -    "PartKeeprUserPreferenceSet"

    resource.user.item_operation.delete_preference:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.user"               # Resource
             -    [ "DELETE" ]                 # Methods
             -    "/user_preferences"           # Path
             -    "partkeepr.user_preference.delete_preference"         # Controller
             -    "PartKeeprUserPreferenceDelete"

    resource.user.item_operation.login:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.user"               # Resource
             -    [ "POST" ]                 # Methods
             -    "/users/login"           # Path
             -    "partkeepr.auth.login"         # Controller
             -    "PartKeeprAuthLogin"

    resource.user.item_operation.change_password:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.user"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/users/{id}/changePassword"           # Path
             -    "partkeepr.auth.change_password"         # Controller
             -    "PartKeeprAuthChangePassword"

    resource.user.collection_operation.get_providers:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.user"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/users/get_user_providers"           # Path
             -    "partkeepr.auth.get_providers"         # Controller
             -    "PartKeeprAuthGetProviders"

    resource.user.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.user", "GET" ]

    resource.user.item_operation.put_custom:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.user"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/users/{id}"           # Path
             -    "partkeepr.user.put"         # Controller
             -    "PartKeeprUserPut"

    resource.user.collection_operation.post_custom:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments:
             -    "@resource.user"               # Resource
             -    [ "POST" ]                 # Methods
             -    "/users"           # Path
             -    "partkeepr.user.post"         # Controller
             -    "PartKeeprUserPost"

    resource.user.item_operation.delete_custom:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
            -    "@resource.user"
            -    [ "DELETE" ]
            -    "/users/{id}"           # Path
            -    "partkeepr.user.delete"         # Controller
            -    "PartKeeprUserDelete"

    resource.user_provider:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\AuthBundle\\Entity\\UserProvider" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.user:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\AuthBundle\\Entity\\User" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:     "initCollectionOperations"
                    arguments: [ [ "@resource.user.collection_operation.get", "@resource.user.collection_operation.post_custom", "@resource.user.collection_operation.get_providers" ] ]
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.user.item_operation.get", "@resource.user.item_operation.get", "@resource.user.item_operation.put_custom", "@resource.user.item_operation.delete_custom", "@resource.user.item_operation.get_preferences", "@resource.user.item_operation.set_preference", "@resource.user.item_operation.delete_preference", "@resource.user.item_operation.login", "@resource.user.item_operation.change_password" ] ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.fos_user:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\AuthBundle\\Entity\\FOSUser" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.project:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\ProjectBundle\\Entity\\Project" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.project_part:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\ProjectBundle\\Entity\\ProjectPart" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.project_report.collection_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments: [ "@resource.project_report", "GET" ]

    resource.project_report.item_operation.custom_post:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments:
             -    "@resource.project_report"               # Resource
             -    [ "POST" ]                 # Methods
             -    "/reports"           # Path
             -    "PartKeeprProjectBundle:ProjectReport:createReport"         # Controller
             -    "ProjectReportPost"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.project_report.item_operation.custom_get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.project_report"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/reports/{id}"           # Path
             -    "PartKeeprProjectBundle:ProjectReport:getReport"         # Controller
             -    "ProjectReportGet"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.project_report.item_operation.put:
            class:     "Dunglas\ApiBundle\Api\Operation\Operation"
            public:    false
            factory:   [ "@api.operation_factory", "createItemOperation" ]
            arguments: [ "@resource.project_report", "PUT" ]

    resource.project_report.item_operation.delete:
            class:     "Dunglas\ApiBundle\Api\Operation\Operation"
            public:    false
            factory:   [ "@api.operation_factory", "createItemOperation" ]
            arguments: [ "@resource.project_report", "DELETE" ]

    resource.project_report:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\ProjectBundle\\Entity\\Report" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initItemOperations"
                    arguments: [ [ "@resource.project_report.item_operation.custom_get", "@resource.project_report.item_operation.put", "@resource.project_report.item_operation.delete" ] ]
            -       method:    "initCollectionOperations"
                    arguments: [ [ "@resource.project_report.collection_operation.get", "@resource.project_report.item_operation.custom_post"]]
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default", "readonly" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.project_report_project:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\ProjectBundle\\Entity\\ReportProject" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.project_report_part:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\ProjectBundle\\Entity\\ReportPart" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.project_attachment.item_operation.custom_get_image:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.project_attachment"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/project_attachments/{id}/getImage"           # Path
             -    "PartKeeprProjectBundle:ProjectAttachment:getImage"         # Controller
             -    "ProjectAttachmentGetImage"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.project_attachment.item_operation.custom_get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.project_attachment"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/project_attachments/{id}/getFile"           # Path
             -    "PartKeeprProjectBundle:ProjectAttachment:getFile"         # Controller
             -    "ProjectAttachmentGet"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.project_attachment.item_operation.custom_get_mime:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.project_attachment"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/project_attachments/{id}/getMimeTypeIcon"           # Path
             -    "PartKeeprProjectBundle:ProjectAttachment:getMimeTypeIcon"         # Controller
             -    "ProjectAttachmentMimeTypeIcon"                 # Route name
             -    # Context (will be present in Hydra documentation)
                  "@type":       "hydra:Operation"
                  "hydra:title": "A custom operation"
                  "returns":     "xmls:string"

    resource.project_attachment.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.project_attachment", "GET" ]

    resource.project_attachment:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\ProjectBundle\\Entity\\ProjectAttachment" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.project_attachment.item_operation.get", "@resource.project_attachment.item_operation.custom_get", "@resource.project_attachment.item_operation.custom_get_mime", "@resource.project_attachment.item_operation.custom_get_image"  ] ]
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.project_run:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\ProjectBundle\\Entity\\ProjectRun" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.project_run_part:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\ProjectBundle\\Entity\\ProjectRunPart" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.system_notice.item_operation.get:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments: [ "@resource.system_notice", "GET" ]

    resource.system_notice.item_operation.acknowledge:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.system_notice"               # Resource
             -    [ "PUT" ]                 # Methods
             -    "/system_notices/{id}/acknowledge"           # Path
             -    "partkeepr.system_notice.acknowledge"         # Controller
             -    "SystemNoticeAcknowledge"                 # Route name

    resource.system_notice:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\CoreBundle\\Entity\\SystemNotice" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.system_notice.item_operation.get", "@resource.system_notice.item_operation.acknowledge" ] ]
            -       method:    "initFilters"
                    arguments: [ [ "@doctrine_reflection_service.search_filter" ] ]
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }

    resource.system_preference.item_operation.get_preferences:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments:
             -    "@resource.system_preference"               # Resource
             -    [ "GET" ]                 # Methods
             -    "/system_preferences"           # Path
             -    "partkeepr.system_preference.get_preferences"         # Controller
             -    "PartKeeprSystemPreferenceGet"

    resource.system_preference.item_operation.set_preference:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createCollectionOperation" ]
        arguments:
             -    "@resource.system_preference"               # Resource
             -    [ "POST", "PUT" ]                 # Methods
             -    "/system_preferences"           # Path
             -    "partkeepr.system_preference.set_preference"         # Controller
             -    "PartKeeprSystemPreferenceSet"

    resource.system_preference.item_operation.delete_preference:
        class:     "Dunglas\ApiBundle\Api\Operation\Operation"
        public:    false
        factory:   [ "@api.operation_factory", "createItemOperation" ]
        arguments:
             -    "@resource.system_preference"               # Resource
             -    [ "DELETE" ]                 # Methods
             -    "/system_preferences"           # Path
             -    "partkeepr.system_preference.delete_preference"         # Controller
             -    "PartKeeprSystemPreferenceDelete"

    resource.system_preference:
        parent:    "api.resource"
        arguments: [ "PartKeepr\\SystemPreferenceBundle\\Entity\\SystemPreference" ]
        tags:      [ { name: "api.resource" } ]
        calls:
            -       method:    "initNormalizationContext"
                    arguments: [ { groups: [ "default" ] } ]
            -       method:     "initCollectionOperations"
                    arguments: [ [ "@resource.system_preference.item_operation.get_preferences" ] ]
            -       method:     "initItemOperations"
                    arguments: [ [ "@resource.system_preference.item_operation.set_preference", "@resource.system_preference.item_operation.delete_preference"  ] ]
            -       method:    "initDenormalizationContext"
                    arguments:
                        - { groups: [ "default" ] }
