Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Riina Antikainen
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1869d0d0
authored
May 23, 2014
by
Juho Juopperi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rest view for printedcard
1 parent
59563005
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
code/MoyaWeb/src/fi/codecrew/moya/rest/MetaRestView.java → code/MoyaWeb/src/fi/codecrew/moya/rest/meta/PrintedCardRestView.java
code/MoyaWeb/src/fi/codecrew/moya/rest/
Meta
RestView.java
→
code/MoyaWeb/src/fi/codecrew/moya/rest/
meta/PrintedCard
RestView.java
View file @
1869d0d
package
fi
.
codecrew
.
moya
.
rest
;
package
fi
.
codecrew
.
moya
.
rest
.
meta
;
import
java.util.List
;
...
...
@@ -17,28 +17,28 @@ import fi.codecrew.moya.beans.CardTemplateBeanLocal;
import
fi.codecrew.moya.model.PrintedCard
;
@RequestScoped
@Path
(
"/meta"
)
@Path
(
"/meta
/printedcard
"
)
@Consumes
({
MediaType
.
APPLICATION_JSON
,
MediaType
.
APPLICATION_XML
})
@Produces
({
MediaType
.
APPLICATION_JSON
+
"; charset=UTF-8"
})
public
class
Meta
RestView
{
public
class
PrintedCard
RestView
{
@EJB
CardTemplateBeanLocal
cardTemplateBeanLocal
;
/**
*
Get printed card metadata
.
*
Metadata for entity
.
*
* @param
cardI
d
* @param
i
d
* @param keys
* The path segments after card id
* @return
*/
@GET
@Path
(
"/
printedcard/
{id}/{keys:.*}"
)
public
String
getPrintedCardMeta
(
@PathParam
(
"id"
)
Integer
cardI
d
,
@Path
(
"/{id}/{keys:.*}"
)
public
String
getPrintedCardMeta
(
@PathParam
(
"id"
)
Integer
i
d
,
@PathParam
(
"key"
)
List
<
PathSegment
>
keys
)
{
PrintedCard
printedCard
=
cardTemplateBeanLocal
.
findCard
(
cardI
d
);
PrintedCard
printedCard
=
cardTemplateBeanLocal
.
findCard
(
i
d
);
JsonObject
meta
=
printedCard
.
getMeta
();
return
meta
.
toString
();
return
meta
.
toString
()
+
"\n"
;
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment