Browse Source

+servicios y DiagramaProductoServicios.png

master
vigliom 1 year ago
parent
commit
38b4524adb
6 changed files with 63 additions and 39 deletions
  1. +36
    -35
      .idea/workspace.xml
  2. BIN
      DiagramaProductoServicios.png
  3. +8
    -1
      README.md
  4. +1
    -2
      src/main/java/com/jorpelu/ServicioDeProductos/config/AppConfig.java
  5. +18
    -0
      src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductoService.java
  6. +0
    -1
      src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductosDao.java

+ 36
- 35
.idea/workspace.xml View File

@ -4,23 +4,13 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="d0e2ddd8-efdc-4dce-b0fd-07c7411e37c2" name="Changes" comment="llamo a los productos con el commpontent-scan y actualizo README.md">
<change afterPath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/config/AppConfig.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/dao/Parser.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductoService.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductosDao.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductosDaoImplMemory.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/resources/productos.properties" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/resources/productos_data.csv" afterDir="false" />
<list default="true" id="d0e2ddd8-efdc-4dce-b0fd-07c7411e37c2" name="Changes" comment="actualizacion">
<change afterPath="$PROJECT_DIR$/DiagramaProductoServicios.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/ISercicioProductoDAO.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/Main.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/Producto.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/model/Producto.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/ProductoService.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/ProductosDaoImplMemory.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/beans.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/beans.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/config/AppConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/config/AppConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductoService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductoService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductosDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductosDao.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -52,29 +42,30 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"WebServerToolWindowFactoryState": "false",
"last_opened_file_path": "C:/ProyectosInteliJ/CarreraRelevos",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"project.structure.last.edited": "Modules",
"project.structure.proportion": "0.15",
"project.structure.side.proportion": "0.2",
"settings.editor.selected.configurable": "reference.settingsdialog.IDE.editor.colors.XML",
"spring.configuration.checksum": "ded2ef21d2f7ddd4afc5d55389ed18eb"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/ProyectosInteliJ/CarreraRelevos&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
&quot;project.structure.proportion&quot;: &quot;0.15&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.2&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;reference.settingsdialog.IDE.editor.colors.XML&quot;,
&quot;spring.configuration.checksum&quot;: &quot;dccd70c6d19ca6662595f61d544cf394&quot;
}
}]]></component>
}</component>
<component name="RecentsManager">
<key name="CreateClassDialog.RecentsKey">
<recent name="com.jorpelu.ServicioDeProductos" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\ProyectosInteliJ\ServicioDeProductos" />
<recent name="C:\ProyectosInteliJ\ServicioDeProductos\src\main\resources" />
</key>
<key name="CopyClassDialog.RECENTS_KEY">
@ -116,7 +107,9 @@
<workItem from="1669327599329" duration="2673000" />
<workItem from="1669370939836" duration="5274000" />
<workItem from="1669388229176" duration="732000" />
<workItem from="1669403092395" duration="19751000" />
<workItem from="1669403092395" duration="19788000" />
<workItem from="1669564909727" duration="32000" />
<workItem from="1669584773221" duration="2038000" />
</task>
<task id="LOCAL-00001" summary="innnit">
<created>1669371969480</created>
@ -174,7 +167,14 @@
<option name="project" value="LOCAL" />
<updated>1669481268777</updated>
</task>
<option name="localTasksCounter" value="9" />
<task id="LOCAL-00009" summary="actualizacion">
<created>1669492553112</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1669492553112</updated>
</task>
<option name="localTasksCounter" value="10" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -200,7 +200,8 @@
<MESSAGE value="Sigo sin conseguir anñadir Required, El resto me va bien" />
<MESSAGE value="Implementacion de @Autowired en la clase" />
<MESSAGE value="llamo a los productos con el commpontent-scan y actualizo README.md" />
<option name="LAST_COMMIT_MESSAGE" value="llamo a los productos con el commpontent-scan y actualizo README.md" />
<MESSAGE value="actualizacion" />
<option name="LAST_COMMIT_MESSAGE" value="actualizacion" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>


BIN
DiagramaProductoServicios.png View File

Before After
Width: 622  |  Height: 270  |  Size: 18 KiB

+ 8
- 1
README.md View File

@ -1,7 +1,9 @@
# Servicio de productos
### Introduccion
Creo un SpringCore Con el servicio de consultar productos
con sus precios y todas las caracteristicas.
con sus precios y todas las caracteristicas.
Añado más servicios aunque no los termino de utilizar en el main.
Añado el diagrama en el proyecto y lo adjunto al README.md
### Documentacion
### Files
- *Parser* Clase que se encarga de leeer el archivo CSV donde estan guardados los datos
@ -66,3 +68,8 @@ id=7
Process finished with exit code 0
~~~
# Diagrama
<br>
<br>
<img src="DiagramaProductoServicios.png">

+ 1
- 2
src/main/java/com/jorpelu/ServicioDeProductos/config/AppConfig.java View File

@ -13,14 +13,13 @@ import org.springframework.context.annotation.PropertySource;
public class AppConfig {
@Value("${file.path}")
private String file;
@Value("${file.csv.separator}")
private String separator;
public String getFile() {
return file;
}
public String getSeparator() {
return separator;
}


+ 18
- 0
src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductoService.java View File

@ -11,7 +11,25 @@ public class ProductoService{
@Autowired
private ProductosDao productoDAO;
public Producto productoByPosition(int pos){
return productoDAO.findByIndex(pos);
}
public void insert(Producto producto){
productoDAO.insert(producto);
}
public void edit(int pos, Producto producto){
productoDAO.edit(pos,producto);
}
public void delete(int pos){
productoDAO.delete(pos);
}
public void delete(Producto producto){
productoDAO.delete(producto);
}
public Collection<Producto> productoList(){
return productoDAO.findAll();
}
}

+ 0
- 1
src/main/java/com/jorpelu/ServicioDeProductos/dao/ProductosDao.java View File

@ -7,7 +7,6 @@ import java.util.Collection;
public interface ProductosDao {
Producto findByIndex(int index);
Collection<Producto> findAll();
void insert(Producto producto);
void edit(int index, Producto producto);
void delete(int index);


Loading…
Cancel
Save