Commit f3923f7f authored by Elias Englmeier's avatar Elias Englmeier
Browse files

added new methods for the pitch field in service builder

parent ca73d750
......@@ -13,6 +13,6 @@
##
build.namespace=ANALYSIS
build.number=82
build.date=1522053776808
build.number=83
build.date=1522056491388
build.auto.upgrade=true
\ No newline at end of file
......@@ -13,6 +13,6 @@
##
build.namespace=GB
build.number=103
build.date=1522053781391
build.number=104
build.date=1522056496060
build.auto.upgrade=true
\ No newline at end of file
......@@ -211,12 +211,6 @@ public interface IdeasLocalService extends BaseLocalService,
@Indexable(type = IndexableType.REINDEX)
public Ideas updateIdeas(Ideas ideas);
/**
* Find all ideas with Rating rating.
*
* @param rating the exact rating
* @return a list with all ideas that have rating equal to param
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public int getIdeasRatingCount(long ideasId);
......@@ -415,6 +409,15 @@ public interface IdeasLocalService extends BaseLocalService,
public long dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection);
/**
* This is to be replaced or removed as soon as the elevator pitch functionality (Video recording in the browser) has been implemented.
*
* @param ideasId
* @param pitch
*/
public void addElevatorPitchToExisitingIdea(long ideasId,
java.lang.String pitch);
public void addTitlePictureToExistingIdea(long ideasId, long pictureId,
java.lang.String pictureRef);
......
......@@ -233,12 +233,6 @@ public class IdeasLocalServiceUtil {
return getService().updateIdeas(ideas);
}
/**
* Find all ideas with Rating rating.
*
* @param rating the exact rating
* @return a list with all ideas that have rating equal to param
*/
public static int getIdeasRatingCount(long ideasId) {
return getService().getIdeasRatingCount(ideasId);
}
......@@ -487,6 +481,17 @@ public class IdeasLocalServiceUtil {
return getService().dynamicQueryCount(dynamicQuery, projection);
}
/**
* This is to be replaced or removed as soon as the elevator pitch functionality (Video recording in the browser) has been implemented.
*
* @param ideasId
* @param pitch
*/
public static void addElevatorPitchToExisitingIdea(long ideasId,
java.lang.String pitch) {
getService().addElevatorPitchToExisitingIdea(ideasId, pitch);
}
public static void addTitlePictureToExistingIdea(long ideasId,
long pictureId, java.lang.String pictureRef) {
getService()
......
......@@ -240,12 +240,6 @@ public class IdeasLocalServiceWrapper implements IdeasLocalService,
return _ideasLocalService.updateIdeas(ideas);
}
/**
* Find all ideas with Rating rating.
*
* @param rating the exact rating
* @return a list with all ideas that have rating equal to param
*/
@Override
public int getIdeasRatingCount(long ideasId) {
return _ideasLocalService.getIdeasRatingCount(ideasId);
......@@ -516,6 +510,18 @@ public class IdeasLocalServiceWrapper implements IdeasLocalService,
return _ideasLocalService.dynamicQueryCount(dynamicQuery, projection);
}
/**
* This is to be replaced or removed as soon as the elevator pitch functionality (Video recording in the browser) has been implemented.
*
* @param ideasId
* @param pitch
*/
@Override
public void addElevatorPitchToExisitingIdea(long ideasId,
java.lang.String pitch) {
_ideasLocalService.addElevatorPitchToExisitingIdea(ideasId, pitch);
}
@Override
public void addTitlePictureToExistingIdea(long ideasId, long pictureId,
java.lang.String pictureRef) {
......
......@@ -171,6 +171,23 @@ public class IdeasLocalServiceImpl extends IdeasLocalServiceBaseImpl {
}
}
/**
* This is to be replaced or removed as soon as the elevator pitch functionality (Video recording in the browser) has been implemented.
* @param ideasId
* @param pitch
*/
public void addElevatorPitchToExisitingIdea(long ideasId, String pitch){
try {
Ideas i = IdeasUtil.findByPrimaryKey(ideasId);
i.setPitch(pitch);
i.persist();
} catch (NoSuchIdeasException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
private void startBackgroundVideoConversion(Ideas i, String convertTo, ThemeDisplay themeDisplay ) throws PortalException{
Map<String, Serializable> taskContextMap = new HashMap<String, Serializable>();
taskContextMap.put("ideasId",i.getPrimaryKey());
......@@ -448,38 +465,6 @@ public class IdeasLocalServiceImpl extends IdeasLocalServiceBaseImpl {
return result;
}
/**
* Find all ideas with Rating rating.
* @param rating the exact rating
* @return a list with all ideas that have rating equal to param
*/
// public List<Ideas> getIdeasByRating(int rating){
// ArrayList<Ideas> result = new ArrayList<Ideas>();
// for(Ideas i: IdeasUtil.findAll()){
// if(i.getRating() == rating){
// result.add(i);
// }
// }
// return result;
// }
//
// /**
// *
// * @param ratingRangeStart the start of the rating range.
// * @param ratingRangeEnd the end of the rating range.
// * @return a list with all ideas that are within the given range.
// */
// public List<Ideas> getIdeasByRatingRange(int ratingRangeStart, int ratingRangeEnd){
// ArrayList<Ideas> result = new ArrayList<Ideas>();
// for(Ideas i: IdeasUtil.findAll()){
// if(i.getRating() >= ratingRangeStart && i.getRating() <= ratingRangeEnd){
// result.add(i);
// }
// }
// return result;
// }
public int getIdeasRatingCount(long ideasId){
try {
Ideas i = IdeasLocalServiceUtil.getIdeas(ideasId);
......@@ -583,34 +568,6 @@ public class IdeasLocalServiceImpl extends IdeasLocalServiceBaseImpl {
return result;
}
//private void test(Ideas idea){
// //Search example
// SearchContext s = new SearchContext();
// s.setCompanyId(PortalUtil.getDefaultCompanyId());
// long [] gid = new long[1];
// gid[0] = idea.getGroupId();
// s.setGroupIds(gid);
//
// MoreLikeThisQuery t = new MoreLikeThisQuery(PortalUtil.getDefaultCompanyId());
//
// BooleanQueryImpl booleanQueryImpl=new BooleanQueryImpl();
// booleanQueryImpl.addRequiredTerm(Field.ENTRY_CLASS_NAME, Ideas.class.getName());
// booleanQueryImpl.addRequiredTerm(Field.STATUS, WorkflowConstants.STATUS_APPROVED);
// booleanQueryImpl.addRequiredTerm(Field.DESCRIPTION,"A");
// try {
// Hits results = null;
// results=SearchEngineHelperUtil.getSearchEngine(SearchEngineHelperUtil.getDefaultSearchEngineId()).getIndexSearcher().search(s, booleanQueryImpl);
// Document[] docs = results.getDocs();
// for(int i=0; i<docs.length; i++){
// System.out.println(i + " : " + docs[i]);
// }
// } catch (SearchException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// }
}
......
......@@ -13,6 +13,6 @@
##
build.namespace=IDEA
build.number=236
build.date=1522053786277
build.number=237
build.date=1522056500921
build.auto.upgrade=true
\ No newline at end of file
......@@ -13,6 +13,6 @@
##
build.namespace=PROJECT
build.number=148
build.date=1522053789021
build.number=149
build.date=1522056503700
build.auto.upgrade=true
\ No newline at end of file
......@@ -13,6 +13,6 @@
##
build.namespace=SURVEY
build.number=247
build.date=1522053794065
build.number=248
build.date=1522056508892
build.auto.upgrade=true
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment