Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
civitas-digitalis
platform
Commits
509f92ad
Commit
509f92ad
authored
Dec 22, 2017
by
Elias Englmeier
Browse files
more workflow
parent
f24ab260
Changes
8
Hide whitespace changes
Inline
Side-by-side
modules/ideaService/ideaService-api/bin/ideaService/service/IdeasLocalService.class
View file @
509f92ad
No preview for this file type
modules/ideaService/ideaService-api/bin/ideaService/service/IdeasLocalServiceUtil.class
View file @
509f92ad
No preview for this file type
modules/ideaService/ideaService-api/bin/ideaService/service/IdeasLocalServiceWrapper.class
View file @
509f92ad
No preview for this file type
modules/ideaService/ideaService-api/src/main/java/ideaService/service/IdeasLocalService.java
View file @
509f92ad
...
...
@@ -113,10 +113,6 @@ public interface IdeasLocalService extends BaseLocalService,
/**
* Creates a new Idea using the supplied parameters.
* created date, modified date and user name are set automatically.
*
* @param videoFileRef
* @param videoUrl
*/
public
Ideas
createIdeasWithAutomatedDbId
(
java
.
lang
.
String
title
,
long
userId
,
long
groupId
,
long
category
,
java
.
lang
.
String
titleImgRef
,
...
...
@@ -126,6 +122,22 @@ public interface IdeasLocalService extends BaseLocalService,
java
.
lang
.
String
pageUrl
,
long
layoutRef
,
long
videoFileRef
,
java
.
lang
.
String
videoUrl
,
ReviewStatus
reviewStatus
);
/**
* This method is used to create a intermediate Idea with less information in the first step of the input process.
*
* @param userId
* @param groupId
* @param title
* @return
*/
public
Ideas
createIdeasWithAutomatedDbId
(
long
userId
,
long
projectRef
,
long
groupId
,
long
layoutRef
,
java
.
lang
.
String
title
,
java
.
lang
.
String
solution
,
java
.
lang
.
String
description
,
java
.
lang
.
String
importance
,
java
.
lang
.
String
targetAudience
,
java
.
lang
.
String
tags
,
java
.
lang
.
String
goal
,
java
.
lang
.
String
pageUrl
,
double
latitude
,
double
longitude
,
ReviewStatus
reviewStatus
,
boolean
isVisibleOnMap
);
/**
* Deletes the ideas from the database. Also notifies the appropriate model listeners.
*
...
...
@@ -395,6 +407,8 @@ public interface IdeasLocalService extends BaseLocalService,
public
long
dynamicQueryCount
(
DynamicQuery
dynamicQuery
,
Projection
projection
);
public
void
approveIdea
(
long
ideasId
);
/**
* persists the new Idea and performs some checks e.g. if the entry is a duplicate it won't be inserted.
*
...
...
@@ -402,4 +416,6 @@ public interface IdeasLocalService extends BaseLocalService,
*/
@Indexable
(
type
=
IndexableType
.
REINDEX
)
public
void
persistIdeasAndPerformTypeChecks
(
Ideas
idea
);
public
void
rejectIdea
(
long
IdeasId
);
}
\ No newline at end of file
modules/ideaService/ideaService-api/src/main/java/ideaService/service/IdeasLocalServiceUtil.java
View file @
509f92ad
...
...
@@ -106,10 +106,6 @@ public class IdeasLocalServiceUtil {
/**
* Creates a new Idea using the supplied parameters.
* created date, modified date and user name are set automatically.
*
* @param videoFileRef
* @param videoUrl
*/
public
static
ideaService
.
model
.
Ideas
createIdeasWithAutomatedDbId
(
java
.
lang
.
String
title
,
long
userId
,
long
groupId
,
long
category
,
...
...
@@ -127,6 +123,29 @@ public class IdeasLocalServiceUtil {
reviewStatus
);
}
/**
* This method is used to create a intermediate Idea with less information in the first step of the input process.
*
* @param userId
* @param groupId
* @param title
* @return
*/
public
static
ideaService
.
model
.
Ideas
createIdeasWithAutomatedDbId
(
long
userId
,
long
projectRef
,
long
groupId
,
long
layoutRef
,
java
.
lang
.
String
title
,
java
.
lang
.
String
solution
,
java
.
lang
.
String
description
,
java
.
lang
.
String
importance
,
java
.
lang
.
String
targetAudience
,
java
.
lang
.
String
tags
,
java
.
lang
.
String
goal
,
java
.
lang
.
String
pageUrl
,
double
latitude
,
double
longitude
,
ideasService
.
service
.
enums
.
ReviewStatus
reviewStatus
,
boolean
isVisibleOnMap
)
{
return
getService
()
.
createIdeasWithAutomatedDbId
(
userId
,
projectRef
,
groupId
,
layoutRef
,
title
,
solution
,
description
,
importance
,
targetAudience
,
tags
,
goal
,
pageUrl
,
latitude
,
longitude
,
reviewStatus
,
isVisibleOnMap
);
}
/**
* Deletes the ideas from the database. Also notifies the appropriate model listeners.
*
...
...
@@ -459,6 +478,10 @@ public class IdeasLocalServiceUtil {
return
getService
().
dynamicQueryCount
(
dynamicQuery
,
projection
);
}
public
static
void
approveIdea
(
long
ideasId
)
{
getService
().
approveIdea
(
ideasId
);
}
/**
* persists the new Idea and performs some checks e.g. if the entry is a duplicate it won't be inserted.
*
...
...
@@ -469,6 +492,10 @@ public class IdeasLocalServiceUtil {
getService
().
persistIdeasAndPerformTypeChecks
(
idea
);
}
public
static
void
rejectIdea
(
long
IdeasId
)
{
getService
().
rejectIdea
(
IdeasId
);
}
public
static
IdeasLocalService
getService
()
{
return
_serviceTracker
.
getService
();
}
...
...
modules/ideaService/ideaService-api/src/main/java/ideaService/service/IdeasLocalServiceWrapper.java
View file @
509f92ad
...
...
@@ -106,10 +106,6 @@ public class IdeasLocalServiceWrapper implements IdeasLocalService,
/**
* Creates a new Idea using the supplied parameters.
* created date, modified date and user name are set automatically.
*
* @param videoFileRef
* @param videoUrl
*/
@Override
public
ideaService
.
model
.
Ideas
createIdeasWithAutomatedDbId
(
...
...
@@ -127,6 +123,29 @@ public class IdeasLocalServiceWrapper implements IdeasLocalService,
reviewStatus
);
}
/**
* This method is used to create a intermediate Idea with less information in the first step of the input process.
*
* @param userId
* @param groupId
* @param title
* @return
*/
@Override
public
ideaService
.
model
.
Ideas
createIdeasWithAutomatedDbId
(
long
userId
,
long
projectRef
,
long
groupId
,
long
layoutRef
,
java
.
lang
.
String
title
,
java
.
lang
.
String
solution
,
java
.
lang
.
String
description
,
java
.
lang
.
String
importance
,
java
.
lang
.
String
targetAudience
,
java
.
lang
.
String
tags
,
java
.
lang
.
String
goal
,
java
.
lang
.
String
pageUrl
,
double
latitude
,
double
longitude
,
ideasService
.
service
.
enums
.
ReviewStatus
reviewStatus
,
boolean
isVisibleOnMap
)
{
return
_ideasLocalService
.
createIdeasWithAutomatedDbId
(
userId
,
projectRef
,
groupId
,
layoutRef
,
title
,
solution
,
description
,
importance
,
targetAudience
,
tags
,
goal
,
pageUrl
,
latitude
,
longitude
,
reviewStatus
,
isVisibleOnMap
);
}
/**
* Deletes the ideas from the database. Also notifies the appropriate model listeners.
*
...
...
@@ -486,6 +505,11 @@ public class IdeasLocalServiceWrapper implements IdeasLocalService,
return
_ideasLocalService
.
dynamicQueryCount
(
dynamicQuery
,
projection
);
}
@Override
public
void
approveIdea
(
long
ideasId
)
{
_ideasLocalService
.
approveIdea
(
ideasId
);
}
/**
* persists the new Idea and performs some checks e.g. if the entry is a duplicate it won't be inserted.
*
...
...
@@ -496,6 +520,11 @@ public class IdeasLocalServiceWrapper implements IdeasLocalService,
_ideasLocalService
.
persistIdeasAndPerformTypeChecks
(
idea
);
}
@Override
public
void
rejectIdea
(
long
IdeasId
)
{
_ideasLocalService
.
rejectIdea
(
IdeasId
);
}
@Override
public
IdeasLocalService
getWrappedService
()
{
return
_ideasLocalService
;
...
...
modules/ideaService/ideaService-service/bin/ideaService/service/impl/IdeasLocalServiceImpl.class
View file @
509f92ad
No preview for this file type
modules/ideaService/ideaService-service/src/main/java/ideaService/service/impl/IdeasLocalServiceImpl.java
View file @
509f92ad
...
...
@@ -80,18 +80,38 @@ public class IdeasLocalServiceImpl extends IdeasLocalServiceBaseImpl {
if
(
role
.
equals
(
RoleConstants
.
ADMINISTRATOR
)
||
role
.
equals
(
RoleConstants
.
PORTAL_CONTENT_REVIEWER
)){
result
.
add
(
i
);
}
}
else
if
((
role
.
equals
(
RoleConstants
.
USER
)
&&
i
.
getUserId
()
==
userId
)
||
i
.
getReviewStatus
().
equals
(
ReviewStatus
.
ACCEPTED
.
getReviewStatusDescription
())){
else
if
(
role
.
equals
(
RoleConstants
.
USER
)
&&
i
.
getUserId
()
==
userId
){
result
.
add
(
i
);
}
else
if
(
i
.
getReviewStatus
().
equals
(
ReviewStatus
.
ACCEPTED
.
getReviewStatusDescription
())){
result
.
add
(
i
);
}
}
}
return
result
;
}
public
void
approveIdea
(
long
ideasId
){
try
{
Ideas
i
=
IdeasUtil
.
findByPrimaryKey
(
ideasId
);
i
.
setReviewStatus
(
ReviewStatus
.
ACCEPTED
.
getReviewStatusDescription
());
i
.
persist
();
}
catch
(
NoSuchIdeasException
e
)
{
e
.
printStackTrace
();
}
}
public
void
rejectIdea
(
long
IdeasId
){
try
{
Ideas
i
=
IdeasUtil
.
findByPrimaryKey
(
IdeasId
);
i
.
setReviewStatus
(
ReviewStatus
.
REJECTED
.
getReviewStatusDescription
());
i
.
persist
();
}
catch
(
NoSuchIdeasException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
/**
* Gets all Ideas that reference layoutRef
*/
...
...
@@ -144,9 +164,6 @@ public class IdeasLocalServiceImpl extends IdeasLocalServiceBaseImpl {
/**
* Creates a new Idea using the supplied parameters.
* created date, modified date and user name are set automatically.
* @param videoFileRef
* @param videoUrl
*/
public
Ideas
createIdeasWithAutomatedDbId
(
String
title
,
long
userId
,
long
groupId
,
long
category
,
String
titleImgRef
,
String
shortDescription
,
String
description
,
double
latitude
,
double
longitude
,
boolean
published
,
boolean
showOnMap
,
...
...
@@ -181,6 +198,49 @@ public class IdeasLocalServiceImpl extends IdeasLocalServiceBaseImpl {
return
nextIdea
;
}
/**
* This method is used to create a intermediate Idea with less information in the first step of the input process.
* @param userId
* @param groupId
* @param title
* @return
*/
public
Ideas
createIdeasWithAutomatedDbId
(
long
userId
,
long
projectRef
,
long
groupId
,
long
layoutRef
,
String
title
,
String
solution
,
String
description
,
String
importance
,
String
targetAudience
,
String
tags
,
String
goal
,
String
pageUrl
,
double
latitude
,
double
longitude
,
ReviewStatus
reviewStatus
,
boolean
isVisibleOnMap
){
int
nextDbId
=
(
int
)
CounterLocalServiceUtil
.
increment
(
Ideas
.
class
.
getName
());
Ideas
nextIdea
=
IdeasLocalServiceUtil
.
createIdeas
(
nextDbId
);
nextIdea
.
setUserId
(
userId
);
nextIdea
.
setProjectRef
(
projectRef
);
nextIdea
.
setGroupId
(
groupId
);
nextIdea
.
setPageUrl
(
pageUrl
);
nextIdea
.
setLayoutRef
(
layoutRef
);
nextIdea
.
setTitle
(
title
);
nextIdea
.
setDescription
(
description
);
nextIdea
.
setImportance
(
importance
);
nextIdea
.
setTargetAudience
(
targetAudience
);
nextIdea
.
setSolution
(
solution
);
nextIdea
.
setTags
(
tags
);
nextIdea
.
setGoal
(
goal
);
nextIdea
.
setPageUrl
(
pageUrl
);
nextIdea
.
setLatitude
(
latitude
);
nextIdea
.
setLongitude
(
longitude
);
nextIdea
.
setReviewStatus
(
reviewStatus
.
getReviewStatusDescription
());
nextIdea
.
setIsVisibleOnMap
(
isVisibleOnMap
);
try
{
User
user
=
UserLocalServiceUtil
.
getUser
(
userId
);
nextIdea
.
setUserName
(
user
.
getScreenName
());
}
catch
(
PortalException
e
)
{
e
.
printStackTrace
();
}
return
nextIdea
;
}
/**
* persists the new Idea and performs some checks e.g. if the entry is a duplicate it won't be inserted.
* @param idea
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
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 comment