Blame | Last modification | View Log | RSS feed
package in.shop2020.metamodel.util;import in.shop2020.metamodel.core.BulletDataObject;import in.shop2020.metamodel.core.Entity;import in.shop2020.metamodel.core.EntityState;import in.shop2020.metamodel.core.ExpertReview;import in.shop2020.metamodel.core.ExpertReviewSource;import in.shop2020.metamodel.core.Feature;import in.shop2020.metamodel.core.Helpdoc;import in.shop2020.metamodel.core.Slide;import in.shop2020.metamodel.core.SpecialPage;import in.shop2020.metamodel.definitions.Catalog;import in.shop2020.metamodel.definitions.Category;import in.shop2020.metamodel.definitions.CategorySlideDefinition;import in.shop2020.storage.bdb.StorageManager;import in.shop2020.storage.mongo.adapters.BDOAdapter;import in.shop2020.util.Utils;import java.io.File;import java.io.PrintWriter;import java.io.StringWriter;import java.io.Writer;import java.util.ArrayList;import java.util.Collection;import java.util.Date;import java.util.HashMap;import java.util.HashSet;import java.util.List;import java.util.Map;import java.util.Set;import com.google.gson.Gson;import com.google.gson.GsonBuilder;/*** All storage and retrival utility methods* @author rajveer**/public class CreationUtils1 {private static final String LEARNED_BULLETS = "LEARNED_BULLETS";private static final String DEFAULT_ENTITY_SCORES = "DEFAULT_ENTITY_SCORES";private static final String FACET_VALUES = "FACET_VALUES";private static final String SLIDE_SCORES = "SLIDE_SCORES";private static final String CUSTOM_SLIDE_SCORES = "CUSTOM_SLIDE_SCORES";private static final String CONTENT_GENERATION_TIME = "CONTENT_GENERATION_TIME";private static final String INCONSISTENT_ENTITIES = "INCONSISTENT_ENTITIES";private static final String HELPDOC_ENTITYIDS = "HELPDOC_ENTITYIDS";private static final String RELATED_ACCESSORIES = "RELATED_ACCESSORIES";private static final String COMPARISON_STATS = "COMPARISON_STATS";private static final String SEARCH_STATS = "SEARCH_STATS";private static final String SYNONYMS = "SYNONYMS";private static final String EXPERT_REVIEWS = "EXPERT_REVIEWS";private static final String EXPERT_REVIEW_SOURCES = "EXPERT_REVIEW_SOURCES";private static long helpDocId;private static long specialPageId;/**** @param aThrowable* @return*/public static String getStackTrace(Throwable aThrowable) {final Writer result = new StringWriter();final PrintWriter printWriter = new PrintWriter(result);aThrowable.printStackTrace(printWriter);return result.toString();}/**** @param entity* @throws Exception*/public static void storeInconsistentEntities(List<Long> inconsistentEntities) throws Exception {StorageManager.getStorageManager().storeDataObject(CreationUtils1.INCONSISTENT_ENTITIES, inconsistentEntities);}/**** @return* @throws Exception*/@SuppressWarnings("unchecked")public static List<Long> getInconsistentEntities() throws Exception {return (List<Long>) StorageManager.getStorageManager().getDataObject(CreationUtils1.INCONSISTENT_ENTITIES);}/**** @param entity* @throws Exception*/public static void storeLearnedBullets(Map<Long, List<ExpandedBullet>> learnedBullets) throws Exception {StorageManager.getStorageManager().storeDataObject(CreationUtils1.LEARNED_BULLETS, learnedBullets);}/**** @return* @throws Exception*/@SuppressWarnings("unchecked")public static Map<Long, List<ExpandedBullet>> getLearnedBullets() throws Exception {return (Map<Long, List<ExpandedBullet>>) StorageManager.getStorageManager().getDataObject(CreationUtils1.LEARNED_BULLETS);}/**** @param entity* @throws Exception*/public static void storeHelpdocEntityIds(Map<Long, List<Long>> helpdocEntityIds) throws Exception {StorageManager.getStorageManager().storeDataObject(CreationUtils1.HELPDOC_ENTITYIDS, helpdocEntityIds);}/**** @return* @throws Exception*/@SuppressWarnings("unchecked")public static Map<Long, List<Long>> getHelpdocEntityIds() throws Exception {return (Map<Long, List<Long>>) StorageManager.getStorageManager().getDataObject(CreationUtils1.HELPDOC_ENTITYIDS);}/**** @param entity* @throws Exception*/public static void storeRelatedAccessories(Map<Long, Map<Long, List<Long>>> relatedAccessories) throws Exception {StorageManager.getStorageManager().storeDataObject(CreationUtils1.RELATED_ACCESSORIES, relatedAccessories);}/**** @param Synonym that contains map of brand/category name as keys and their synonyms as values.* @throws Exception*/@SuppressWarnings("unchecked")public static Map<String, Map<String, String>> getSynonyms() throws Exception {return (Map<String, Map<String,String>>)StorageManager.getStorageManager().getDataObject(CreationUtils1.SYNONYMS);}/**** @param Synonym that contains map of brand/category name as keys and their synonyms as values.* @throws Exception*/public static void storeSynonyms(Map<String, Map<String, String>> synonyms) throws Exception {StorageManager.getStorageManager().storeDataObject(CreationUtils1.SYNONYMS, synonyms);}/**** @param Synonym that contains map of brand/category name as keys and their synonyms as values.* @throws Exception*/@SuppressWarnings("unchecked")public static Map<Long, List<ExpertReview>> getExpertReviews() throws Exception {return (Map<Long, List<ExpertReview>>)StorageManager.getStorageManager().getDataObject(CreationUtils1.EXPERT_REVIEWS);}/**** @param Synonym that contains map of brand/category name as keys and their synonyms as values.* @throws Exception*/@SuppressWarnings("unchecked")public static List<ExpertReview> getExpertReviewByEntity(long entityId) throws Exception {return ((Map<Long, List<ExpertReview>>)StorageManager.getStorageManager().getDataObject(CreationUtils1.EXPERT_REVIEWS)).get(entityId);}public static Set<ExpertReviewSource> getExpertReviewSources() throws Exception {return (Set<ExpertReviewSource>)StorageManager.getStorageManager().getDataObject(CreationUtils1.EXPERT_REVIEW_SOURCES);}public static void addExpertReviewSource(ExpertReviewSource expertReviewSource) throws Exception {Set<ExpertReviewSource> expertReviewSources = (Set<ExpertReviewSource>)StorageManager.getStorageManager().getDataObject(CreationUtils1.EXPERT_REVIEW_SOURCES);if(expertReviewSources == null){expertReviewSources = new HashSet<ExpertReviewSource>();}expertReviewSources.add(expertReviewSource);StorageManager.getStorageManager().storeDataObject(CreationUtils1.EXPERT_REVIEW_SOURCES, expertReviewSources);}public static void deleteExpertReviewSource(ExpertReviewSource expertReviewSource) throws Exception {Set<ExpertReviewSource> expertReviewSources = (Set<ExpertReviewSource>)StorageManager.getStorageManager().getDataObject(CreationUtils1.EXPERT_REVIEW_SOURCES);expertReviewSources.remove(expertReviewSource);StorageManager.getStorageManager().storeDataObject(CreationUtils1.EXPERT_REVIEW_SOURCES, expertReviewSources);}/**** @param Synonym that contains map of brand/category name as keys and their synonyms as values.* @throws Exception*/public static void storeExpertReview(long entityId, ExpertReview expertReview) throws Exception {Map<Long, List<ExpertReview>> expertReviewMap = (Map<Long, List<ExpertReview>>)StorageManager.getStorageManager().getDataObject(CreationUtils1.EXPERT_REVIEWS);if(expertReviewMap == null){expertReviewMap = new HashMap<Long, List<ExpertReview>>();}EntityState es = CreationUtils1.getEntityState(entityId);es.setMerkedReadyOn(new Date());CreationUtils1.updateEntityState(es);List<ExpertReview> er = expertReviewMap.get(entityId);if(er == null) {er = new ArrayList<ExpertReview>();expertReviewMap.put(entityId, er);}er.add(expertReview);StorageManager.getStorageManager().storeDataObject(CreationUtils1.EXPERT_REVIEWS, expertReviewMap);}public static void storeExpertReview(long entityId, List<ExpertReview> expertReviews) throws Exception {Map<Long, List<ExpertReview>> expertReviewMap = (Map<Long, List<ExpertReview>>)StorageManager.getStorageManager().getDataObject(CreationUtils1.EXPERT_REVIEWS);expertReviewMap.put(entityId, expertReviews);StorageManager.getStorageManager().storeDataObject(CreationUtils1.EXPERT_REVIEWS, expertReviewMap);}public static void deleteExpertReview(long entityId, int index) throws Exception {Map<Long, List<ExpertReview>> expertReviewMap = (Map<Long, List<ExpertReview>>)StorageManager.getStorageManager().getDataObject(CreationUtils1.EXPERT_REVIEWS);List<ExpertReview> er = expertReviewMap.get(entityId);er.remove(index);EntityState es = CreationUtils1.getEntityState(entityId);es.setMerkedReadyOn(new Date());CreationUtils1.updateEntityState(es);StorageManager.getStorageManager().storeDataObject(CreationUtils1.EXPERT_REVIEWS, expertReviewMap);}/**** @param Synonym that contains map of brand/category name as keys and their synonyms as values.* @throws Exception*/public static void deleteExpertReviews(long entityId) throws Exception {Map<Long, List<ExpertReview>> expertReviewMap = (Map<Long, List<ExpertReview>>)StorageManager.getStorageManager().getDataObject(CreationUtils1.EXPERT_REVIEWS);expertReviewMap.remove(entityId);EntityState es = CreationUtils1.getEntityState(entityId);es.setMerkedReadyOn(new Date());CreationUtils1.updateEntityState(es);StorageManager.getStorageManager().storeDataObject(CreationUtils1.EXPERT_REVIEWS, expertReviewMap);}/**** @return* @throws Exception*/@SuppressWarnings("unchecked")public static Map<Long, Map<Long, List<Long>>> getRelatedAccessories() throws Exception {return (Map<Long, Map<Long, List<Long>>>) StorageManager.getStorageManager().getDataObject(CreationUtils1.RELATED_ACCESSORIES);}/**** @param entity* @throws Exception*/public static void storeComparisonStats(Map<Long, Map<Long, Long>> comparisonStats) throws Exception {StorageManager.getStorageManager().storeDataObject(CreationUtils1.COMPARISON_STATS, comparisonStats);}/**** @return* @throws Exception*/@SuppressWarnings("unchecked")public static Map<Long, Map<Long, Long>> getComparisonStats() throws Exception {return (Map<Long, Map<Long, Long>>) StorageManager.getStorageManager().getDataObject(CreationUtils1.COMPARISON_STATS);}/**** @param entity* @throws Exception*/public static void storeSearchStats(String date, List<String> searchStats) throws Exception {StorageManager.getStorageManager().storeDataObject(CreationUtils1.SEARCH_STATS + date, searchStats);}/**** @param entity* @throws Exception*/public static void deleteSearchStats(String date) throws Exception {StorageManager.getStorageManager().deleteDataObject(CreationUtils1.SEARCH_STATS + date);}/**** @return* @throws Exception*/@SuppressWarnings("unchecked")public static List<String> getSearchStats(String date) throws Exception {return (List<String>) StorageManager.getStorageManager().getDataObject(CreationUtils1.SEARCH_STATS + date);}/**** @param featureDefinitionID* @return* @throws Exception*/@SuppressWarnings("unchecked")public static List<ExpandedBullet> getLearnedBullets(long featureDefinitionID) throws Exception {Map<Long, List<ExpandedBullet>> learnedBullets = (Map<Long, List<ExpandedBullet>>) StorageManager.getStorageManager().getDataObject(CreationUtils1.LEARNED_BULLETS);if(learnedBullets==null){return null;}return learnedBullets.get(featureDefinitionID);}/**** @param facetIDFacetValues* @throws Exception*/public static void storeFacetValues(Map<Long, List<String>> facetIDFacetValues) throws Exception {StorageManager.getStorageManager().storeDataObject(CreationUtils1.FACET_VALUES, facetIDFacetValues);}/**** @return* @throws Exception*/@SuppressWarnings("unchecked")public static Map<Long, List<String>> getFacetValues() throws Exception {return (Map<Long, List<String>>) StorageManager.getStorageManager().getDataObject(CreationUtils1.FACET_VALUES);}/**** @param facetDefinitionID* @return* @throws Exception*/@SuppressWarnings("unchecked")public static List<String> getFacetValues(long facetDefinitionID) throws Exception {Map<Long, List<String>> facetValues = (Map<Long, List<String>>) StorageManager.getStorageManager().getDataObject(CreationUtils1.FACET_VALUES);return facetValues.get(facetDefinitionID);}/**** @param slideScoresByEntity* @throws Exception*/public static void storeSlideScores( Map<Long, Map<Long, Double>> slideScoresByEntity) throws Exception {StorageManager.getStorageManager().storeDataObject(CreationUtils1.SLIDE_SCORES, slideScoresByEntity);}/**** @return* @throws Exception*/@SuppressWarnings("unchecked")public static Map<Long, Map<Long, Double>> getSlideScores() throws Exception {return (Map<Long, Map<Long, Double>>) StorageManager.getStorageManager().getDataObject(CreationUtils1.SLIDE_SCORES);}/**** @param entityID* @return* @throws Exception*/@SuppressWarnings("unchecked")public static Map<Long, Double> getSlideComparisonScores(long entityID) throws Exception{Map<Long, Map<Long, Double>> slideScores = (Map<Long, Map<Long, Double>>) StorageManager.getStorageManager().getDataObject(CreationUtils1.SLIDE_SCORES);return slideScores.get(entityID);}/**** @param entityID* @return* @throws Exception*/@SuppressWarnings("unchecked")public static Map<Long, Double> getCustomSlideComparisonScores(long entityID) throws Exception{return (Map<Long, Double>) StorageManager.getStorageManager().getDataObject(CreationUtils1.SLIDE_SCORES + entityID);}/**** @param entityID* @return* @throws Exception*/public static void storeCustomSlideComparisonScores(long entityID, Map<Long, Double> customSlideScores) throws Exception{StorageManager.getStorageManager().storeDataObject(CreationUtils1.SLIDE_SCORES + entityID, customSlideScores);}/**** @param finalScoreByEntityID* @throws Exception*/public static void storeDefaultEntityScores(Map<Long, Double> finalScoreByEntityID) throws Exception {StorageManager.getStorageManager().storeDataObject(CreationUtils1.DEFAULT_ENTITY_SCORES, finalScoreByEntityID);}/**** @return* @throws Exception*/@SuppressWarnings("unchecked")public static Map<Long, Integer> getDefaultEntityScores() throws Exception {return (Map<Long, Integer>) StorageManager.getStorageManager().getDataObject(CreationUtils1.DEFAULT_ENTITY_SCORES);}/**** @param entityID* @return* @throws Exception*/@SuppressWarnings("unchecked")public static Integer getEntityComparisonScores(long entityID) throws Exception {Map<Long, Integer> scoresMap = (Map<Long, Integer>) StorageManager.getStorageManager().getDataObject(CreationUtils1.DEFAULT_ENTITY_SCORES);Integer objScore = scoresMap.get(entityID);if(objScore==null){return -1;}return objScore;}/**** @return* @throws Exception*/public static Long getLastContentGenerationTime() throws Exception {return (Long) StorageManager.getStorageManager().getDataObject(CreationUtils1.CONTENT_GENERATION_TIME);}/**** @param storageTime* @throws Exception*/public static void storeLastContentGenerationTime(Long storageTime) throws Exception {StorageManager.getStorageManager().storeDataObject(CreationUtils1.CONTENT_GENERATION_TIME, storageTime);}/*** Resolves Entity ID into Entity object** @param entityID* @return Entity* @throws Exception*/public static Entity getEntity(long entityID) throws Exception{return StorageManager.getStorageManager().getEntity(entityID);}/**** @param entity* @throws Exception*/public static void updateEntity(Entity entity) throws Exception {//FIXME This should not happen here.entity.reorderSlides(entity.getSlideSequence());CreationUtils1.learn(entity);StorageManager.getStorageManager().updateEntity(entity);}/**** @param entity* @param entityMetadata* @throws Exception*/public static void createEntity(Entity entity, EntityState entityMetadata) throws Exception {/** Creating media directory by default. Even if there is no media uploaded yet.*/String mediaDirPath = Utils.CONTENT_DB_PATH + "media" + File.separator + entity.getID();File mediaDir = new File(mediaDirPath);if(!mediaDir.exists()) {mediaDir.mkdir();}StorageManager.getStorageManager().createEntity(entity, entityMetadata);}/**** @param entityId* @throws Exception*/public static void deleteEntity(long entityId) throws Exception {StorageManager.getStorageManager().deleteEntity(entityId);}/**** @return* @throws Exception*/public static Map<Long, EntityState> getEntitiesState() throws Exception {return StorageManager.getStorageManager().getEntitiesMetadata();}/**** @param entityId* @return* @throws Exception*/public static EntityState getEntityState(long entityId) throws Exception {return StorageManager.getStorageManager().getEntityMetadata(entityId);}/**** @param entityMetadata* @throws Exception*/public static void updateEntityState(EntityState entityMetadata) throws Exception {StorageManager.getStorageManager().updateEntityMetadata(entityMetadata);}/**** @param entity* @throws Exception*/private static void learn(Entity entity) throws Exception{CN cn = new CN();cn.learn(entity);cn.learnHelpdocs(entity);}/**** @return* @throws Exception*/public static Map<Long, Entity> getEntities() throws Exception {return StorageManager.getStorageManager().getEntities();}/**** @param categoryId* @return* @throws Exception*/public static Collection<Entity> getEntities(long categoryId) throws Exception {return StorageManager.getStorageManager().getEntitisByCategory(categoryId);}public static void storeHelpdoc(Helpdoc helpdoc) throws Exception {StorageManager.getStorageManager().updateHelpdoc(helpdoc);}public static Helpdoc getHelpdoc(Long helpdocId) throws Exception {return StorageManager.getStorageManager().getHelpdoc(helpdocId);}public static Map<Long, Helpdoc> getHelpdocs() throws Exception {return StorageManager.getStorageManager().getHelpdocs();}public static void deleteHelpdoc(Long helpdocId) throws Exception {StorageManager.getStorageManager().deleteHelpdoc(helpdocId);}public static long getNewHelpdocId() {if(helpDocId == 0){helpDocId = 200000;Map<Long, Helpdoc> helpdocs = StorageManager.getStorageManager().getHelpdocs();if(helpdocs != null){for(long id : StorageManager.getStorageManager().getHelpdocs().keySet()){if(helpDocId <= id){helpDocId = id;}}}}return ++helpDocId;}/**** @param slide* @param featureDefinitionID* @return Feature*/public static Feature getFeature(Slide slide, long featureDefinitionID) {List<Feature> features = slide.getFeatures();if(features != null) {for(Feature feature : features) {if(feature.getFeatureDefinitionID() == featureDefinitionID) {return feature;}}}Feature feature = null;List<Slide> childrenSlides = slide.getChildrenSlides();if(childrenSlides != null) {for(Slide childSlide : childrenSlides) {feature = CreationUtils1.getFeature(childSlide, featureDefinitionID);if(feature == null) {continue;}else {break;}}}return feature;}/*** Utility method to find out Slide object in Entity instance** @param entityID* @param slideDefinitionID* @return* @throws Exception*/public static Slide getSlide(long entityID, long slideDefinitionID)throws Exception {Entity entity = CreationUtils1.getEntity(entityID);List<Slide> slides = entity.getSlides();Slide resultSlide = null;if(slides != null) {for(Slide slide : slides) {if(slide.getSlideDefinitionID() == slideDefinitionID) {return slide;}resultSlide = CreationUtils1.getSlide(slide, slideDefinitionID);if(resultSlide == null) {continue;}else {break;}}}return resultSlide;}/**** @param slide* @param slideDefinitionID* @return*/public static Slide getSlide(Slide slide, long slideDefinitionID) {List<Slide> childrenSlides = slide.getChildrenSlides();Slide resultSlide = null;if(childrenSlides != null) {for(Slide childSlide : childrenSlides) {if(childSlide.getSlideDefinitionID() == slideDefinitionID) {return childSlide;}resultSlide = CreationUtils1.getSlide(childSlide, slideDefinitionID);if(resultSlide == null) {continue;}else {break;}}}return resultSlide;}/*** Utility method to find out Feature object in Entity instance** @param entityID* @param featureDefinitionID* @return Feature* @throws Exception*/public static Feature getFeature(long entityID, long featureDefinitionID)throws Exception {Entity entity = CreationUtils1.getEntity(entityID);Feature feature = null;List<Slide> slides = entity.getSlides();for(Slide slide : slides) {feature = CreationUtils1.getFeature(slide, featureDefinitionID);// Until all slides are searchedif(feature == null) {continue;}else {break;}}return feature;}/*** Returns expand form of entity object. All references are resolved into* corresponding detail object** @param entityID* @return ExpandedEntity* @throws Exception*/public static ExpandedEntity getExpandedEntity(long entityID) throws Exception {Entity entity = CreationUtils1.getEntity(entityID);if(entity==null){System.out.println("Entity is null");return null;}System.out.println( entity.getCategoryID());ExpandedEntity expEntity = new ExpandedEntity(entity);return expEntity;}/*** Returns list of borrowed slides** @param entity* @return list of borrowed slides*/public static List<Slide> getBorrowedSlides(Entity entity) {List<Slide> borrowedSlides = new ArrayList<Slide>();List<Slide> slides = entity.getSlides();for(Slide slide : slides) {if(CreationUtils1.isBorrowedSlide(slide.getSlideDefinitionID(), entity.getCategoryID())) {borrowedSlides.add(slide);}}return borrowedSlides;}/*** Returns first parent slide with matching label** @param expEntity2* @param slideLabel* @return Null if not found*/public static ExpandedSlide getParentExpandedSlide(ExpandedEntity expEntity2, String slideLabel) {ExpandedSlide matchingSlide = null;List<ExpandedSlide> expSlides = expEntity2.getExpandedSlides();for(ExpandedSlide expSlide : expSlides) {if(expSlide.getSlideDefinition().getLabel().equals(slideLabel)) {matchingSlide = expSlide;break;}}return matchingSlide;}/**** @param slideDefinitionID* @param categoryID* @return*/public static boolean isBorrowedSlide(long slideDefinitionID,long categoryID) {List<CategorySlideDefinition> slideDefinitions;try {slideDefinitions = Catalog.getInstance().getDefinitionsContainer().getCategorySlideDefinitions(categoryID);for(CategorySlideDefinition slideDef: slideDefinitions){if(slideDefinitionID == slideDef.getSlideDefintionID()){return false;}}} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();}return true;}/**** @param slideDefinitionID* @param categoryID* @return*/public static long getBorrowedCategoryID(long slideDefinitionID, long categoryID) {try {List<CategorySlideDefinition> slideDefinitions = Catalog.getInstance().getDefinitionsContainer().getCategorySlideDefinitions(categoryID);for(CategorySlideDefinition slideDef: slideDefinitions){if(slideDefinitionID == slideDef.getSlideDefintionID()){return categoryID;}}List<Category> cats = Catalog.getInstance().getDefinitionsContainer().getCategory(categoryID).getParentCategory().getChildrenCategory();for(Category cat: cats){if(cat.getID() == categoryID){continue;}else{List<CategorySlideDefinition> slideDefs = Catalog.getInstance().getDefinitionsContainer().getCategorySlideDefinitions(cat.getID());for(CategorySlideDefinition slideDef: slideDefs){if(slideDefinitionID == slideDef.getSlideDefintionID()){return cat.getID();}}}}} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();}return categoryID;}/*** Special page ids start from 300000. Here, we pick the last one used and return* a value one more than it.*/public static long getNewSpecialPageId() {if (specialPageId == 0) {specialPageId = 300000;Map<Long, SpecialPage> specialPages = StorageManager.getStorageManager().getSpecialPages();if (specialPages != null) {for (long id : StorageManager.getStorageManager().getSpecialPages().keySet()) {if (specialPageId <= id) {specialPageId = id;}}}}return ++specialPageId;}/*** Updates a given special page object in database.*/public static void storeSpecialPage(SpecialPage specialPage) {StorageManager.getStorageManager().updateSpecialPage(specialPage);}/*** Looks up a special page given its Id from database and returns the same.*/public static SpecialPage getSpecialPage(long specialPageId) {return StorageManager.getStorageManager().getSpecialPage(specialPageId);}/*** Returns all special pages in the database.*/public static Map<Long, SpecialPage> getSpecialPages() {return StorageManager.getStorageManager().getSpecialPages();}/*** delete the special pages from database.*/public static void deleteSpecialPage(long specialPageId) {StorageManager.getStorageManager().deleteSpecialPage(specialPageId);}}