Добавление метода patch
This commit is contained in:
parent
964f6bc028
commit
2550181534
293
.idea/workspace.xml
generated
293
.idea/workspace.xml
generated
@ -2,14 +2,10 @@
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="6452b13b-5b16-420c-9e2d-0c40791a2ae8" name="Default" comment="">
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailException.java" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/ErrorResponse.java" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/resources/banner.txt" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBook.java" afterPath="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBook.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBookController.java" afterPath="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBookController.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailRecord.java" afterPath="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailRecord.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/resources/application.properties" afterPath="$PROJECT_DIR$/src/main/resources/application.properties" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/resources/banner.txt" afterPath="$PROJECT_DIR$/src/main/resources/banner.txt" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/out/" />
|
||||
<ignored path="$PROJECT_DIR$/target/" />
|
||||
@ -90,8 +86,8 @@
|
||||
<file leaf-file-name="Main.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="204">
|
||||
<caret line="12" column="0" lean-forward="true" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
|
||||
<state relative-caret-position="0">
|
||||
<caret line="12" column="0" lean-forward="false" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#241#242#0" expanded="true" />
|
||||
@ -104,9 +100,11 @@
|
||||
<file leaf-file-name="EmailBook.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBook.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-374">
|
||||
<caret line="5" column="17" lean-forward="true" selection-start-line="5" selection-start-column="17" selection-end-line="5" selection-end-column="17" />
|
||||
<folding />
|
||||
<state relative-caret-position="281">
|
||||
<caret line="30" column="9" lean-forward="true" selection-start-line="30" selection-start-column="9" selection-end-line="30" selection-end-column="9" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -114,11 +112,22 @@
|
||||
<file leaf-file-name="EmailRecord.java" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailRecord.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="119">
|
||||
<caret line="7" column="24" lean-forward="false" selection-start-line="7" selection-start-column="24" selection-end-line="7" selection-end-column="24" />
|
||||
<state relative-caret-position="493">
|
||||
<caret line="29" column="30" lean-forward="true" selection-start-line="29" selection-start-column="30" selection-end-line="29" selection-end-column="30" />
|
||||
<folding>
|
||||
<element signature="e#301#302#0" expanded="true" />
|
||||
<element signature="e#326#327#0" expanded="true" />
|
||||
<element signature="e#360#361#0" expanded="true" />
|
||||
<element signature="e#388#389#0" expanded="true" />
|
||||
<element signature="e#419#420#0" expanded="true" />
|
||||
<element signature="e#446#447#0" expanded="true" />
|
||||
<element signature="e#486#487#0" expanded="true" />
|
||||
<element signature="e#518#519#0" expanded="true" />
|
||||
<element signature="e#578#579#0" expanded="true" />
|
||||
<element signature="e#620#621#0" expanded="true" />
|
||||
<element signature="e#654#655#0" expanded="true" />
|
||||
<element signature="e#700#701#0" expanded="true" />
|
||||
<element signature="e#756#757#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -137,12 +146,10 @@
|
||||
<file leaf-file-name="EmailBookController.java" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBookController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="428">
|
||||
<caret line="45" column="0" lean-forward="false" selection-start-line="45" selection-start-column="0" selection-end-line="45" selection-end-column="0" />
|
||||
<state relative-caret-position="218">
|
||||
<caret line="40" column="113" lean-forward="true" selection-start-line="40" selection-start-column="113" selection-end-line="40" selection-end-column="113" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#2412#2413#0" expanded="true" />
|
||||
<element signature="e#2452#2453#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -177,10 +184,10 @@
|
||||
<option value="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailException.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/ErrorResponse.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/resources/application.properties" />
|
||||
<option value="$PROJECT_DIR$/src/main/resources/banner.txt" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailRecord.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBook.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBookController.java" />
|
||||
<option value="$PROJECT_DIR$/src/main/resources/banner.txt" />
|
||||
<option value="$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBook.java" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@ -257,10 +264,10 @@
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="Scope" />
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="Scratches" />
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="AndroidView" />
|
||||
<pane id="Scope" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
@ -294,13 +301,6 @@
|
||||
<item name="java" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="restServer" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="restServer" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="restServer" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="main" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="resources" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</subPane>
|
||||
@ -481,26 +481,43 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1512137481973</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="7" />
|
||||
<task id="LOCAL-00007" summary="Реализация exception">
|
||||
<created>1512205461339</created>
|
||||
<option name="number" value="00007" />
|
||||
<option name="presentableId" value="LOCAL-00007" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1512205461339</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="8" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TodoView">
|
||||
<todo-panel id="selected-file">
|
||||
<is-autoscroll-to-source value="true" />
|
||||
</todo-panel>
|
||||
<todo-panel id="all">
|
||||
<are-packages-shown value="true" />
|
||||
<is-autoscroll-to-source value="true" />
|
||||
</todo-panel>
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-8" y="-8" width="1296" height="1010" extended-state="6" />
|
||||
<layout>
|
||||
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32915717" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32941177" sideWeight="0.4936034" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25416204" sideWeight="0.51171875" order="7" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32995737" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25416204" sideWeight="0.48828125" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.27413985" sideWeight="0.4890625" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32928804" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.26082003" sideWeight="0.48828125" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2357631" sideWeight="0.4890625" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32941177" sideWeight="0.4978678" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18125" sideWeight="0.49441788" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18770227" sideWeight="0.49441788" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
@ -513,7 +530,6 @@
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="REST Client" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.32941177" sideWeight="0.4978678" order="8" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
@ -564,7 +580,8 @@
|
||||
<MESSAGE value="Init commit" />
|
||||
<MESSAGE value="Реализация книги" />
|
||||
<MESSAGE value="Промежуточный коммит" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Промежуточный коммит" />
|
||||
<MESSAGE value="Реализация exception" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Реализация exception" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
@ -581,7 +598,9 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="918">
|
||||
<caret line="61" column="0" lean-forward="false" selection-start-line="61" selection-start-column="0" selection-end-line="61" selection-end-column="0" />
|
||||
<folding />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -610,8 +629,19 @@
|
||||
<state relative-caret-position="119">
|
||||
<caret line="7" column="23" lean-forward="false" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" />
|
||||
<folding>
|
||||
<element signature="e#700#701#0" expanded="false" />
|
||||
<element signature="e#756#757#0" expanded="false" />
|
||||
<element signature="e#301#302#0" expanded="true" />
|
||||
<element signature="e#326#327#0" expanded="true" />
|
||||
<element signature="e#360#361#0" expanded="true" />
|
||||
<element signature="e#388#389#0" expanded="true" />
|
||||
<element signature="e#419#420#0" expanded="true" />
|
||||
<element signature="e#446#447#0" expanded="true" />
|
||||
<element signature="e#486#487#0" expanded="true" />
|
||||
<element signature="e#518#519#0" expanded="true" />
|
||||
<element signature="e#578#579#0" expanded="true" />
|
||||
<element signature="e#620#621#0" expanded="true" />
|
||||
<element signature="e#654#655#0" expanded="true" />
|
||||
<element signature="e#700#701#0" expanded="true" />
|
||||
<element signature="e#756#757#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -620,10 +650,7 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="51">
|
||||
<caret line="3" column="0" lean-forward="false" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#231#232#0" expanded="false" />
|
||||
<element signature="e#261#262#0" expanded="false" />
|
||||
</folding>
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -631,7 +658,9 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="289">
|
||||
<caret line="23" column="85" lean-forward="false" selection-start-line="23" selection-start-column="85" selection-end-line="23" selection-end-column="85" />
|
||||
<folding />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -641,8 +670,6 @@
|
||||
<caret line="43" column="56" lean-forward="false" selection-start-line="43" selection-start-column="56" selection-end-line="43" selection-end-column="56" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#2412#2413#0" expanded="true" />
|
||||
<element signature="e#2452#2453#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -672,8 +699,19 @@
|
||||
<state relative-caret-position="323">
|
||||
<caret line="24" column="59" lean-forward="false" selection-start-line="24" selection-start-column="59" selection-end-line="24" selection-end-column="59" />
|
||||
<folding>
|
||||
<element signature="e#700#701#0" expanded="false" />
|
||||
<element signature="e#756#757#0" expanded="false" />
|
||||
<element signature="e#301#302#0" expanded="true" />
|
||||
<element signature="e#326#327#0" expanded="true" />
|
||||
<element signature="e#360#361#0" expanded="true" />
|
||||
<element signature="e#388#389#0" expanded="true" />
|
||||
<element signature="e#419#420#0" expanded="true" />
|
||||
<element signature="e#446#447#0" expanded="true" />
|
||||
<element signature="e#486#487#0" expanded="true" />
|
||||
<element signature="e#518#519#0" expanded="true" />
|
||||
<element signature="e#578#579#0" expanded="true" />
|
||||
<element signature="e#620#621#0" expanded="true" />
|
||||
<element signature="e#654#655#0" expanded="true" />
|
||||
<element signature="e#700#701#0" expanded="true" />
|
||||
<element signature="e#756#757#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -682,7 +720,9 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="85">
|
||||
<caret line="6" column="50" lean-forward="false" selection-start-line="6" selection-start-column="50" selection-end-line="6" selection-end-column="50" />
|
||||
<folding />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -692,8 +732,6 @@
|
||||
<caret line="34" column="0" lean-forward="true" selection-start-line="34" selection-start-column="0" selection-end-line="34" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#2412#2413#0" expanded="true" />
|
||||
<element signature="e#2452#2453#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -723,8 +761,19 @@
|
||||
<state relative-caret-position="323">
|
||||
<caret line="24" column="59" lean-forward="false" selection-start-line="24" selection-start-column="59" selection-end-line="24" selection-end-column="59" />
|
||||
<folding>
|
||||
<element signature="e#700#701#0" expanded="false" />
|
||||
<element signature="e#756#757#0" expanded="false" />
|
||||
<element signature="e#301#302#0" expanded="true" />
|
||||
<element signature="e#326#327#0" expanded="true" />
|
||||
<element signature="e#360#361#0" expanded="true" />
|
||||
<element signature="e#388#389#0" expanded="true" />
|
||||
<element signature="e#419#420#0" expanded="true" />
|
||||
<element signature="e#446#447#0" expanded="true" />
|
||||
<element signature="e#486#487#0" expanded="true" />
|
||||
<element signature="e#518#519#0" expanded="true" />
|
||||
<element signature="e#578#579#0" expanded="true" />
|
||||
<element signature="e#620#621#0" expanded="true" />
|
||||
<element signature="e#654#655#0" expanded="true" />
|
||||
<element signature="e#700#701#0" expanded="true" />
|
||||
<element signature="e#756#757#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -733,7 +782,9 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="85">
|
||||
<caret line="6" column="50" lean-forward="true" selection-start-line="6" selection-start-column="50" selection-end-line="6" selection-end-column="50" />
|
||||
<folding />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -743,8 +794,6 @@
|
||||
<caret line="34" column="0" lean-forward="true" selection-start-line="34" selection-start-column="0" selection-end-line="34" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#2412#2413#0" expanded="true" />
|
||||
<element signature="e#2452#2453#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -775,8 +824,6 @@
|
||||
<caret line="13" column="0" lean-forward="false" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#2412#2413#0" expanded="true" />
|
||||
<element signature="e#2452#2453#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -786,8 +833,19 @@
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="24" lean-forward="false" selection-start-line="2" selection-start-column="24" selection-end-line="2" selection-end-column="24" />
|
||||
<folding>
|
||||
<element signature="e#700#701#0" expanded="false" />
|
||||
<element signature="e#756#757#0" expanded="false" />
|
||||
<element signature="e#301#302#0" expanded="true" />
|
||||
<element signature="e#326#327#0" expanded="true" />
|
||||
<element signature="e#360#361#0" expanded="true" />
|
||||
<element signature="e#388#389#0" expanded="true" />
|
||||
<element signature="e#419#420#0" expanded="true" />
|
||||
<element signature="e#446#447#0" expanded="true" />
|
||||
<element signature="e#486#487#0" expanded="true" />
|
||||
<element signature="e#518#519#0" expanded="true" />
|
||||
<element signature="e#578#579#0" expanded="true" />
|
||||
<element signature="e#620#621#0" expanded="true" />
|
||||
<element signature="e#654#655#0" expanded="true" />
|
||||
<element signature="e#700#701#0" expanded="true" />
|
||||
<element signature="e#756#757#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -797,7 +855,9 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="493">
|
||||
<caret line="29" column="5" lean-forward="false" selection-start-line="29" selection-start-column="5" selection-end-line="29" selection-end-column="5" />
|
||||
<folding />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -827,8 +887,6 @@
|
||||
<caret line="13" column="0" lean-forward="false" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#2412#2413#0" expanded="true" />
|
||||
<element signature="e#2452#2453#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -838,8 +896,19 @@
|
||||
<state relative-caret-position="34">
|
||||
<caret line="2" column="24" lean-forward="false" selection-start-line="2" selection-start-column="24" selection-end-line="2" selection-end-column="24" />
|
||||
<folding>
|
||||
<element signature="e#700#701#0" expanded="false" />
|
||||
<element signature="e#756#757#0" expanded="false" />
|
||||
<element signature="e#301#302#0" expanded="true" />
|
||||
<element signature="e#326#327#0" expanded="true" />
|
||||
<element signature="e#360#361#0" expanded="true" />
|
||||
<element signature="e#388#389#0" expanded="true" />
|
||||
<element signature="e#419#420#0" expanded="true" />
|
||||
<element signature="e#446#447#0" expanded="true" />
|
||||
<element signature="e#486#487#0" expanded="true" />
|
||||
<element signature="e#518#519#0" expanded="true" />
|
||||
<element signature="e#578#579#0" expanded="true" />
|
||||
<element signature="e#620#621#0" expanded="true" />
|
||||
<element signature="e#654#655#0" expanded="true" />
|
||||
<element signature="e#700#701#0" expanded="true" />
|
||||
<element signature="e#756#757#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -849,7 +918,9 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="459">
|
||||
<caret line="27" column="75" lean-forward="true" selection-start-line="27" selection-start-column="75" selection-end-line="27" selection-end-column="75" />
|
||||
<folding />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -879,8 +950,6 @@
|
||||
<caret line="21" column="0" lean-forward="false" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#2412#2413#0" expanded="true" />
|
||||
<element signature="e#2452#2453#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -911,8 +980,6 @@
|
||||
<caret line="17" column="37" lean-forward="false" selection-start-line="17" selection-start-column="37" selection-end-line="17" selection-end-column="37" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#2412#2413#0" expanded="true" />
|
||||
<element signature="e#2452#2453#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
@ -934,32 +1001,6 @@
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="357">
|
||||
<caret line="21" column="0" lean-forward="false" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="e#148#149#0" expanded="false" />
|
||||
<element signature="e#180#181#0" expanded="false" />
|
||||
<element signature="e#227#228#0" expanded="false" />
|
||||
<element signature="e#269#270#0" expanded="false" />
|
||||
<element signature="e#303#304#0" expanded="false" />
|
||||
<element signature="e#333#334#0" expanded="false" />
|
||||
<element signature="e#379#380#0" expanded="false" />
|
||||
<element signature="e#417#418#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/banner.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="68">
|
||||
<caret line="4" column="0" lean-forward="true" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="51">
|
||||
<caret line="3" column="0" lean-forward="true" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -973,8 +1014,8 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/Main.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="204">
|
||||
<caret line="12" column="0" lean-forward="true" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
|
||||
<state relative-caret-position="0">
|
||||
<caret line="12" column="0" lean-forward="false" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#241#242#0" expanded="true" />
|
||||
@ -983,22 +1024,18 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBook.java">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-374">
|
||||
<caret line="5" column="17" lean-forward="true" selection-start-line="5" selection-start-column="17" selection-end-line="5" selection-end-column="17" />
|
||||
<folding />
|
||||
<state relative-caret-position="51">
|
||||
<caret line="3" column="0" lean-forward="true" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailRecord.java">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/resources/banner.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="119">
|
||||
<caret line="7" column="24" lean-forward="false" selection-start-line="7" selection-start-column="24" selection-end-line="7" selection-end-column="24" />
|
||||
<folding>
|
||||
<element signature="e#419#420#0" expanded="true" />
|
||||
<element signature="e#446#447#0" expanded="true" />
|
||||
</folding>
|
||||
<state relative-caret-position="85">
|
||||
<caret line="5" column="33" lean-forward="true" selection-start-line="5" selection-start-column="33" selection-end-line="5" selection-end-column="33" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -1010,14 +1047,44 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBookController.java">
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBook.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="428">
|
||||
<caret line="45" column="0" lean-forward="false" selection-start-line="45" selection-start-column="0" selection-end-line="45" selection-end-column="0" />
|
||||
<state relative-caret-position="281">
|
||||
<caret line="30" column="9" lean-forward="true" selection-start-line="30" selection-start-column="9" selection-end-line="30" selection-end-column="9" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailRecord.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="493">
|
||||
<caret line="29" column="30" lean-forward="true" selection-start-line="29" selection-start-column="30" selection-end-line="29" selection-end-column="30" />
|
||||
<folding>
|
||||
<element signature="e#301#302#0" expanded="true" />
|
||||
<element signature="e#326#327#0" expanded="true" />
|
||||
<element signature="e#360#361#0" expanded="true" />
|
||||
<element signature="e#388#389#0" expanded="true" />
|
||||
<element signature="e#419#420#0" expanded="true" />
|
||||
<element signature="e#446#447#0" expanded="true" />
|
||||
<element signature="e#486#487#0" expanded="true" />
|
||||
<element signature="e#518#519#0" expanded="true" />
|
||||
<element signature="e#578#579#0" expanded="true" />
|
||||
<element signature="e#620#621#0" expanded="true" />
|
||||
<element signature="e#654#655#0" expanded="true" />
|
||||
<element signature="e#700#701#0" expanded="true" />
|
||||
<element signature="e#756#757#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main/java/ru/cft/task/restServer/EmailBookController.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="218">
|
||||
<caret line="40" column="113" lean-forward="true" selection-start-line="40" selection-start-column="113" selection-end-line="40" selection-end-column="113" />
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
<element signature="e#2412#2413#0" expanded="true" />
|
||||
<element signature="e#2452#2453#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -16,7 +16,7 @@ public class EmailBook {
|
||||
public EmailRecord addEmailRecord(long id, String name, String email) throws EmailException {
|
||||
for (Map.Entry<Long, EmailRecord> rec : book.entrySet()) {
|
||||
if (rec.getValue().getEmail() == email) {
|
||||
throw new EmailException("Запись с email " + email + " уже есть в базе");
|
||||
throw new EmailException("Запись с {email = " + email + "} уже есть в базе");
|
||||
}
|
||||
}
|
||||
EmailRecord new_rec = new EmailRecord(id, name, email);
|
||||
@ -29,7 +29,7 @@ public class EmailBook {
|
||||
book.remove(id);
|
||||
return true;
|
||||
}
|
||||
throw new EmailException("Запись с id = " + id + " не найдена");
|
||||
throw new EmailException("Запись с {id = " + id + "} не найдена");
|
||||
}
|
||||
|
||||
public int count() {
|
||||
@ -40,7 +40,7 @@ public class EmailBook {
|
||||
if (book.containsKey(id)) {
|
||||
return book.get(id);
|
||||
}
|
||||
throw new EmailException("Запись с id = " + id + " не найдена");
|
||||
throw new EmailException("Запись с {id = " + id + "} не найдена");
|
||||
}
|
||||
|
||||
public EmailRecord findRecordByName(String name) throws EmailException {
|
||||
@ -49,7 +49,7 @@ public class EmailBook {
|
||||
return rec.getValue();
|
||||
}
|
||||
}
|
||||
throw new EmailException("Запись с именем " + name + " не найдена");
|
||||
throw new EmailException("Запись с {name = " + name + "} не найдена");
|
||||
}
|
||||
|
||||
public EmailRecord findRecordByEmail(String email) throws EmailException {
|
||||
@ -58,6 +58,19 @@ public class EmailBook {
|
||||
return rec.getValue();
|
||||
}
|
||||
}
|
||||
throw new EmailException("Запись с email " + email + " не найдена");
|
||||
throw new EmailException("Запись с {email = " + email + "} не найдена");
|
||||
}
|
||||
|
||||
public EmailRecord editRecord(long id, String name, String email) throws EmailException {
|
||||
if (book.containsKey(id)) {
|
||||
if (!name.isEmpty()) {
|
||||
book.get(id).setName(name);
|
||||
}
|
||||
if (!email.isEmpty()) {
|
||||
book.get(id).setEmail(email);
|
||||
}
|
||||
return book.get(id);
|
||||
}
|
||||
throw new EmailException("Запись с {id = " + id + "} не найдена");
|
||||
}
|
||||
}
|
||||
|
@ -22,17 +22,6 @@ public class EmailBookController {
|
||||
return new ResponseEntity<EmailRecord>(emailBook.addEmailRecord(new_id.incrementAndGet(), name, email), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.DELETE)
|
||||
public ResponseEntity<ErrorResponse> removeEmailRec(@RequestParam(value = "id", required = true) long id) throws EmailException {
|
||||
if (emailBook.removeEmailRecord(id)) {
|
||||
ErrorResponse message = new ErrorResponse();
|
||||
message.setErrorCode(HttpStatus.OK.value());
|
||||
message.setMessage("Запись {id = " + id + "} успешно удалена");
|
||||
return new ResponseEntity<ErrorResponse>(message, HttpStatus.OK);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
public ResponseEntity<EmailRecord> findEmailRec(@RequestParam(value = "id", defaultValue = "") String id,
|
||||
@RequestParam(value = "name", defaultValue = "") String name,
|
||||
@ -47,6 +36,25 @@ public class EmailBookController {
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.PATCH)
|
||||
public ResponseEntity<EmailRecord> editEmailRec(@RequestParam(value = "id", required = true) long id,
|
||||
@RequestParam(value = "name", defaultValue = "") String name,
|
||||
@RequestParam(value = "email", defaultValue = "") String email
|
||||
) throws EmailException {
|
||||
return new ResponseEntity<EmailRecord>(emailBook.editRecord(id, name, email), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@RequestMapping(method = RequestMethod.DELETE)
|
||||
public ResponseEntity<ErrorResponse> removeEmailRec(@RequestParam(value = "id", required = true) long id) throws EmailException {
|
||||
if (emailBook.removeEmailRecord(id)) {
|
||||
ErrorResponse message = new ErrorResponse();
|
||||
message.setErrorCode(HttpStatus.OK.value());
|
||||
message.setMessage("Запись {id = " + id + "} успешно удалена");
|
||||
return new ResponseEntity<ErrorResponse>(message, HttpStatus.OK);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/count", method = RequestMethod.GET)
|
||||
public int countEmailRecords() {
|
||||
return emailBook.count();
|
||||
|
@ -2,3 +2,5 @@
|
||||
,'_/ / __//_ _/
|
||||
/ /_ / _/ / /
|
||||
|__/ /_/ /_/
|
||||
|
||||
${application.title} ${application.formatted-version}
|
Loading…
Reference in New Issue
Block a user